diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2018-10-22 15:42:49 +0200 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2019-07-30 14:49:24 +0100 |
commit | 2d6a5dd67f2fdc346e7ccba55643db30ecfd3a82 (patch) | |
tree | 0d2cf9668d84b080030e828bdd9fefad90490249 /README-CMake.md | |
parent | eef4fc08530f357cc49109dc738f1ab4c519a42c (diff) | |
download | klee-2d6a5dd67f2fdc346e7ccba55643db30ecfd3a82.tar.gz |
CMake: enable reuse of LLVM's googletest src and targets
Fixes an issue that occurs with USE_CMAKE_FIND_PACKAGE_LLVM=ON and LLVM compiled from sources, which then exports gtest and gtest_main targets. In case gtest and gtest_main targets are not imported from LLVM and GTEST_SRC_DIR is not set, CMake can now reuse the googletest sources from LLVM_BUILD_MAIN_SRC_DIR (if available) with USE_CMAKE_FIND_PACKAGE_LLVM=ON. This last limitation is due to LLVM making modifications to the CMakeLists.txt of googletest that requires add_llvm_library() from AddLLVM.cmake.
Diffstat (limited to 'README-CMake.md')
-rw-r--r-- | README-CMake.md | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/README-CMake.md b/README-CMake.md index 4deb8860..2687c86b 100644 --- a/README-CMake.md +++ b/README-CMake.md @@ -61,9 +61,11 @@ cmake -DCMAKE_BUILD_TYPE=Release /path/to/klee/src * `ENABLE_ZLIB` (BOOLEAN) - Enable zlib support. -* `GTEST_SRC_DIR` (STRING) - Path to GTest source tree. +* `GTEST_SRC_DIR` (STRING) - Path to Google Test source tree. If it is not + specified and `USE_CMAKE_FIND_PACKAGE_LLVM` is used, CMake will try to reuse + the version included within the LLVM source tree. -* `GTEST_INCLUDE_DIR` (STRING) - Path to GTest include directory, +* `GTEST_INCLUDE_DIR` (STRING) - Path to Google Test include directory, if it is not under `GTEST_SRC_DIR`. * `KLEE_ENABLE_TIMESTAMP` (BOOLEAN) - Enable timestamps in KLEE sources. @@ -81,6 +83,10 @@ cmake -DCMAKE_BUILD_TYPE=Release /path/to/klee/src only relevant if `USE_CMAKE_FIND_PACKAGE_LLVM` is `FALSE`. This is used to detect the LLVM version and find libraries. +* `LLVM_DIR` (STRING) - Path to `LLVMConfig.cmake`. This is only relevant if + `USE_CMAKE_FIND_PACKAGE_LLVM` is `TRUE`. This can be used to tell CMake where + it can find LLVM outside of standard directories. + * `MAKE_BINARY` (STRING) - Path to `make` binary used to build KLEE's runtime. * `metaSMT_DIR` (STRING) - Provides a hint to CMake, where the metaSMT constraint @@ -94,6 +100,6 @@ cmake -DCMAKE_BUILD_TYPE=Release /path/to/klee/src against STP in a build directory or an installed copy. * `USE_CMAKE_FIND_PACKAGE_LLVM` (BOOLEAN) - Use `find_package(LLVM CONFIG)` - to find LLVM. + to find LLVM (instead of using `llvm-config` with `LLVM_CONFIG_BINARY`). * `WARNINGS_AS_ERRORS` (BOOLEAN) - Treat warnings as errors when building KLEE. |