-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (31 loc) · 944 Bytes
/
CMakeLists.txt
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
28
29
30
31
32
33
34
35
36
37
set(common-sources
error_extension.f90)
set(examples
catch_error
catch_error_class
fail_uncaught
fail_uncaught_class
ignore_unactivated
propagate_error
rethrow_error)
set(fypp-examples
catch_error_fypp
catch_error_class_fypp
fail_uncaught_fypp
fail_uncaught_class_fypp
propagate_error_fypp
rethrow_error_fypp)
add_library(common OBJECT ${common-sources})
target_link_libraries(common errorfx)
foreach(example IN LISTS examples)
add_executable(${example} ${example}.f90)
target_link_libraries(${example} PRIVATE errorfx common)
endforeach()
if(WITH_FYPP)
foreach(fypp-example IN LISTS fypp-examples)
preprocess(
"${FYPP}" "${FYPP_BUILD_FLAGS}" "fpp" "f90" "${fypp-example}.fpp" fypp-example-f90)
add_executable(${fypp-example} ${fypp-example-f90})
target_link_libraries(${fypp-example} PRIVATE errorfx common)
endforeach()
endif()