CMakeLists.txt 931 Bytes
Newer Older
1 2
# set up project
project("dumux" C CXX)
3

4
# general stuff
5
cmake_minimum_required(VERSION 3.1)
6

7
if(NOT (dune-common_DIR
8 9 10 11 12 13 14
        OR dune-common_ROOT
        OR "${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*"))
    string(REPLACE  ${CMAKE_PROJECT_NAME}
      dune-common dune-common_DIR
      ${PROJECT_BINARY_DIR})
endif()

15 16
#find dune-common and set the module path
find_package(dune-common)
17

18 19
list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH}
  "${PROJECT_SOURCE_DIR}/cmake/modules")
20 21
#include the dune macros
include(DuneMacros)
22

23 24
# start a dune project with information from dune.module
dune_project()
25
dune_enable_all_packages()
26

27 28 29
# enforce C++-14
dune_require_cxx_standard(MODULE "DuMuX" VERSION 14)

30 31
add_subdirectory(cmake/modules)
add_subdirectory(doc)
32
add_subdirectory(dumux)
33
add_subdirectory(test EXCLUDE_FROM_ALL)
34

35 36
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)