-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (27 loc) · 881 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.11.0)
set(CXX_TARGET_FLAGS -O3 -march=native -Wall -Wextra -Wpedantic -pedantic -pedantic-errors)
project (AdventOfCode2018 CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED On)
set(CMAKE_CXX_EXTENSIONS On)
set(CMAKE_EXPORT_COMPILE_COMMANDS On)
set(CMAKE_BUILD_TYPE Release)
set(THREADS_PREFER_PTHREAD_FLAG On)
find_package(Threads REQUIRED)
include(FetchContent)
set(RANGE_V3_NO_HEADER_CHECK On)
set(RANGES_CXX_STD 17)
set(BUILD_TESTING Off)
set(RANGE_V3_TESTS Off)
set(RANGE_V3_DOCS Off)
FetchContent_Declare(
range_v3
GIT_REPOSITORY https://github.com/ericniebler/range-v3.git
GIT_TAG 0.4.0)
FetchContent_GetProperties(range_v3)
if(NOT range_v3_POPULATED)
FetchContent_Populate(range_v3)
add_subdirectory(${range_v3_SOURCE_DIR} ${range_v3_BINARY_DIR})
endif()
include_directories(include)
add_subdirectory(src)