-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (33 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.20)
project(HotBlockPrediction)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "")
set(LLVM_INSTALL_DIR "" CACHE PATH "LLVM installation directory")
set(LLVM_CMAKE_CONFIG_DIR "" "${LLVM_INSTALL_DIR}/lib/cmake/llvm/")
list(APPEND CMAKE_PREFIX_PATH "${LLVM_CMAKE_CONFIG_DIR}")
find_package(LLVM REQUIRED CONFIG)
include_directories(${LLVM_INCLUDE_DIRS})
if(NOT LLVM_ENABLE_RTTI)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
endif()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
add_library(HotBlockRandom MODULE
lib/HBPRandom.cpp
lib/HBPRandomPlugin.cpp
)
add_library(HotBlockNested MODULE
lib/HBPNested.cpp
lib/HBPNestedPlugin.cpp
)
add_library(HotBlockPredictor MODULE
lib/HBPPredictor.cpp
lib/HBPPredictorPlugin.cpp
)
target_include_directories(HotBlockRandom PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)
target_include_directories(HotBlockNested PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)
target_include_directories(HotBlockPredictor PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)