Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
waLBerla
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Gardner
waLBerla
Commits
d72a331a
Commit
d72a331a
authored
4 years ago
by
Dominik Thoennes
Browse files
Options
Downloads
Patches
Plain Diff
fix wrong/misleading error message if pystencils/lbmpy is missing; check for jinja2
parent
03e1fca2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+14
-5
14 additions, 5 deletions
CMakeLists.txt
with
14 additions
and
5 deletions
CMakeLists.txt
+
14
−
5
View file @
d72a331a
...
@@ -556,14 +556,23 @@ endif ( )
...
@@ -556,14 +556,23 @@ endif ( )
##
##
#############################################################################################################################
#############################################################################################################################
if
(
WALBERLA_BUILD_WITH_CODEGEN
)
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())"
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
)
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
}
)
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
()
endif
()
############################################################################################################################
############################################################################################################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment