2015-09-08 03:39:49 -05:00
|
|
|
cmake_minimum_required (VERSION 2.8)
|
2015-05-08 09:51:22 -05:00
|
|
|
|
2015-09-08 03:39:49 -05:00
|
|
|
option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
|
|
|
set(OPM_MACROS_ROOT ${PROJECT_SOURCE_DIR})
|
2015-05-08 09:51:22 -05:00
|
|
|
|
2015-09-08 03:39:49 -05:00
|
|
|
# not the same location as most of the other projects; this hook overrides
|
|
|
|
macro (dir_hook)
|
|
|
|
endmacro (dir_hook)
|
2015-05-26 06:59:10 -05:00
|
|
|
|
2015-09-21 07:21:21 -05:00
|
|
|
# We need to define this variable in the installed cmake config file.
|
|
|
|
set(OPM_PROJECT_EXTRA_CODE_INSTALLED "set(OPM_MACROS_ROOT ${CMAKE_INSTALL_PREFIX}/share/opm)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH \${OPM_MACROS_ROOT}/cmake/Modules)")
|
|
|
|
|
|
|
|
set(OPM_PROJECT_EXTRA_CODE_INTREE "set(OPM_MACROS_ROOT ${OPM_COMMON_ROOT})
|
|
|
|
list(APPEND CMAKE_MODULE_PATH \${OPM_MACROS_ROOT}/cmake/Modules)")
|
2015-09-09 09:23:26 -05:00
|
|
|
|
2015-09-08 03:39:49 -05:00
|
|
|
# project information is in dune.module. Read this file and set variables.
|
|
|
|
# we cannot generate dune.module since it is read by dunecontrol before
|
|
|
|
# the build starts, so it makes sense to keep the data there then.
|
|
|
|
include (OpmInit)
|
|
|
|
|
|
|
|
# list of prerequisites for this particular project; this is in a
|
|
|
|
# separate file (in cmake/Modules sub-directory) because it is shared
|
|
|
|
# with the find module
|
|
|
|
include (${project}-prereqs)
|
|
|
|
|
|
|
|
# read the list of components from this file (in the project directory);
|
|
|
|
# it should set various lists with the names of the files to include
|
|
|
|
include (CMakeLists_files.cmake)
|
|
|
|
|
|
|
|
macro (config_hook)
|
|
|
|
endmacro (config_hook)
|
|
|
|
|
|
|
|
macro (prereqs_hook)
|
|
|
|
endmacro (prereqs_hook)
|
|
|
|
|
|
|
|
macro (sources_hook)
|
|
|
|
endmacro (sources_hook)
|
|
|
|
|
|
|
|
macro (fortran_hook)
|
|
|
|
endmacro (fortran_hook)
|
|
|
|
|
|
|
|
macro (files_hook)
|
|
|
|
endmacro (files_hook)
|
2015-05-26 06:59:10 -05:00
|
|
|
|
2015-09-08 03:39:49 -05:00
|
|
|
macro (tests_hook)
|
|
|
|
endmacro (tests_hook)
|
2015-05-26 06:59:10 -05:00
|
|
|
|
2015-09-08 03:39:49 -05:00
|
|
|
# all setup common to the OPM library modules is done here
|
|
|
|
include (OpmLibMain)
|
2015-09-09 09:23:37 -05:00
|
|
|
|
|
|
|
# Install build system files
|
|
|
|
install(DIRECTORY cmake DESTINATION share/opm)
|