From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 110FCA00C2; Thu, 5 Jan 2023 17:10:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74C1F42D3E; Thu, 5 Jan 2023 17:10:44 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 374F542D3C for ; Thu, 5 Jan 2023 17:10:43 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id AF5C55C019B; Thu, 5 Jan 2023 11:10:42 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 05 Jan 2023 11:10:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1672935042; x=1673021442; bh=ib 7O1LGwUD2a+Fc+GF+TMgShESWR+pgoLmv/rJeBiQM=; b=UkwEel9IKeWKpLnrnw gMHR3yshX3JW6dWmp0EdI4rsN84jVZ3SnkLFFumGW9un6WSGd6DbZtrJfs92Dz1Z ZfrrZwjgH3l6KHO/DhqC5zh9Ea/LK1cPhKe+JjdCMU0vT7/kNC+QvK1A1wH4qB9y 2FgXri5i2b+xU4y2KcTGIf6PaFqfnwM1JMb89/lo508q39l+J4nlAM5oqPdo5JaC CFd8RCv136U1UCzNRa6dIIZCKiniqMuHQF6Y2DNxT510pohC731+q+DmnprfWg4P mQhuhqKwTf+Yxq8VmeBkQU7u/bjmW9M/uTtz/K/IkrQQVCN7LR/iBB4TVidjmIcg fiYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1672935042; x=1673021442; bh=ib7O1LGwUD2a+ Fc+GF+TMgShESWR+pgoLmv/rJeBiQM=; b=ilfWKhLR2YFsEyZdHspa54uMDs1Ro NHSnbZhn7SnKDbdG9xFmZV0Fbl+mkschPxLgO1KoDwbi+Vmq2MoFO74awCBuJhl2 NJBJ5C9wiCYXP46OZ/SuQGdqcQe7jDRWC2bJJxejdshzf4DMocLzKkQNbqVa8GsQ WuJPURALMeg3OmxpG11se4wHkGDRxJSM8k/mzcm4YbyfoVf/ny1NTzd41QNf3eEe yKoOHzECJW0P+2Yqa4GXyCkEthnhIh7Xfp48jWmdILX5SCoS1NwMiQfpDCuARV9X /NbhWaZ7tfBZlga3KpkzStXyRroM9BhOXwyCHzMKPykfpP/ZFcPfWdnkA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeekgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdejhfdugeehvddtieejieegteeuudfgjeeukeeiledthfetveek hefhieelhfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 Jan 2023 11:10:41 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Tal Shnaiderman , Matan Azrad , Viacheslav Ovsiienko Subject: [PATCH 2/3] common/mlx5: get Windows dependency from standard variables Date: Thu, 5 Jan 2023 17:10:19 +0100 Message-Id: <20230105161020.247780-3-thomas@monjalon.net> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105161020.247780-1-thomas@monjalon.net> References: <20230105161020.247780-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org It was requested to provide path to DevX library through DEVX_INC_PATH and DEVX_LIB_PATH. It was non-standard and triggers some issues with recent Meson. Using CFLAGS/LDFLAGS is standard and simpler. It is also possible to use the Meson options -Dc_args and -Dc_link_args. There are 2 options to provide: -I -L Signed-off-by: Thomas Monjalon --- doc/guides/platform/mlx5.rst | 12 ++++++----- drivers/common/mlx5/windows/meson.build | 28 ++++++++++++------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/doc/guides/platform/mlx5.rst b/doc/guides/platform/mlx5.rst index 5784b9a87b..33eb8627b5 100644 --- a/doc/guides/platform/mlx5.rst +++ b/doc/guides/platform/mlx5.rst @@ -259,13 +259,15 @@ configured by the ``ibverbs_link`` build option: Compilation on Windows ~~~~~~~~~~~~~~~~~~~~~~ -The DevX SDK location must be set through two environment variables: +The DevX SDK location must be set through CFLAGS/LDFLAGS, +either:: -``DEVX_LIB_PATH`` - path to the DevX lib file. + meson -Dc_args=-Idevx/inc -Dc_link_args=-Ldevx/lib -``DEVX_INC_PATH`` - path to the DevX header files. +or:: + + export CFLAGS=-Idevx/inc + export LDFLAGS=-Ldevx/lib .. _mlx5_common_env: diff --git a/drivers/common/mlx5/windows/meson.build b/drivers/common/mlx5/windows/meson.build index cc486014a8..f60daed840 100644 --- a/drivers/common/mlx5/windows/meson.build +++ b/drivers/common/mlx5/windows/meson.build @@ -1,6 +1,20 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2019 Mellanox Technologies, Ltd +if not cc.has_header('mlx5devx.h') + build = false + reason = 'missing dependency, "mlx5devx.h"' + subdir_done() +endif + +devxlib = cc.find_library('mlx5devx', required: true) +if not devxlib.found() + build = false + reason = 'missing dependency, "mlx5devx"' + subdir_done() +endif +ext_deps += devxlib + includes += include_directories('.') sources += files( @@ -8,20 +22,6 @@ sources += files( 'mlx5_common_os.c', ) -res_lib = run_command(python3, '-c', 'import os; print(os.environ["DEVX_LIB_PATH"])', check: false) -res_inc = run_command(python3, '-c', 'import os; print(os.environ["DEVX_INC_PATH"])', check: false) - -if (res_lib.returncode() != 0 or res_inc.returncode() != 0) - build = false - reason = 'DevX environment variables are not set, DEVX_LIB_PATH and DEVX_INC_PATH vars must be exported' - subdir_done() -endif - -devx_lib_dir = res_lib.stdout().strip() -devx_inc_dir = res_inc.stdout().strip() - -ext_deps += cc.find_library('mlx5devx', dirs: devx_lib_dir, required: true) -includes += include_directories(devx_inc_dir) cflags_options = [ '-std=c11', '-Wno-strict-prototypes', -- 2.39.0