-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (36 loc) · 861 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
37
38
39
40
41
42
43
44
cmake_minimum_required(VERSION 3.14)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
set(CMAKE_CXX_STANDARD 20)
project(EXSES CXX)
add_executable(
exsi
src/main.cpp
src/Lexer.cpp
src/utils.cpp
src/Procedure.cpp
src/Token.cpp
src/Value.cpp
)
target_include_directories(exsi PUBLIC src)
target_compile_options(exsi PRIVATE
-Wall
-Wextra
-pedantic
-Werror=switch
-fdiagnostics-color=always
$<$<CONFIG:DEBUG>:-O0 -g3 -ggdb3 -DDEBUG>
$<$<CONFIG:RELEASE>:-O3>
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(exsi PRIVATE
-fcolor-diagnostics
)
endif()
target_link_options(exsi PRIVATE
$<$<CONFIG:DEBUG>:-O0 -g3 -ggdb3>
$<$<CONFIG:RELEASE>:-O3>
)