Skip to content

Commit

Permalink
Merge pull request #269 from akva2/optional_petsc
Browse files Browse the repository at this point in the history
add option to enable PETSc
  • Loading branch information
atgeirr authored Sep 10, 2017
2 parents 67a8d5b + 8c97766 commit 2f872e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/Modules/FindPETSc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

# find out the size of a pointer. this is required to only search for
# libraries in the directories relevant for the architecture

if(NOT USE_PETSC)
return()
endif()

if (CMAKE_SIZEOF_VOID_P)
math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
endif (CMAKE_SIZEOF_VOID_P)
Expand Down
3 changes: 3 additions & 0 deletions cmake/Modules/OpmLibMain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ find_threads (${project})
# SuperLU is optional
option (USE_SUPERLU "Use SuperLU direct solvers" OFF)

# PETSc is optional
option (USE_PETSC "Use PETSc iterative solvers" OFF)

# static code analysis
include(UseStaticAnalysis)
setup_static_analysis_tools()
Expand Down

0 comments on commit 2f872e8

Please sign in to comment.