mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-13 09:28:23 +01:00
33 lines
836 B
CMake
33 lines
836 B
CMake
#debian stable (currently bullseye)
|
|
cmake_minimum_required(VERSION 3.18)
|
|
|
|
project(Diffusion CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
find_package(Eigen3 REQUIRED NO_MODULE)
|
|
find_package(OpenMP)
|
|
|
|
option(USE_OPENMP "Compile with OpenMP support" ON)
|
|
|
|
set(CMAKE_CXX_FLAGS_GENERICOPT "-O3 -march=native -ffast-math" CACHE STRING
|
|
"Flags used by the C++ compiler during opt builds."
|
|
FORCE)
|
|
|
|
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
|
|
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel GenericOpt."
|
|
FORCE)
|
|
|
|
option(USE_UNSAFE_MATH_OPT
|
|
"Use compiler options to break IEEE compliances by
|
|
oenabling reordering of instructions when adding/multiplying of floating
|
|
points."
|
|
OFF)
|
|
|
|
if(USE_UNSAFE_MATH_OPT)
|
|
add_compile_options(-ffast-math)
|
|
endif()
|
|
|
|
add_subdirectory(app)
|
|
add_subdirectory(src)
|