about summary refs log tree commit diff homepage
path: root/lib/Module/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Module/CMakeLists.txt')
-rw-r--r--lib/Module/CMakeLists.txt35
1 files changed, 25 insertions, 10 deletions
diff --git a/lib/Module/CMakeLists.txt b/lib/Module/CMakeLists.txt
index a952ed17..22fd3c07 100644
--- a/lib/Module/CMakeLists.txt
+++ b/lib/Module/CMakeLists.txt
@@ -7,14 +7,29 @@
 #
 #===------------------------------------------------------------------------===#
 klee_add_component(kleeModule
-	Checks.cpp
-	InstructionInfoTable.cpp
-	IntrinsicCleaner.cpp
-	KInstruction.cpp
-	KModule.cpp
-	LowerSwitch.cpp
-	ModuleUtil.cpp
-	Optimize.cpp
-	PhiCleaner.cpp
-	RaiseAsm.cpp
+  Checks.cpp
+  InstructionInfoTable.cpp
+  IntrinsicCleaner.cpp
+  KInstruction.cpp
+  KModule.cpp
+  LowerSwitch.cpp
+  ModuleUtil.cpp
+  Optimize.cpp
+  PhiCleaner.cpp
+  RaiseAsm.cpp
 )
+
+set(LLVM_COMPONENTS
+  bitreader
+  bitwriter
+  ipo
+  linker
+  support
+)
+
+if ("${LLVM_PACKAGE_VERSION}" VERSION_EQUAL "3.3" OR
+    "${LLVM_PACKAGE_VERSION}" VERSION_GREATER "3.3")
+  list(APPEND LLVM_COMPONENTS irreader)
+endif()
+klee_get_llvm_libs(LLVM_LIBS ${LLVM_COMPONENTS})
+target_link_libraries(kleeModule PUBLIC ${LLVM_LIBS})