-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (22 loc) · 1013 Bytes
/
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
cmake_minimum_required(VERSION 3.24)
cmake_policy(SET CMP0091 NEW)
project(ProjectEuler)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if (VCPKG_TARGET_TRIPLET MATCHES "-static$")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
find_package(GTest REQUIRED)
add_executable(Problem0001Test tests/Problem0001Test.cpp)
add_executable(Problem0006Test tests/Problem0006Test.cpp)
add_executable(Problem0009Test tests/Problem0009Test.cpp)
target_link_libraries(Problem0001Test PRIVATE GTest::gtest GTest::gtest_main)
target_link_libraries(Problem0006Test PRIVATE GTest::gtest GTest::gtest_main)
target_link_libraries(Problem0009Test PRIVATE GTest::gtest GTest::gtest_main)
enable_testing()
add_test(NAME Problem0001 COMMAND Problem0001Test)
add_test(NAME Problem0006 COMMAND Problem0006Test)
add_test(NAME Problem0009 COMMAND Problem0009Test)