diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2020-09-04 22:04:57 +0200 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2020-10-12 11:19:24 +0100 |
commit | 9c445a83bc03ca4a0335e98704feee44183831a6 (patch) | |
tree | 868034bc5ed0406a6bced20f30340146ca079b50 /CMakeLists.txt | |
parent | e94d9c6268cb75ff317a42e26f33c419e6686b5d (diff) | |
download | klee-9c445a83bc03ca4a0335e98704feee44183831a6.tar.gz |
Exception handling only for LLVM >= 8.0.0
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 916c2d74..1fa4fcc6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -705,6 +705,28 @@ else() endif() ################################################################################ +# KLEE Exception Handling Support for C++ +################################################################################ +option(ENABLE_KLEE_EH_CXX "Enable support for C++ Exceptions" OFF) +if (ENABLE_KLEE_EH_CXX) + if (NOT ENABLE_KLEE_LIBCXX) + message(FATAL_ERROR "C++ Exception support requires klee-libcxx." + "Pass `-DENABLE_KLEE_LIBCXX=ON` to enable it.") + endif() + + if (${LLVM_VERSION_MAJOR} GREATER 8 OR ${LLVM_VERSION_MAJOR} EQUAL 8) + set(SUPPORT_KLEE_EH_CXX 1) # For config.h + message(STATUS "Support for C++ Exceptions enabled") + else() + set(SUPPORT_KLEE_EH_CXX 0) # For config.h + message(STATUS "Support for C++ Exceptions (only available for LLVM >= 8.0.0) disabled") + endif() + +else() + set(SUPPORT_KLEE_EH_CXX 0) # For config.h +endif() + +################################################################################ # Sanitizer support ################################################################################ message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") |