about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/CMakeLists.txt63
1 files changed, 44 insertions, 19 deletions
diff --git a/lib/Core/CMakeLists.txt b/lib/Core/CMakeLists.txt
index 05e2cffa..86ce3cfc 100644
--- a/lib/Core/CMakeLists.txt
+++ b/lib/Core/CMakeLists.txt
@@ -7,23 +7,48 @@
 #
 #===------------------------------------------------------------------------===#
 klee_add_component(kleeCore
-	AddressSpace.cpp
-	CallPathManager.cpp
-	Context.cpp
-	CoreStats.cpp
-	ExecutionState.cpp
-	Executor.cpp
-	ExecutorTimers.cpp
-	ExecutorUtil.cpp
-	ExternalDispatcher.cpp
-	ImpliedValue.cpp
-	Memory.cpp
-	MemoryManager.cpp
-	PTree.cpp
-	Searcher.cpp
-	SeedInfo.cpp
-	SpecialFunctionHandler.cpp
-	StatsTracker.cpp
-	TimingSolver.cpp
-	UserSearcher.cpp
+  AddressSpace.cpp
+  CallPathManager.cpp
+  Context.cpp
+  CoreStats.cpp
+  ExecutionState.cpp
+  Executor.cpp
+  ExecutorTimers.cpp
+  ExecutorUtil.cpp
+  ExternalDispatcher.cpp
+  ImpliedValue.cpp
+  Memory.cpp
+  MemoryManager.cpp
+  PTree.cpp
+  Searcher.cpp
+  SeedInfo.cpp
+  SpecialFunctionHandler.cpp
+  StatsTracker.cpp
+  TimingSolver.cpp
+  UserSearcher.cpp
+)
+
+# TODO: Work out what the correct LLVM components are for
+# kleeCore.
+set(LLVM_COMPONENTS
+  core
+  support
+)
+
+if ("${LLVM_PACKAGE_VERSION}" VERSION_EQUAL "3.6" OR
+    "${LLVM_PACKAGE_VERSION}" VERSION_GREATER "3.6")
+  list(APPEND LLVM_COMPONENTS mcjit executionengine native)
+else()
+  list(APPEND LLVM_COMPONENTS jit engine)
+endif()
+
+
+klee_get_llvm_libs(LLVM_LIBS ${LLVM_COMPONENTS})
+target_link_libraries(kleeCore PUBLIC ${LLVM_LIBS})
+target_link_libraries(kleeCore PRIVATE
+  kleeBasic
+  kleeModule
+  kleaverSolver
+  kleaverExpr
+  kleeSupport
 )