KLEE now has a CMake build system which is intended to replace its autoconf/Makefile based build system.
check
- Build and run all tests.clean
- Invoke CMake's built-in target to clean the build tree. Note this won't invoke theclean_*
targets. It is advised that theclean_all
target is used instead.clean_all
- Run all clean targets.clean_doxygen
- Clean doxygen build tree.clean_runtime
- Clean the runtime build tree.docs
- Build documentationedit_cache
- Show cmake/ccmake/cmake-gui interface for chaning configure options.help
- Show list of top level targetssystemtests
- Run system testsunittests
- Build and run unittests
These can be set by passing -DVAR_NAME=VALUE
to the CMake invocation.
e.g.
cmake -DCMAKE_BUILD_TYPE=Release /path/to/klee/src
-
LLVMCC
(STRING) - Path to the LLVM C compiler (e.g. Clang). -
LLVMCXX
(STRING) - Path to the LLVM C++ compiler (e.g. Clang++). -
CMAKE_BUILD_TYPE
(STRING) - Build type for KLEE. Can beDebug
,Release
,RelWithDebInfo
orMinSizeRel
. -
DOWNLOAD_LLVM_TESTING_TOOLS
(BOOLEAN) - Force downloading of LLVM testing tool sources. -
ENABLE_DOCS
(BOOLEAN) - Enable building documentation. -
ENABLE_DOXYGEN
(BOOLEAN) - Enable building doxygen documentation. -
ENABLE_SYSTEM_TESTS
(BOOLEAN) - Enable KLEE system tests. -
ENABLE_KLEE_ASSERTS
(BOOLEAN) - Enable assertions when building KLEE. -
ENABLE_KLEE_UCLIBC
(BOOLEAN) - Enable support for klee-uclibc. -
ENABLE_POSIX_RUNTIME
(BOOLEAN) - Enable POSIX runtime. -
ENABLE_SOLVER_METASMT
(BOOLEAN) - Enable MetaSMT solver support. -
ENABLE_SOLVER_STP
(BOOLEAN) - Enable STP solver support. -
ENABLE_SOLVER_Z3
(BOOLEAN) - Enable Z3 solver support. -
ENABLE_TCMALLOC
(BOOLEAN) - Enable TCMalloc support. -
ENABLE_UNIT_TESTS
(BOOLEAN) - Enable KLEE unit tests. -
ENABLE_ZLIB
(BOOLEAN) - Enable zlib support. -
GTEST_SRC_DIR
(STRING) - Path to Google Test source tree. If it is not specified andUSE_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 Google Test include directory, if it is not underGTEST_SRC_DIR
. -
KLEE_ENABLE_TIMESTAMP
(BOOLEAN) - Enable timestamps in KLEE sources. -
KLEE_UCLIBC_PATH
(STRING) - Path to klee-uclibc root directory. -
KLEE_RUNTIME_BUILD_TYPE
(STRING) - Build type for KLEE's runtimes. Can beRelease
,Release+Asserts
,Debug
orDebug+Asserts
. -
LIT_TOOL
(STRING) - Path to lit testing tool. -
LIT_ARGS
(STRING) - Semi-colon separated list of lit options. -
LLVM_CONFIG_BINARY
(STRING) - Path tollvm-config
binary. This is only relevant ifUSE_CMAKE_FIND_PACKAGE_LLVM
isFALSE
. This is used to detect the LLVM version and find libraries. -
LLVM_DIR
(STRING) - Path toLLVMConfig.cmake
. This is only relevant ifUSE_CMAKE_FIND_PACKAGE_LLVM
isTRUE
. This can be used to tell CMake where it can find LLVM outside of standard directories. -
MAKE_BINARY
(STRING) - Path tomake
binary used to build KLEE's runtime. -
metaSMT_DIR
(STRING) - Provides a hint to CMake, where the metaSMT constraint solver can be found. This should be an absolute path to a directory containing the filemetaSMTConfig.cmake
. -
STP_DIR
(STRING) - Provides a hint to CMake, where the STP constraint solver can be found. This should be an absolute path to a directory containing the fileSTPConfig.cmake
. This file is installed by STP but also exists in its build directory. This allows KLEE to link against STP in a build directory or an installed copy. -
USE_CMAKE_FIND_PACKAGE_LLVM
(BOOLEAN) - Usefind_package(LLVM CONFIG)
to find LLVM (instead of usingllvm-config
withLLVM_CONFIG_BINARY
). -
WARNINGS_AS_ERRORS
(BOOLEAN) - Treat warnings as errors when building KLEE.