-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (50 loc) · 1.47 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
54
55
56
cmake_minimum_required(VERSION 3.10)
project(
monkey_compiler
LANGUAGES CXX
VERSION 1.0)
include(CheckIPOSupported)
check_ipo_supported(RESULT supported OUTPUT output)
if(supported)
message(STATUS "IPO / LTO enabled")
else()
message(STATUS "IPO / LTO not supported")
endif()
option(${PROJECT_NAME}_ENABLE_PARSE_TRACING "Specify if parsing tracing should be active" OFF)
option(${PROJECT_NAME}_ENABLE_TESTING "Specify if parsing testing should be enabled" ON)
include(FetchContent)
FetchContent_Declare(
range-v3
GIT_REPOSITORY https://github.com/ericniebler/range-v3.git
GIT_TAG master)
FetchContent_MakeAvailable(range-v3)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG master)
FetchContent_MakeAvailable(fmt)
FetchContent_Declare(
magic_enum
GIT_REPOSITORY https://github.com/Neargye/magic_enum.git
GIT_TAG master)
FetchContent_MakeAvailable(magic_enum)
if(${PROJECT_NAME}_ENABLE_TESTING)
set(gtest_force_shared_crt
ON
CACHE BOOL "" FORCE)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG main)
FetchContent_MakeAvailable(googletest)
endif()
FetchContent_Declare(
find_fs
GIT_REPOSITORY https://github.com/t1h0n/cpp_find_fs.git
GIT_TAG main)
FetchContent_MakeAvailable(find_fs)
add_subdirectory(lib)
add_subdirectory(apps)
if(${PROJECT_NAME}_ENABLE_TESTING)
add_subdirectory(test)
endif()