-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (37 loc) · 1.16 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
#-----------------------------------------
# CMake setup
#-----------------------------------------
cmake_minimum_required (VERSION 3.9.2)
project (amps VERSION 0.0
DESCRIPTION "Text Template Engine"
LANGUAGES CXX)
#-----------------------------------------
# C++ compiler setup
#-----------------------------------------
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra")
endif()
#-----------------------------------------
# Not sure if I'll keep this
#-----------------------------------------
configure_file (
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_SOURCE_DIR}/include/config.h"
)
#-----------------------------------------
# Setup main directories
#-----------------------------------------
add_subdirectory(sample)
add_subdirectory(src)
#-----------------------------------------
# Setup main directories
#-----------------------------------------
option(enable-test "enable-test" OFF)
if (enable-test)
enable_testing()
add_subdirectory(test)
endif(enable-test)