-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
28 lines (23 loc) · 935 Bytes
/
CMakeLists.txt
File metadata and controls
28 lines (23 loc) · 935 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
set(CMAKE_MESSAGE_LOG_LEVEL WARNING)
set(CMAKE_RULE_MESSAGES OFF)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.5.1
)
FetchContent_MakeAvailable(Catch2) # Catch2::Catch2, Catch2::Catch2WithMain
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.2.1
)
FetchContent_MakeAvailable(fmt)
add_executable(tests codewars_reporter.cpp test_solution.cpp)
target_compile_features(tests PRIVATE cxx_std_20)
target_compile_options(tests PRIVATE -Wall -Wextra -O2)
# target_link_libraries(tests PRIVATE challenge Catch2::Catch2 m crypto dl sqlite3 tbb fmt Threads::Threads)
target_link_libraries(tests PRIVATE challenge Catch2::Catch2WithMain m dl fmt Threads::Threads)
# Not really necessary for CR, but allows running tests through CMake
add_test(NAME tests COMMAND tests)