-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
36 lines (29 loc) · 944 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
32
33
34
35
36
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if (MSVC)
# warning level 4
add_compile_options(/W4)
else()
# additional warnings
add_compile_options(-g -Wall -Wextra -Wpedantic)
endif()
# Install Catch2
Include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.1 # or a later release
)
FetchContent_MakeAvailable(Catch2)
file(GLOB test_sources tests/*.cc src/util.cc src/events.cc src/data_handler.cc src/config.cc)
list(REMOVE_ITEM test_sources src/main.cc )
add_executable(tests ${test_sources})
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)
# Actual Project
project(mercury VERSION 1.0)
include_directories(include)
file(GLOB sources src/*.cc src/strategies/*.cc)
add_executable(mercury ${sources})