Skip to content

Commit

Permalink
Enable usage of external ERT source
Browse files Browse the repository at this point in the history
This change in cmakelist enables the usage of an external ERT source. You can now point to a later version of ERT and use this in sted of the one bundled in the ResInsight source.
  • Loading branch information
iLoop2 authored and magnesj committed Jan 9, 2015
1 parent 8de0f46 commit eea5ac6
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,46 @@ SET(INSTALL_ERT OFF CACHE BOOL "ERT: Install library")
SET(BUILD_SHARED_LIBS OFF CACHE BOOL "ERT: Build shared libraries")
SET(ERT_USE_OPENMP ${OPENMP_FOUND} CACHE BOOL "ERT: Compile using OpenMP")


add_subdirectory(ThirdParty/Ert/devel)

include_directories(
option( ERT_EXTERNAL "Build ERT from external source" OFF)
SET(EXT_ERT_ROOT "" CACHE STRING "Path to ERT CMakeList.txt (source path)")

if (ERT_EXTERNAL)
if (EXT_ERT_ROOT)
set(ERT_SOURCE_PATH "${EXT_ERT_ROOT}")

add_subdirectory(${ERT_SOURCE_PATH} ${CMAKE_BINARY_DIR}/ThirdParty/Ert)
include_directories(
${ERT_SOURCE_PATH}/libecl/include/ert/ecl
${ERT_SOURCE_PATH}/libert_util/include/ert/util
${ERT_SOURCE_PATH}/libgeometry/include/ert/geometry
${ERT_SOURCE_PATH}/libecl_well/include/ert/ecl_well
${ERT_SOURCE_PATH}/libecl/include
${ERT_SOURCE_PATH}/libert_util/include
${ERT_SOURCE_PATH}/libgeometry/include
${ERT_SOURCE_PATH}/libecl_well/include
${CMAKE_BINARY_DIR}/ThirdParty/Ert/libert_util/include/ert/util
${CMAKE_BINARY_DIR}/ThirdParty/Ert/libert_util/include
)
endif(EXT_ERT_ROOT)

else (ERT_EXTERNAL)
add_subdirectory(ThirdParty/Ert/devel)
include_directories(
${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl/include/ert/ecl
${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libert_util/include/ert/util
${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libgeometry/include/ert/geometry
${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl_well/include/ert/ecl_well
${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl/include
${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl/include
${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libert_util/include
${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libgeometry/include
${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl_well/include

${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/libert_util/include/ert/util
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/libert_util/include/ert/util
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/libert_util/include
)
)
endif (ERT_EXTERNAL)


################################################################################
Expand Down

0 comments on commit eea5ac6

Please sign in to comment.