-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
64 lines (55 loc) · 1.71 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
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 3.11)
project(spoofy LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif(CCACHE_FOUND)
IF(NOT CMAKE_BUILD_TYPE)
MESSAGE(STATUS "Setting build type to 'RelWithDebInfo'.")
SET(CMAKE_BUILD_TYPE RelWithDebInfo)
ELSE(NOT CMAKE_BUILD_TYPE)
MESSAGE(STATUS "Using specified '${CMAKE_BUILD_TYPE}' build type.")
ENDIF(NOT CMAKE_BUILD_TYPE)
include(FetchContent)
FetchContent_Declare(
cclap
GIT_REPOSITORY https://github.com/adriancostin6/cclap.git
)
FetchContent_Declare(
libtins
GIT_REPOSITORY https://github.com/mfontanini/libtins.git
)
FetchContent_Declare(
librdkafka
GIT_REPOSITORY https://github.com/edenhill/librdkafka.git
)
FetchContent_Declare(
rapidjson
GIT_REPOSITORY https://github.com/Tencent/rapidjson.git
)
if (SPOOFY_FETCH_DEPS)
message(STATUS "Fetching cclap...")
FetchContent_MakeAvailable(cclap)
message(STATUS "Fetching libtins...")
FetchContent_MakeAvailable(libtins)
message(STATUS "Fetching librdkafka...")
FetchContent_MakeAvailable(librdkafka)
message(STATUS "Fetching rapidjson...")
FetchContent_MakeAvailable(rapidjson)
endif()
if (SPOOFY_BUILD_TESTS)
include(FetchContent)
FetchContent_Declare(
catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.0-preview4
)
message(STATUS "Fetching Catch2...")
FetchContent_MakeAvailable(catch2)
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
include (CTest)
include (Catch)
endif()
add_subdirectory(src)