forked from gangryunguh/bitcode-cgen-student-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
19 lines (14 loc) · 668 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
cmake_minimum_required(VERSION 3.15)
project(LLVMBitcodeGenerator)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "-fpermissive -g -O0 -DDEBUG")
set(CMAKE_BUILD_TYPE Debug)
set (CMAKE_PREFIX_PATH "/Users/uh/LLVM/llvm-project-12.0.1/llvm/cmake-build-llvm-build")
find_package(LLVM REQUIRED CONFIG)
add_definitions(${LLVM_DEFINITIONS})
include_directories(${LLVM_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
add_executable(cgen.exe quadreader.cpp misc.cpp sym.cpp bitcodegen.cpp
bitcodegen.h misc.h quad.h sym.h)
# Link against LLVM libraries
llvm_map_components_to_libnames(llvm_libs support core irreader native)
target_link_libraries(cgen.exe ${llvm_libs})