-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
27 lines (20 loc) · 758 Bytes
/
CMakeLists.txt
File metadata and controls
27 lines (20 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
cmake_minimum_required(VERSION 3.5)
cmake_policy(VERSION 3.5)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
include(exceptions)
project(exceptions VERSION 0.1 LANGUAGES Fortran)
option(WITH_FYPP "Whether Fypp preprocessor should be used" TRUE)
set(FYPP_FLAGS "-I${CMAKE_SOURCE_DIR}/include" CACHE STRING "Flag to pass to the Fypp preprocessor")
set(FYPP_BUILD_FLAGS
"${FYPP_FLAGS}" "$<IF:$<CONFIG:Debug>,-DRECORD_PROPAGATION=True,-DRECORD_PROPAGATION=False>")
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
set(FYPP_BUILD_FLAGS "${FYPP_BUILD_FLAGS}" "-n")
endif()
if(WITH_FYPP)
find_program(FYPP fypp)
if(NOT FYPP)
message(fatal_error "Preprocessor fypp not found")
endif()
endif()
add_subdirectory(src)
add_subdirectory(examples)