1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright 2019 Mellanox Technologies, Ltd
4 includes += include_directories('.')
10 res_lib = run_command(python3, '-c', 'import os; print(os.environ["DEVX_LIB_PATH"])')
11 res_inc = run_command(python3, '-c', 'import os; print(os.environ["DEVX_INC_PATH"])')
13 if (res_lib.returncode() != 0 or res_inc.returncode() != 0)
15 reason = 'DevX environment variables are not set, DEVX_LIB_PATH and DEVX_INC_PATH vars must be exported'
19 devx_lib_dir = res_lib.stdout().strip()
20 devx_inc_dir = res_inc.stdout().strip()
22 ext_deps += cc.find_library('mlx5devx', dirs: devx_lib_dir, required: true)
23 includes += include_directories(devx_inc_dir)
26 '-Wno-strict-prototypes',
31 foreach option:cflags_options
32 if cc.has_argument(option)
36 if get_option('buildtype').contains('debug')
37 cflags += [ '-pedantic', '-DPEDANTIC' ]
39 cflags += [ '-UPEDANTIC' ]