-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (24 loc) · 1015 Bytes
/
CMakeLists.txt
File metadata and controls
34 lines (24 loc) · 1015 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
33
# Copyright (c) 2024-2025 by Cliff Green
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
cmake_minimum_required ( VERSION 3.14 FATAL_ERROR )
# create project
project ( periodic_timer_test LANGUAGES CXX )
# add executable
add_executable ( periodic_timer_test periodic_timer_test.cpp )
target_compile_features ( periodic_timer_test PRIVATE cxx_std_20 )
# add dependencies
include ( ../cmake/download_cpm.cmake )
CPMAddPackage ( "gh:catchorg/Catch2@3.11.0" )
set ( CMAKE_THREAD_PREFER_PTHREAD TRUE )
set ( THREADS_PREFER_PTHREAD_FLAG TRUE )
find_package ( Threads REQUIRED )
# link dependencies
target_link_libraries ( periodic_timer_test PRIVATE
Threads::Threads periodic_timer asio Catch2::Catch2WithMain )
enable_testing()
add_test ( NAME run_periodic_timer_test COMMAND periodic_timer_test )
set_tests_properties ( run_periodic_timer_test
PROPERTIES PASS_REGULAR_EXPRESSION "All tests passed"
)