Skip to content
Snippets Groups Projects
Commit d72a331a authored by Dominik Thoennes's avatar Dominik Thoennes
Browse files

fix wrong/misleading error message if pystencils/lbmpy is missing; check for jinja2

parent 03e1fca2
No related merge requests found
......@@ -556,14 +556,23 @@ endif ( )
##
#############################################################################################################################
if ( WALBERLA_BUILD_WITH_CODEGEN )
find_package( PythonInterp 3 QUIET REQUIRED)
find_package( PythonInterp 3 QUIET REQUIRED)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import lbmpy"
RESULT_VARIABLE LBMPY_FOUND )
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'")
endif()
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from pystencils.include import get_pystencils_include_path; print(get_pystencils_include_path())"
RESULT_VARIABLE PYTHON_RET_CODE
OUTPUT_VARIABLE PYSTENCILS_INCLUDE_PATH)
if(NOT PYTHON_RET_CODE EQUAL 0)
message(FATAL_ERROR "WALBERLA_BUILD_WITH_CODEGEN activated and pystencils_walberla package not found")
endif()
include_directories( ${PYSTENCILS_INCLUDE_PATH} )
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import jinja2"
RESULT_VARIABLE JINJA2_FOUND )
if(NOT JINJA2_FOUND EQUAL 0)
message(FATAL_ERROR "WALBERLA_BUILD_WITH_CODEGEN activated and jinja2 package not found.
Please install jinja2 e.g.: 'pip3 install jinja2'")
endif()
endif()
############################################################################################################################
......
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