-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (47 loc) · 1.37 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
51
52
53
cmake_minimum_required(VERSION 3.25)
project(KrystalBall VERSION 0.1
DESCRIPTION "Simulation Framework"
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# include some required dependencies
include(FetchContent)
#FetchContent_Declare(
# googletest
# GIT_REPOSITORY https://github.com/google/googletest.git
# GIT_TAG origin/main
#)
#FetchContent_Declare(
# abseil
# GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
# GIT_TAG origin/master
#)
FetchContent_Declare(
statusmacros
GIT_REPOSITORY https://github.com/choward1491/status_macros.git
GIT_TAG origin/main
)
FetchContent_MakeAvailable(
#googletest
statusmacros
#abseil
)
find_package(absl REQUIRED)
find_package(GTest REQUIRED)
# include headers
include_directories(
src/
${absl_INCLUDE_DIRS}
${statusmacros_SOURCE_DIR}
${googletest_SOURCE_DIR}/googletest/include
${googletest_SOURCE_DIR}/googlemock/include
)
# add testing, if possible
option(PACKAGE_TESTS "Build the tests" ON)
if(PACKAGE_TESTS)
enable_testing()
include(GoogleTest)
add_subdirectory(tests)
endif()
# add the subdirectories with stuff to be built
add_subdirectory(src)