-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
47 lines (35 loc) · 1.07 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
43
44
45
46
47
cmake_minimum_required(VERSION 3.7)
project(tyr)
# Version
set(tyr_VERSION_MAJOR 0)
set(tyr_VERSION_MINOR 1)
set(tyr_VERSION_PATCH 0)
set(tyr_VERSION ${tyr_VERSION_MAJOR}.${tyr_VERSION_MINOR}.${tyr_VERSION_PATCH})
# CMake compiler setup
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(LLVM_VERSION 8)
include(FindLLVM)
# Setup for clang-format
set(ALL_CXX_SOURCE_FILES "")
# Add the subdirectories
add_subdirectory(lib/compiler)
add_subdirectory(lib/tools)
option(BUILD_TESTS "Build the tests" ON)
if (BUILD_TESTS)
enable_testing()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -V)
include(AddGTest)
add_subdirectory(lib/test)
endif(BUILD_TESTS)
option(BUILD_INTEGRATION_TESTS "Build the integration tests" ON)
if (BUILD_INTEGRATION_TESTS)
add_subdirectory(test)
endif (BUILD_INTEGRATION_TESTS)
option(BUILD_EXAMPLES "Build the examples" ON)
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif (BUILD_EXAMPLES)
include(FindClangFormat)