WIP: new cmake build system
Summary
- Separate cmake files instead of one big DuneMacros.cmake !957 (closed)
- Give all cmake functions the prefix dune_ (included in !957 (closed))
- Add argument to
dune_project(<target>)
to allow creation of a module library directly - Remove global include_directories in favor of target_include_directories !944 (closed)
- Link tests created by
dune_add_test
automatically against module library - Remove the cmake module include CMakeParseArguments !1008 (merged)
- Remove the cmake variable DUNE_DEFAULT_LIBS !1009 (merged)
- Simplify dune_library_add_sources by using target_sources !1010 (merged)
- Simplify enforcement of required c++ standard in cmake !862 (merged)
- Simplify functions from
DuneModuleDependencies.cmake
!1249 (merged) - Set
CMAKE_MODULE_PATH
in<module>-config.cmake
!1038 (closed) - Move
include(DuneModules)
intodune-common-config.cmake
- Remove pkg-config support for finding dune packages (was not working before and not used. May be activated later again)
- Extract version of module dependencies from package file (instead of the dune.module file)
- Remove
dune_enable_all_packages
from default dune project
Superbuild
In order to build several modules in one run, prepare a CMakeLists.txt
file in the root directory of all dune modules:
cmake_minimum_required(VERSION 3.13)
project(dune VERSION 2.9 LANGUAGES CXX)
set(dune_modules dune-common dune-geometry dune-localfunctions dune-uggrid dune-grid dune-istl)
set(CMAKE_PREFIX_PATH ${PROJECT_BINARY_DIR})
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/dune-common/cmake/modules)
set(DUNE_DISABLE_SIMD_TESTS TRUE)
enable_testing()
foreach (mod ${dune_modules})
add_subdirectory(${mod})
endforeach(mod)
include(FeatureSummary)
feature_summary(WHAT ALL)
Edited by Santiago Ospina De Los Ríos