diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f254adfe59b6b11872766b85ceee8897309fb84..0d31fab6d5b768f845826c7fb69c268466c6683d 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 f8ca96287408c0cedf6159914503ec520cc2980a..ef0d1a8df496e3216beb1fdf4ba61a5c98f72258 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")