-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
44 lines (34 loc) · 1.03 KB
/
Copy pathCMakeLists.txt
File metadata and controls
44 lines (34 loc) · 1.03 KB
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
cmake_minimum_required(VERSION 3.16)
include(GNUInstallDirs)
project(AM_exercise)
set(CMAKE_CXX_STANDARD 17)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
########################################################################
## Targets
########################################################################
add_executable(am_parser
src/am_parser.cc
src/AMParser.cc
src/AMScanner.cc
)
include_directories(
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
)
install(TARGETS am_parser
RUNTIME
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
set_target_properties(am_parser PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
)
########################################################################
## Sub-directory Targets
########################################################################
option(ENABLE_TEST "Build tests" OFF)
if (ENABLE_TEST)
add_subdirectory(unittests)
endif(ENABLE_TEST)