Search for ERT and include in build if found
If the OpenMP flag is added to the build, this should probably be propagated to the user programs as well.
This commit is contained in:
@@ -47,6 +47,8 @@ list (APPEND opm-core_DEPS
|
||||
COMPONENTS date_time filesystem system unit_test_framework REQUIRED"
|
||||
# DUNE dependency
|
||||
"dune-istl"
|
||||
# Ensembles-based Reservoir Tools (ERT)
|
||||
"ERT"
|
||||
)
|
||||
find_and_append_package_list (${opm-core_DEPS})
|
||||
|
||||
@@ -90,8 +92,11 @@ list (REMOVE_ITEM opmcore_SOURCES
|
||||
${PROJECT_SOURCE_DIR}/opm/core/utility/parameters/tinyxml/xmltest.cpp
|
||||
)
|
||||
|
||||
# we don't try to find any of these
|
||||
set (HAVE_ERT)
|
||||
# HAVE_ERT is used as an #ifdef, not as an #if in the source code, if it
|
||||
# is not true, then it should be unset altogether
|
||||
if (NOT HAVE_ERT)
|
||||
set (HAVE_ERT)
|
||||
endif (NOT HAVE_ERT)
|
||||
|
||||
# create configuration header which describes available features
|
||||
# necessary to compile this library. singular version is the names that
|
||||
|
||||
@@ -47,4 +47,16 @@ string (REPLACE "@C_STD99_FLAGS@" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
string (STRIP "${CMAKE_C_FLAGS}" CMAKE_C_FLAGS)
|
||||
set (CMAKE_C_FLAG "@C_STD99_FLAGS@ ${CMAKE_C_FLAGS}")
|
||||
|
||||
# build with OpenMP if that was found
|
||||
if (NOT "@OpenMP_C_FLAGS@" STREQUAL "")
|
||||
string (REPLACE "@OpenMP_C_FLAGS@" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
string (STRIP "${CMAKE_C_FLAGS}" CMAKE_C_FLAGS)
|
||||
set (CMAKE_C_FLAG "@OpenMP_C_FLAGS@ ${CMAKE_C_FLAGS}")
|
||||
endif (NOT "@OpenMP_C_FLAGS@" STREQUAL "")
|
||||
if (NOT "@OpenMP_CXX_FLAGS@" STREQUAL "")
|
||||
string (REPLACE "@OpenMP_CXX_FLAGS@" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
string (STRIP "${CMAKE_CXX_FLAGS}" CMAKE_CXX_FLAGS)
|
||||
set (CMAKE_C_FLAG "@OpenMP_CXX_FLAGS@ ${CMAKE_CXX_FLAGS}")
|
||||
endif (NOT "@OpenMP_CXX_FLAGS@" STREQUAL "")
|
||||
|
||||
# this is the contents of config.h as far as our probes can tell:
|
||||
|
||||
Reference in New Issue
Block a user