-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
30 lines (21 loc) · 999 Bytes
/
CMakeLists.txt
File metadata and controls
30 lines (21 loc) · 999 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
# 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 ( intro_generic_programming LANGUAGES CXX )
# add executable
add_executable ( intro_generic_programming_test intro_generic_programming_test.cpp )
target_compile_features ( intro_generic_programming_test PRIVATE cxx_std_20 )
# add dependencies
include ( ../../cmake/download_cpm.cmake )
CPMAddPackage ( "gh:catchorg/[email protected]" )
CPMAddPackage ( "gh:TimQuelch/decimal#1.0.0" )
# link dependencies
target_link_libraries ( intro_generic_programming_test PRIVATE decimal Catch2::Catch2WithMain )
enable_testing()
add_test ( NAME run_intro_generic_programming_test COMMAND intro_generic_programming_test )
set_tests_properties ( run_intro_generic_programming_test
PROPERTIES PASS_REGULAR_EXPRESSION "All tests passed"
)