From 5cc6b8a9151451547cebc536a421692d2e7d69eb Mon Sep 17 00:00:00 2001 From: paugier Date: Mon, 8 Jan 2024 08:49:49 +0100 Subject: [PATCH] Meson: Pythran option complex_hook --- meson.build | 12 +++++++++--- meson.options | 6 ++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 02133132..a2adffc2 100644 --- a/meson.build +++ b/meson.build @@ -60,9 +60,7 @@ print(incdir)''' ).stdout().strip() pythran = find_program('pythran', native: true) - pythran_dep = declare_dependency( - include_directories: incdir_pythran, - ) + if get_option('use-xsimd') == true # xsimd is unvendored from pythran by conda-forge, and due to a compiler # activation bug the default /include/ may not be visible (see @@ -72,12 +70,20 @@ print(incdir)''' include_directories: incdir_pythran, dependencies: xsimd_dep, ) + else + pythran_dep = declare_dependency( + include_directories: incdir_pythran, + ) endif + cpp_args_pythran = [ '-DENABLE_PYTHON_MODULE', '-D__PYTHRAN__=3', '-DPYTHRAN_BLAS_NONE' ] + + pythran_complex_hook = get_option('pythran-complex-hook') + endif subdir('fluidsim') diff --git a/meson.options b/meson.options index 33f4d2bd..1594ab0d 100644 --- a/meson.options +++ b/meson.options @@ -7,3 +7,9 @@ option( 'or comma separated value representing multi-backends' ) option('use-xsimd', type: 'boolean', value: true, description: 'use xsimd') +option( + 'pythran-complex-hook', + type: 'boolean', + value: true, + description: 'Pythran complex_hook option' +)