-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
33 lines (27 loc) · 980 Bytes
/
CMakeLists.txt
File metadata and controls
33 lines (27 loc) · 980 Bytes
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
cmake_minimum_required(VERSION 3.10)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as default")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()
option(ENABLE_ASAN "Enable AddressSanitizer" OFF)
if(ENABLE_ASAN)
message(STATUS "AddressSanitizer enabled")
add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
add_link_options(-fsanitize=address)
endif()
project(cppchroma VERSION 1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
include(cmake/re2.cmake)
include(cmake/yamlcpp.cmake)
include_directories(include)
add_executable(cppchroma
src/colorizedoutput.cpp
src/config.cpp
src/cppchroma.cpp
)
target_compile_options(cppchroma PRIVATE -W -Wall -Wextra -g)
target_link_libraries(cppchroma PRIVATE re2::re2 yaml-cpp::yaml-cpp absl::log absl::log_initialize util)
# Add tests
enable_testing()
add_subdirectory(tests)