Skip to content
Snippets Groups Projects
Commit f3130576 authored by Markus Holzer's avatar Markus Holzer
Browse files

Merge branch 'thoennes/check-lbmpy-version' into 'master'

check for lbmpy version and warn if bellow min

Closes #187

See merge request walberla/walberla!572
parents 2d47758f 92589928
No related merge requests found
......@@ -592,11 +592,17 @@ endif ()
##
#############################################################################################################################
if ( WALBERLA_BUILD_WITH_CODEGEN )
execute_process(COMMAND ${Python_EXECUTABLE} -c "import lbmpy"
RESULT_VARIABLE LBMPY_FOUND )
set(LBMPY_MIN_VERSION 1.1)
execute_process(COMMAND ${Python_EXECUTABLE} -c "import lbmpy; print(lbmpy.__version__)"
RESULT_VARIABLE LBMPY_FOUND OUTPUT_VARIABLE LBMPY_VERSION)
if(NOT LBMPY_FOUND EQUAL 0)
message(FATAL_ERROR "WALBERLA_BUILD_WITH_CODEGEN activated but pystencils or lbmpy package not found.
Please install lbmpy e.g.: 'pip3 install lbmpy'")
elseif(LBMPY_VERSION VERSION_LESS LBMPY_MIN_VERSION)
string(STRIP ${LBMPY_VERSION} LBMPY_VERSION_STRIP)
message(WARNING
"lbmpy version ${LBMPY_VERSION_STRIP} was found.\n"
"We recommend to use at least version ${LBMPY_MIN_VERSION}.")
endif()
execute_process(COMMAND ${Python_EXECUTABLE} -c "from pystencils.include import get_pystencils_include_path; print(get_pystencils_include_path())"
OUTPUT_VARIABLE PYSTENCILS_INCLUDE_PATH)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment