-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (22 loc) · 830 Bytes
/
CMakeLists.txt
File metadata and controls
32 lines (22 loc) · 830 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
28
29
30
31
32
cmake_minimum_required(VERSION 3.6)
project (CppTimer
DESCRIPTION "Wrapper for Linux timers"
LANGUAGES CXX)
set (CMAKE_CXX_STANDARD 17)
add_compile_options(-Wall -Wconversion -Wextra -pedantic)
include(GNUInstallDirs)
enable_testing()
add_library(cpptimer INTERFACE)
add_executable(demo demo.cpp)
TARGET_LINK_LIBRARIES(demo cpptimer pthread)
add_executable(demo_callbackinterface demo_callbackinterface.cpp)
TARGET_LINK_LIBRARIES(demo_callbackinterface cpptimer pthread)
add_executable(demo_stdfunccallback demo_stdfunccallback.cpp)
TARGET_LINK_LIBRARIES(demo_stdfunccallback cpptimer pthread)
add_subdirectory(test)
set_target_properties(cpptimer PROPERTIES
PUBLIC_HEADER CppTimer.h)
install(TARGETS cpptimer
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)