Skip to content

Commit

Permalink
Add llvm linkage in CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
solar-mist committed Jul 6, 2023
1 parent e7947cf commit 9c150f7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ cmake_minimum_required (VERSION 3.26)

project (viper)

find_package(LLVM REQUIRED CONFIG)
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
llvm_map_components_to_libnames(llvm_libs -15)
link_libraries(${llvm_libs})

message(STATUS ${llvm_libs})

include_directories(framework/include)
set(CMAKE_BUILD_TYPE Debug)

Expand All @@ -20,6 +28,7 @@ file(GLOB viper_tests_sources tests/src/main.cpp tests/src/Test.cpp
add_executable(viper_tests ${viper_tests_sources})

target_compile_features(viper_framework PUBLIC cxx_std_20)
target_link_libraries(viper_framework ${LLVM_LIBRARIES})

target_link_libraries(viper LINK_PUBLIC viper_framework)
target_compile_features(viper PUBLIC cxx_std_20)
Expand Down

0 comments on commit 9c150f7

Please sign in to comment.