diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2020-12-03 11:43:02 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-12-04 21:05:57 +0000 |
commit | 199bd43deffc614b2915f4de26475ca43d22e2ae (patch) | |
tree | 395276ea008407f9902eb0e0817b7df5f1020c31 /CMakeLists.txt | |
parent | f9b7c9032db07ba2d811c3bf16a100cc3adfc67e (diff) | |
download | klee-199bd43deffc614b2915f4de26475ca43d22e2ae.tar.gz |
Only build 32bit runtime libraries if supported by platform
Automatically detect if 32bit bitcode files can be built. In this case, build runtime library with 32bit as well.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ba1e221b..3427a6bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -486,6 +486,14 @@ set_property(CACHE PROPERTY STRINGS ${available_klee_runtime_build_types}) message(STATUS "KLEE_RUNTIME_BUILD_TYPE: ${KLEE_RUNTIME_BUILD_TYPE}") +# Check availability of 32bit support for platform +include(CheckCSourceRuns) +cmake_push_check_state() +set(CMAKE_REQUIRED_FLAGS "-m32") +check_c_source_runs("int main(int argc, char** argv){return 0;}" M32_SUPPORTED) +cmake_pop_check_state() +message(STATUS "32bit platform supported: ${M32_SUPPORTED}") + set(KLEE_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/klee/runtime") # Location where KLEE will look for the built runtimes by default. |