CMakeLists.txt 1.14 KB
Newer Older
1
cmake_minimum_required(VERSION 3.1)
2
project(amdis LANGUAGES CXX VERSION 0.2)
3 4 5 6 7 8 9 10 11 12 13

#find dune-common and set the module path
find_package(dune-common REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules"
  ${dune-common_MODULE_PATH})

#include the dune macros
include(DuneMacros)

# start a dune project with information from dune.module
dune_project()
14

15
dune_enable_all_packages(MODULE_LIBRARIES amdis fmt)
16

17 18 19
add_subdirectory("bin")
add_subdirectory("cmake/modules")
add_subdirectory("doc")
20 21
add_subdirectory("examples" EXCLUDE_FROM_ALL)
add_subdirectory("libs")
22
add_subdirectory("src")
23
add_subdirectory("test")
24

25
target_link_libraries(amdis fmt)
Praetorius, Simon's avatar
Praetorius, Simon committed
26
target_compile_options(amdis PUBLIC "-Wall" "-Wpedantic")
27

28 29
option(ENABLE_ALL_WARNINGS "enable all meaningful warnings" OFF)
if (ENABLE_ALL_WARNINGS)
30 31 32
  target_compile_options(amdis PUBLIC "-Wextra" "-Wnon-virtual-dtor"
                                      "-Wold-style-cast" "-Wcast-align"
                                      "-Woverloaded-virtual" "-Wconversion")
33 34
endif (ENABLE_ALL_WARNINGS)

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