-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
50 lines (39 loc) · 1.16 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
38
39
40
41
42
43
44
45
46
47
48
49
50
# To build and run the tests:
#
# cmake -S . -B build
# cmake --build build
# cd build && ctest
cmake_minimum_required(VERSION 3.14)
project(Cpp)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_VERBOSE_MAKEFILE ON)
enable_testing()
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.5.3 # or a later release
)
FetchContent_MakeAvailable(Catch2)
include(Catch)
FetchContent_Declare(trompeloeil
URL https://github.com/rollbear/trompeloeil/archive/v42.zip)
FetchContent_MakeAvailable(trompeloeil)
add_subdirectory(C++98)
add_subdirectory(C++03)
add_subdirectory(libs)
add_subdirectory(googletest)
add_subdirectory(gmock)
add_subdirectory(catch2)
add_subdirectory(trompeloeil)