-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (25 loc) · 942 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
cmake_minimum_required(VERSION 3.8)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
project(latte)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
"Choose the type of build, options are: Debug Release
RelWithDebInfo MinSizeRel."
FORCE)
message(STATUS "No build type selected, default to Debug")
set(CMAKE_BUILD_TYPE "Debug")
endif()
set(CMAKE_CXX_COMPILER "g++-7")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")# -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
#set(ENABLE_SANITIZERS ON)
if (ENABLE_SANITIZERS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
endif()
set(COMMON_INCLUDES ${PROJECT_SOURCE_DIR}/src)
set(LLVM_EXTERNAL_LIT "${PROJECT_SOURCE_DIR}/thirdparty/llvm/lit/lit.py")
add_subdirectory(thirdparty)
include(thirdparty/llvm/AddLLVM.cmake)
add_subdirectory(src)
add_subdirectory(Tests)