forked from EPFL-CS-472/kitty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (33 loc) · 878 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
cmake_minimum_required(VERSION 3.1)
project(kitty LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
# Options
option(KITTY_EXAMPLES "Build examples" ON)
option(KITTY_BENCH "Build benchmarks" OFF)
option(KITTY_TEST "Build tests" OFF)
option(KITTY_TIDY "Check code with clang-tidy" OFF)
# some specific compiler definitions
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-fcolor-diagnostics" HAS_FCOLOR_DIAGNOSTICS)
if (HAS_FCOLOR_DIAGNOSTICS)
add_compile_options(-fcolor-diagnostics)
endif()
if (UNIX)
add_compile_options(-W -Wall)
else()
add_compile_options(/EHsc /MTd)
endif()
add_subdirectory(include)
add_subdirectory(lib)
if(KITTY_EXAMPLES)
add_subdirectory(examples)
endif()
if(KITTY_BENCH)
add_subdirectory(bench EXCLUDE_FROM_ALL)
endif()
if(KITTY_TEST)
add_subdirectory(test)
endif()
if(KITTY_TIDY)
add_subdirectory(tidy EXCLUDE_FROM_ALL)
endif()