Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Özgür Ozan Sen
ogs
Commits
c5ec9292
Commit
c5ec9292
authored
3 years ago
by
Lars Bilke
Committed by
Dmitri Naumov
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[cmake] Added option OGS_PETSC_CONFIG_OPTIONS.
Can be used to pass petsc config options such as --download-hypre etc.
parent
2e39341d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+3
-0
3 additions, 0 deletions
CMakeLists.txt
scripts/cmake/DependenciesExternalProject.cmake
+9
-4
9 additions, 4 deletions
scripts/cmake/DependenciesExternalProject.cmake
with
12 additions
and
4 deletions
CMakeLists.txt
+
3
−
0
View file @
c5ec9292
...
@@ -53,6 +53,9 @@ endif()
...
@@ -53,6 +53,9 @@ endif()
if
(
OGS_USE_PETSC
)
if
(
OGS_USE_PETSC
)
set
(
OGS_USE_MPI ON CACHE BOOL
"Use MPI"
FORCE
)
set
(
OGS_USE_MPI ON CACHE BOOL
"Use MPI"
FORCE
)
endif
()
endif
()
set
(
OGS_PETSC_CONFIG_OPTIONS
""
CACHE STRING
"Additional PETSc configuration options."
)
option
(
OGS_USE_CVODE
"Use the Sundials CVODE module?"
OFF
)
option
(
OGS_USE_CVODE
"Use the Sundials CVODE module?"
OFF
)
option
(
OGS_BUILD_UTILS
"Should the utilities programs be built?"
ON
)
option
(
OGS_BUILD_UTILS
"Should the utilities programs be built?"
ON
)
option
(
OGS_BUILD_TESTING
"Should the tests be built?"
ON
)
option
(
OGS_BUILD_TESTING
"Should the tests be built?"
ON
)
...
...
This diff is collapsed.
Click to expand it.
scripts/cmake/DependenciesExternalProject.cmake
+
9
−
4
View file @
c5ec9292
...
@@ -24,9 +24,14 @@ if(OGS_USE_PETSC)
...
@@ -24,9 +24,14 @@ if(OGS_USE_PETSC)
set
(
PETSC_EXECUTABLE_RUNS YES
)
set
(
PETSC_EXECUTABLE_RUNS YES
)
endif
()
endif
()
find_package
(
PETSc
${
ogs.minimum_version.petsc
}
)
if
(
NOT OGS_PETSC_CONFIG_OPTIONS
)
find_package
(
PETSc
${
ogs.minimum_version.petsc
}
)
endif
()
if
(
NOT PETSC_FOUND
)
if
(
NOT PETSC_FOUND
)
set
(
_configure_opts
""
)
set
(
_configure_opts
""
)
if
(
NOT
"--download-fc=1"
IN_LIST OGS_PETSC_CONFIG_OPTIONS
)
list
(
APPEND _configure_opts --with-fc=0
)
endif
()
if
(
ENV{CC}
)
if
(
ENV{CC}
)
list
(
APPEND _configure_opts --with-cc=$ENV{CC}
)
list
(
APPEND _configure_opts --with-cc=$ENV{CC}
)
endif
()
endif
()
...
@@ -39,9 +44,9 @@ if(OGS_USE_PETSC)
...
@@ -39,9 +44,9 @@ if(OGS_USE_PETSC)
GIT_REPOSITORY https://gitlab.com/petsc/petsc.git
GIT_REPOSITORY https://gitlab.com/petsc/petsc.git
GIT_TAG v
${
ogs.minimum_version.petsc
}
GIT_TAG v
${
ogs.minimum_version.petsc
}
CONFIGURE_COMMAND
CONFIGURE_COMMAND
./configure
--with-fc=0
--download-f2cblaslapack=1
./configure --download-f2cblaslapack=1
--prefix=<INSTALL_DIR>
--prefix=<INSTALL_DIR>
--with-debugging=$<CONFIG:Debug>
--with-debugging=$<CONFIG:Debug>
${
_configure_opts
}
${
_configure_opts
}
${
OGS_PETSC_CONFIG_OPTIONS
}
BUILD_IN_SOURCE ON
BUILD_IN_SOURCE ON
BUILD_COMMAND make -j all
BUILD_COMMAND make -j all
INSTALL_COMMAND make -j install
INSTALL_COMMAND make -j install
...
...
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