-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
25 lines (21 loc) · 1.01 KB
/
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
cmake_minimum_required(VERSION 3.12)
project("realtime_memory" VERSION 1.0.0
DESCRIPTION "A header-only backfill for some C++17 pmr memory resources suitable for realtime use."
HOMEPAGE_URL "https://github.com/cradleapps/memory_resources")
option(REALTIME_MEMORY_TESTS "Enable build of tests" ON)
#------------------------------------------------------------------
# Header-only library
#------------------------------------------------------------------
add_library(realtime_memory INTERFACE)
target_include_directories(realtime_memory INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_compile_features(realtime_memory INTERFACE cxx_std_17)
#------------------------------------------------------------------
# Tests
#------------------------------------------------------------------
if (REALTIME_MEMORY_TESTS)
message(STATUS "realtime_memory adding tests...")
enable_testing()
add_subdirectory(tests "${CMAKE_BINARY_DIR}/tests")
add_test(realtime_memory tests/realtime_memory_tests)
endif()