fixed: we need to do mpi disabling earlier

if not, prereqs do not see this file, and the option ends
up not being operational for prereqs looking for MPI.
This commit is contained in:
Arne Morten Kvarving
2018-01-17 15:26:26 +01:00
parent d0a973738b
commit de7f4e168d
2 changed files with 7 additions and 6 deletions

View File

@@ -74,3 +74,10 @@ if (USE_VERSIONED_DIR)
else ()
set (${project}_VER_DIR "")
endif ()
# parallel computing must be explicitly enabled
# This needs to be in OpmInit as prereqs is called before OpmLibMain is included.
option (USE_MPI "Use Message Passing Interface for parallel computing" OFF)
if (NOT USE_MPI)
set (CMAKE_DISABLE_FIND_PACKAGE_MPI TRUE)
endif ()

View File

@@ -90,12 +90,6 @@ include (UseOptimization)
# dependencies, in case they alter the list of warnings
include (UseWarnings)
# parallel computing must be explicitly enabled
option (USE_MPI "Use Message Passing Interface for parallel computing" OFF)
if (NOT USE_MPI)
set (CMAKE_DISABLE_FIND_PACKAGE_MPI TRUE)
endif (NOT USE_MPI)
# parallel programming
include (UseOpenMP)
find_openmp (${project})