From dda296e09ee53ed85ccf1c3f08e7e809adce612e Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 18 Nov 2016 18:18:58 +0000 Subject: [CMake] Re-express LLVM and KLEE library dependencies as transitive dependencies on KLEE's libraries rather than on the final binaries. This is better because it means we can build other tools that use KLEE's libraries and not need to express the needed LLVM dependencies. It also makes it clearer what the dependencies are between KLEE libraries. This has illustrated a problem with the `kleeBasic` library. It contains `ConstructSolverChain.cpp` which clearly belongs in `kleaverSolver` not in `kleeBasic`. This will be fixed later. --- lib/Basic/CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/Basic') diff --git a/lib/Basic/CMakeLists.txt b/lib/Basic/CMakeLists.txt index 13f76d42..988a564e 100644 --- a/lib/Basic/CMakeLists.txt +++ b/lib/Basic/CMakeLists.txt @@ -12,3 +12,18 @@ klee_add_component(kleeBasic KTest.cpp Statistics.cpp ) +set(LLVM_COMPONENTS + support +) + +klee_get_llvm_libs(LLVM_LIBS ${LLVM_COMPONENTS}) +target_link_libraries(kleeBasic PUBLIC ${LLVM_LIBS}) + +target_link_libraries(kleeBasic PRIVATE + # FIXME: THIS IS STUPID. + # `ConstructSolverChain.cpp` should be in + # `kleaverSolver` not in in `kleeBasic`. + # We are creating a circular dependency because + # of this because `kleaverSolver` depends on `kleeBasic`. + kleaverSolver +) -- cgit 1.4.1