diff options
| author | MartinNowack <martin.nowack@gmail.com> | 2017-07-25 15:51:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-25 15:51:46 +0200 |
| commit | 3b4b79215b124cc7072e81bc79efdb76927e7100 (patch) | |
| tree | 57b5659661145d6987774d0a7ef4e66993aacc60 /CMakeLists.txt | |
| parent | 810f7ebd99a06c46d632b1289ef2a7a3335d48f4 (diff) | |
| parent | df899b02e279ed65dc94f55d4b671560f667497b (diff) | |
| download | klee-3b4b79215b124cc7072e81bc79efdb76927e7100.tar.gz | |
Merge pull request #726 from delcypher/cmake_fix_llvm_built_with_no_asserts
[CMake] Handle building against LLVM built without assertions
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b9d7e61a..e066b89e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -224,6 +224,21 @@ else() unset(ENABLE_KLEE_DEBUG) # for config.h endif() +# Warn about mixing build types. +# This is likely a bad idea because some of LLVM's header files use the NDEBUG +# macro which can change things like data layout. +if (LLVM_ENABLE_ASSERTIONS AND (NOT ENABLE_KLEE_ASSERTS)) + message(WARNING + "LLVM was built with assertions but KLEE will be built without them.\n" + "This might lead to unexpected behaviour." + ) +elseif ((NOT LLVM_ENABLE_ASSERTIONS) AND ENABLE_KLEE_ASSERTS) + message(WARNING + "LLVM was built without assertions but KLEE will be built with them.\n" + "This might lead to unexpected behaviour." + ) +endif() + if (LLVM_ENABLE_VISIBILITY_INLINES_HIDDEN) list(APPEND KLEE_COMPONENT_CXX_FLAGS "-fvisibility-inlines-hidden") endif() |
