-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·84 lines (69 loc) · 2.06 KB
/
CMakeLists.txt
File metadata and controls
executable file
·84 lines (69 loc) · 2.06 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# ======================================================================
# artdaq-demo main build file
#
# cd .../path/to/build/directory
# source .../path/to/artdaq-demo/ups/setup_for_development
# buildtool
# ======================================================================
cmake_minimum_required (VERSION 3.19)
find_package(cetmodules 3.08.00 REQUIRED)
project(artdaq-demo VERSION 4.06.00)
include(CetCMakeEnv)
include(SetCompilerFlags)
include(InstallHeaders)
include(InstallSource)
include(InstallFhicl)
cet_cmake_env()
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
cet_set_compiler_flags(DIAGS VIGILANT
WERROR
NO_UNDEFINED
EXTRA_FLAGS -pedantic
)
# Debug streamer.
string(TOUPPER ${CMAKE_BUILD_TYPE} BTYPE_UC)
if(BTYPE_UC STREQUAL DEBUG)
add_definitions(-DDEBUGME)
if(DEFINED ENV{USE_ASAN})
if($ENV{USE_ASAN} GREATER 0)
message("!!! Address Sanitizer Activated!!!")
add_compile_options(-fsanitize=address -Wno-unused-command-line-argument)
add_link_options(-lasan)
endif()
endif()
if(DEFINED ENV{USE_TSAN})
if($ENV{USE_TSAN} GREATER 0)
message("!!! Thread Sanitizer Activated!!!")
add_compile_options(-fsanitize=thread -Wno-unused-command-line-argument)
add_link_options(-ltsan)
endif()
endif()
if(DEFINED ENV{USE_UBSAN})
if($ENV{USE_UBSAN} GREATER 0)
message("!!! \"Undefined Behavior\" Sanitizer Activated!!!")
add_compile_options(-fsanitize=undefined -Wno-unused-command-line-argument)
add_link_options(-lubsan)
endif()
endif()
if(DEFINED ENV{USE_GCOV})
add_compile_options(-fprofile-arcs -ftest-coverage --coverage)
add_link_options(--coverage)
endif()
endif()
#cet_report_compiler_flags()
find_package(artdaq-utilities 1.07.02 REQUIRED)
find_package(artdaq-core 3.08.04 REQUIRED)
find_package(artdaq 3.11.02 REQUIRED)
find_package(art 3.09.03 REQUIRED QUIET)
find_package(artdaq-core-demo 1.10.00 REQUIRED)
# source
add_subdirectory(artdaq-demo)
# testing
add_subdirectory(test)
# tools
add_subdirectory(tools)
# doc - Documentation
if (NOT DEFINED ENV{DISABLE_DOXYGEN})
add_subdirectory(doc)
endif()
cet_cmake_config()