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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Rahil Doshi
waLBerla
Commits
3e320d52
Commit
3e320d52
authored
4 years ago
by
Dominik Thoennes
Browse files
Options
Downloads
Patches
Plain Diff
prefer pystencils submodule over system
parent
a44ca303
Branches
thoennes/pystencils-submodule
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+9
-5
9 additions, 5 deletions
CMakeLists.txt
cmake/waLBerlaHelperFunctions.cmake
+2
-0
2 additions, 0 deletions
cmake/waLBerlaHelperFunctions.cmake
with
11 additions
and
5 deletions
CMakeLists.txt
+
9
−
5
View file @
3e320d52
...
@@ -551,22 +551,26 @@ endif ( )
...
@@ -551,22 +551,26 @@ endif ( )
##
##
#############################################################################################################################
#############################################################################################################################
if
(
WALBERLA_BUILD_WITH_CODEGEN
)
if
(
WALBERLA_BUILD_WITH_CODEGEN
)
find_package
(
PythonInterp 3 QUIET REQUIRED
)
git_update_submodules
()
find_package
(
PythonInterp 3.6 QUIET REQUIRED
)
execute_process
(
COMMAND
${
PYTHON_EXECUTABLE
}
-c
"import lbmpy; import pystencils"
execute_process
(
COMMAND
${
PYTHON_EXECUTABLE
}
-c
"import lbmpy; import pystencils"
RESULT_VARIABLE LBMPY_FOUND
)
RESULT_VARIABLE LBMPY_FOUND
)
if
(
NOT LBMPY_FOUND EQUAL 0
)
if
(
NOT LBMPY_FOUND EQUAL 0
)
git_update_submodules
()
if
(
GIT_FOUND
)
message
(
FATAL_ERROR
"Please update git submodules or install pystencils and lbmpy via pip."
)
else
()
message
(
FATAL_ERROR
"Please install pystencils and lbmpy e.g. via pip"
)
endif
()
endif
()
endif
()
set
(
ENV{PYTHONPATH}
${
walberla_SOURCE_DIR
}
/extern/pystencils:$ENV{PYTHONPATH}
)
set
(
ENV{PYTHONPATH}
${
walberla_SOURCE_DIR
}
/extern/pystencils:$ENV{PYTHONPATH}
)
message
(
STATUS $ENV{PYTHONPATH}
)
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())"
OUTPUT_VARIABLE PYSTENCILS_INCLUDE_PATH
)
OUTPUT_VARIABLE PYSTENCILS_INCLUDE_PATH
)
include_directories
(
${
PYSTENCILS_INCLUDE_PATH
}
)
include_directories
(
${
PYSTENCILS_INCLUDE_PATH
}
)
string
(
STRIP
${
PYSTENCILS_INCLUDE_PATH
}
PYSTENCILS_INCLUDE_PATH_TMP
)
string
(
STRIP
${
PYSTENCILS_INCLUDE_PATH
}
PYSTENCILS_INCLUDE_PATH_TMP
)
message
(
STATUS
"Found pystencils:
${
PYSTENCILS_INCLUDE_PATH_TMP
}
"
)
message
(
STATUS
"Found pystencils:
${
PYSTENCILS_INCLUDE_PATH_TMP
}
"
)
execute_process
(
COMMAND
${
PYTHON_EXECUTABLE
}
-c
"import jinja2"
execute_process
(
COMMAND
${
PYTHON_EXECUTABLE
}
-c
"import jinja2"
RESULT_VARIABLE JINJA2_FOUND
)
RESULT_VARIABLE JINJA2_FOUND
)
if
(
NOT JINJA2_FOUND EQUAL 0
)
if
(
NOT JINJA2_FOUND EQUAL 0
)
message
(
FATAL_ERROR
"WALBERLA_BUILD_WITH_CODEGEN activated and jinja2 package not found.
message
(
FATAL_ERROR
"WALBERLA_BUILD_WITH_CODEGEN activated and jinja2 package not found.
Please install jinja2 e.g.: 'pip3 install jinja2'"
)
Please install jinja2 e.g.: 'pip3 install jinja2'"
)
...
...
This diff is collapsed.
Click to expand it.
cmake/waLBerlaHelperFunctions.cmake
+
2
−
0
View file @
3e320d52
...
@@ -307,10 +307,12 @@ endfunction()
...
@@ -307,10 +307,12 @@ endfunction()
#######################################################################################################################
#######################################################################################################################
#
#
# updates all submodules in the walberla repository
# updates all submodules in the walberla repository
# this function will propagate GIT_FOUND to the parent scope
#
#
#######################################################################################################################
#######################################################################################################################
function
(
git_update_submodules
)
function
(
git_update_submodules
)
find_package
(
Git QUIET
)
find_package
(
Git QUIET
)
set
(
GIT_FOUND
${
GIT_FOUND
}
PARENT_SCOPE
)
if
(
GIT_FOUND AND EXISTS
"
${
PROJECT_SOURCE_DIR
}
/.git"
)
if
(
GIT_FOUND AND EXISTS
"
${
PROJECT_SOURCE_DIR
}
/.git"
)
# Update submodules as needed
# Update submodules as needed
if
(
WALBERLA_GIT_SUBMODULE_AUTO
)
if
(
WALBERLA_GIT_SUBMODULE_AUTO
)
...
...
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