-
Notifications
You must be signed in to change notification settings - Fork 71
/
CMakeLists.txt
51 lines (40 loc) · 1.33 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
# set the minimum cmake version to generate projects.
cmake_minimum_required(VERSION 3.14)
project(
AwesomeCppCourse
LANGUAGES CXX
VERSION 0.0.1 # todo: get this version from git tag
)
# set output folder
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)
# ---- Add dependencies via CPM ----
# see https://github.com/TheLartians/CPM.cmake for more info
include(cmake/get_cpm.cmake)
# include sanitizers
include(cmake/tools.cmake)
# check if we are target compiling to web
if(EMSCRIPTEN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Oz -s WASM=2")
endif()
CPMAddPackage("gh:onqtam/[email protected]")
# options to what include and use
OPTION(ENABLE_INTRO "ENABLE_INTRO" ON)
IF(ENABLE_INTRO)
set(CMAKE_CXX_STANDARD 20)
add_subdirectory(docs/intro)
endif()
# options to what include and use
OPTION(ENABLE_ADVANCED_CPP "ENABLE_ADVANCED_CPP" ON)
IF(ENABLE_ADVANCED_CPP)
set(CMAKE_CXX_STANDARD 20)
add_subdirectory(docs/advanced)
endif()
# todo: do the same for the other topics
OPTION(ENABLE_DOCUMENTATION "ENABLE_DOCUMENTATION" OFF)
IF(ENABLE_DOCUMENTATION)
add_subdirectory(documentation)
ENDIF()
CPMAddPackage("gh:TheLartians/[email protected]")
add_subdirectory(docs/artificialintelligence)