-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
43 lines (36 loc) · 1.13 KB
/
CMakeLists.txt
File metadata and controls
43 lines (36 loc) · 1.13 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
cmake_minimum_required(VERSION 3.8)
project(metricq-sink-scorep LANGUAGES CXX)
include(cmake/DefaultBuildType.cmake)
include(cmake/GitSubmoduleUpdate.cmake)
git_submodule_update()
# We're building a shared library. D'oh.
set(NITRO_POSITION_INDEPENDENT_CODE ON CACHE INTERNAL "")
set(METRICQ_POSITION_INDEPENDENT_CODE ON CACHE INTERNAL "")
add_subdirectory(lib)
option(METRICQ_ADVANCED_TIMESYNC "Use advanced time sync capability (needs FFTW3)" OFF)
add_library(metricq_plugin
MODULE
src/main.cpp
)
target_compile_features(metricq_plugin PRIVATE cxx_std_17)
target_link_libraries(metricq_plugin
PRIVATE
Scorep::scorep-plugin-cxx
metricq::sink
metricq::logger-nitro
)
if(METRICQ_ADVANCED_TIMESYNC)
find_package(FFTW3 REQUIRED)
target_link_libraries(metricq_plugin PRIVATE FFTW3::fftw3)
target_compile_definitions(metricq_plugin PRIVATE ENABLE_TIME_SYNC)
target_sources(metricq_plugin
PRIVATE
src/timesync/timesync.cpp
src/timesync/footprint.cpp
src/timesync/shifter.cpp
)
endif()
install(
TARGETS metricq_plugin
LIBRARY DESTINATION lib
)