From a5d024587475d258bf0caeccd4dfa912dae8d3ce Mon Sep 17 00:00:00 2001 From: Christoph Alt <christoph.alt@fau.de> Date: Mon, 10 Mar 2025 17:03:58 +0100 Subject: [PATCH] moved pybind11 specifc setting for intel compiler to the intel.cmake file --- CMakeLists.txt | 9 +++------ cmake/compileroptions/Intel.cmake | 3 +++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f254adfe..0d31fab6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -413,12 +413,9 @@ endif() ## ############################################################################################################################# if ( WALBERLA_BUILD_WITH_PYTHON ) - if(WALBERLA_CXX_COMPILER_IS_INTEL) - # Intel C++17 support introduced in 2.6.2 (https://github.com/pybind/pybind11/pull/2729) - set(PYBIND11_MINIMUM_VERSION "2.6.2") - else() - set(PYBIND11_MINIMUM_VERSION "2.6.0") - endif() + if (NOT DEFINED PYBIND11_MINIMUM_VERSION) + set(PYBIND11_MINIMUM_VERSION "2.6.0") + endif() execute_process(COMMAND ${Python_EXECUTABLE} -c "import pybind11; print(pybind11._version.__version__)" OUTPUT_VARIABLE pybind11_VERSION ERROR_QUIET RESULT_VARIABLE pybind11_VERSION_RESULT) diff --git a/cmake/compileroptions/Intel.cmake b/cmake/compileroptions/Intel.cmake index f8ca96287..ef0d1a8df 100644 --- a/cmake/compileroptions/Intel.cmake +++ b/cmake/compileroptions/Intel.cmake @@ -70,3 +70,6 @@ if(WALBERLA_BUILD_WITH_GPROF) add_flag(CMAKE_CXX_FLAGS "-pg") add_flag(CMAKE_EXE_LINKER_FLAGS "-pg") endif() + +# Intel C++17 support introduced in 2.6.2 (https://github.com/pybind/pybind11/pull/2729) +set(PYBIND11_MINIMUM_VERSION "2.6.2") -- GitLab