-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
38 lines (28 loc) · 1.22 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
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright (c) 2024 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 ( wait_queue_test LANGUAGES CXX )
# add executable
add_executable ( wait_queue_test wait_queue_test.cpp )
target_compile_features ( wait_queue_test PRIVATE cxx_std_20 )
# add dependencies
include ( ../cmake/download_cpm.cmake )
CPMAddPackage ( "gh:catchorg/Catch2@3.8.0" )
CPMAddPackage ( "gh:martinmoene/ring-span-lite@0.7.0" )
# CPMAddPackage ( "gh:JustasMasiulis/circular_buffer@master" )
CPMAddPackage ( NAME circular_buffer
URL https://github.com/JustasMasiulis/circular_buffer/archive/refs/heads/master.zip )
set ( CMAKE_THREAD_PREFER_PTHREAD TRUE )
set ( THREADS_PREFER_PTHREAD_FLAG TRUE )
find_package ( Threads REQUIRED )
# link dependencies
target_link_libraries ( wait_queue_test PRIVATE
Threads::Threads wait_queue ring-span-lite circular_buffer Catch2::Catch2WithMain )
enable_testing()
add_test ( NAME run_wait_queue_test COMMAND wait_queue_test )
set_tests_properties ( run_wait_queue_test
PROPERTIES PASS_REGULAR_EXPRESSION "All tests passed"
)