forked from abenkhadra/llvm-pass-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 66
/
CMakeLists.txt
26 lines (22 loc) · 832 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
cmake_minimum_required(VERSION 3.4)
project(llvm-pass-tutorial)
# we need LLVM_HOME in order not automatically set LLVM_DIR
if(NOT DEFINED ENV{LLVM_HOME})
message(FATAL_ERROR "$LLVM_HOME is not defined")
else ()
set(ENV{LLVM_DIR} $ENV{LLVM_HOME}/lib64/cmake/llvm)
endif()
find_package(LLVM REQUIRED CONFIG)
add_definitions(${LLVM_DEFINITIONS})
include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})
if (${LLVM_VERSION_MAJOR} VERSION_GREATER_EQUAL 10)
set(CMAKE_CXX_STANDARD 14)
endif ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
include_directories($ENV{LLVM_HOME}/include/c++v1)
set(CMAKE_SKIP_RPATH ON)
# add_subdirectory(skeleton) # Use your pass name here.
# add_subdirectory(ollvm) # ollvm
add_subdirectory(Hikari) # Hikari
# add_subdirectory(Armariris) # Armariris