From a9a72883224620d82a13535548a4c06138d08837 Mon Sep 17 00:00:00 2001 From: Dominik Thoennes <dominik.thoennes@fau.de> Date: Mon, 28 Feb 2022 20:35:53 +0100 Subject: [PATCH] PYTHON_ROOT_DIR and PYTHON_EXECUTABLE should not be used to set python interpreter --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 707890fdd..20266ce30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -371,7 +371,7 @@ if( WALBERLA_OPTIMIZE_FOR_LOCALHOST ) add_flag ( CMAKE_CXX_FLAGS "-march=native" ) add_flag ( CMAKE_C_FLAGS "-march=native" ) endif() - + if( WALBERLA_CXX_COMPILER_IS_INTEL ) add_flag ( CMAKE_CXX_FLAGS "-xhost" ) add_flag ( CMAKE_C_FLAGS "-xhost" ) @@ -576,10 +576,13 @@ endif ( ) ############################################################################################################################# if ( WALBERLA_BUILD_WITH_CODEGEN OR WALBERLA_BUILD_WITH_PYTHON ) + if ( DEFINED PYTHON_ROOT_DIR OR DEFINED PYTHON_EXECUTABLE ) + message( WARNING "Setting PYTHON_ROOT_DIR or PYTHON_EXECUTABLE will likely not work. Use Python_ROOT_DIR instead." ) + endif () cmake_policy( SET CMP0094 NEW ) set( Python_FIND_FRAMEWORK LAST ) - find_package (Python COMPONENTS Interpreter Development) -endif() + find_package( Python COMPONENTS Interpreter Development ) +endif () ############################################################################################################################ ## -- GitLab