Skip to content

Commit 6964c8c

Browse files
committed
Use add_llvm_loadable_module
Can't get ordinary CMake add_library to work for whatever reason.
1 parent c754bf9 commit 6964c8c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
find_package(LLVM REQUIRED CONFIG)
22

3+
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
4+
include(AddLLVM)
5+
36
add_definitions(${LLVM_DEFINITIONS})
47
include_directories(${LLVM_INCLUDE_DIRS})
58

skeleton/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
add_library(SkeletonPass MODULE Skeleton.cpp)
1+
add_llvm_loadable_module(SkeletonPass
2+
# List your source files here.
3+
Skeleton.cpp
4+
)

0 commit comments

Comments
 (0)