-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
51 lines (37 loc) · 1.23 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
48
49
50
cmake_minimum_required(VERSION 3.14.7) # FetchContent
cmake_policy(SET CMP0077 NEW)
cmake_policy(SET CMP0079 NEW)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
project(Taffo)
set(BUILD_SHARED_LIBS OFF)
include(TaffoOptions)
include(TaffoFetchDeps)
find_package(LLVM REQUIRED CONFIG)
add_definitions(${LLVM_DEFINITIONS})
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
include_directories(${LLVM_INCLUDE_DIRS})
include(AddLLVM)
include(LLVMConfig)
include(HandleLLVMOptions)
if ((${LLVM_VERSION_MAJOR} LESS 14) OR (${LLVM_VERSION_MAJOR} GREATER 15))
message(FATAL_ERROR "LLVM version ${LLVM_VERSION_MAJOR} is not supported!")
endif ()
# to be kept in sync with LLVM!
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#set(CMAKE_CXX_CLANG_TIDY "clang-tidy-10;")
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-covered-switch-default)
# build & install all tools by default
set(LLVM_BUILD_TOOLS ON)
# fix add_llvm_tool on macOS+Xcode
set(LLVM_MAIN_SRC_DIR ${CMAKE_SOURCE_DIR})
enable_testing()
include_directories(lib)
add_subdirectory(lib)
add_subdirectory(utils)
add_subdirectory(test-lit)
add_subdirectory(test)
add_subdirectory(tool)
if (TAFFO_UNITTESTS)
add_subdirectory(unittests)
endif()