-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
35 lines (26 loc) · 1.14 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
cmake_minimum_required(VERSION 3.5)
set(MODERN_CPP_DESC "Modern C++ by example code")
project(ModernCPP LANGUAGES CXX VERSION 0.1.0 DESCRIPTION ${MODERN_CPP_DESC})
set(PROJECT_APPLICATION_NAME "Modern C++")
set(PROJECT_ORGANISATION_NAME till213)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Platform identifiers
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/tutorials/How-To-Write-Platform-Checks
string(COMPARE EQUAL "Windows" ${CMAKE_SYSTEM_NAME} PLATFORM_IS_WINDOWS)
string(COMPARE EQUAL "Darwin" ${CMAKE_SYSTEM_NAME} PLATFORM_IS_MACOS)
string(COMPARE EQUAL "Linux" ${CMAKE_SYSTEM_NAME} PLATFORM_IS_LINUX)
message(STATUS PLATFORM="${CMAKE_SYSTEM_NAME}")
# Definitions
# Debug output
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
add_definitions(-DDEBUG)
endif()
# Example code
add_subdirectory(${CMAKE_SOURCE_DIR}/src/language)
add_subdirectory(${CMAKE_SOURCE_DIR}/src/templates)
# Documentation
add_subdirectory(${CMAKE_SOURCE_DIR}/doc)