diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/CMakeLists.txt | 14 | ||||
-rw-r--r-- | tools/gen-random-bout/CMakeLists.txt | 17 | ||||
-rw-r--r-- | tools/kleaver/CMakeLists.txt | 18 | ||||
-rw-r--r-- | tools/klee-replay/CMakeLists.txt | 30 | ||||
-rw-r--r-- | tools/klee-stats/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tools/klee/CMakeLists.txt | 39 | ||||
-rw-r--r-- | tools/ktest-tool/CMakeLists.txt | 13 |
7 files changed, 140 insertions, 0 deletions
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 00000000..9bf2acf8 --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,14 @@ +#===------------------------------------------------------------------------===# +# +# The KLEE Symbolic Virtual Machine +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +add_subdirectory(gen-random-bout) +add_subdirectory(kleaver) +add_subdirectory(klee) +add_subdirectory(klee-replay) +add_subdirectory(klee-stats) +add_subdirectory(ktest-tool) diff --git a/tools/gen-random-bout/CMakeLists.txt b/tools/gen-random-bout/CMakeLists.txt new file mode 100644 index 00000000..d1fa6b09 --- /dev/null +++ b/tools/gen-random-bout/CMakeLists.txt @@ -0,0 +1,17 @@ +#===------------------------------------------------------------------------===# +# +# The KLEE Symbolic Virtual Machine +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +add_executable(gen-random-bout + gen-random-bout.cpp +) + +set(KLEE_LIBS kleeBasic) + +target_link_libraries(gen-random-bout ${KLEE_LIBS}) + +install(TARGETS gen-random-bout RUNTIME DESTINATION bin) diff --git a/tools/kleaver/CMakeLists.txt b/tools/kleaver/CMakeLists.txt new file mode 100644 index 00000000..befbcc6e --- /dev/null +++ b/tools/kleaver/CMakeLists.txt @@ -0,0 +1,18 @@ +#===------------------------------------------------------------------------===# +# +# The KLEE Symbolic Virtual Machine +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +add_executable(kleaver + main.cpp +) + +klee_get_llvm_libs(LLVM_LIBS support) +set(KLEE_LIBS kleeBasic kleaverSolver kleaverExpr kleeSupport) + +target_link_libraries(kleaver ${KLEE_LIBS} ${LLVM_LIBS}) + +install(TARGETS kleaver RUNTIME DESTINATION bin) diff --git a/tools/klee-replay/CMakeLists.txt b/tools/klee-replay/CMakeLists.txt new file mode 100644 index 00000000..e0eb8d07 --- /dev/null +++ b/tools/klee-replay/CMakeLists.txt @@ -0,0 +1,30 @@ +#===------------------------------------------------------------------------===# +# +# The KLEE Symbolic Virtual Machine +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +if (HAVE_PTY_H) + add_executable(klee-replay + fd_init.c + file-creator.c + klee-replay.c + klee_init_env.c + ) + + target_link_libraries(klee-replay PRIVATE kleeBasic ${LIBCAP_LIBRARIES}) + # FIXME: This isn't quite right. This is actually an implementation detail + # of glibc not Linux. Really we need to test if we can use `openpty()` + # with/without an additional library. + if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + if (NOT LIBUTIL_LIBRARIES) + message(FATAL_ERROR "klee-replay needs libutil under Linux") + endif() + target_link_libraries(klee-replay PRIVATE ${LIBUTIL_LIBRARIES}) + endif() +install(TARGETS klee-replay RUNTIME DESTINATION bin) +else() + message(WARNING "Not building klee-replay due to missing \"pty.h\" header file") +endif() diff --git a/tools/klee-stats/CMakeLists.txt b/tools/klee-stats/CMakeLists.txt new file mode 100644 index 00000000..7203003d --- /dev/null +++ b/tools/klee-stats/CMakeLists.txt @@ -0,0 +1,9 @@ +#===------------------------------------------------------------------------===# +# +# The KLEE Symbolic Virtual Machine +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +install(PROGRAMS klee-stats DESTINATION bin) diff --git a/tools/klee/CMakeLists.txt b/tools/klee/CMakeLists.txt new file mode 100644 index 00000000..b6e907ab --- /dev/null +++ b/tools/klee/CMakeLists.txt @@ -0,0 +1,39 @@ +#===------------------------------------------------------------------------===# +# +# The KLEE Symbolic Virtual Machine +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +add_executable(klee + main.cpp +) + +# FIXME: This shouldn't be done here. Instead the KLEE libraries +# should declare their LLVM dependencies. +set(LLVM_COMPONENTS + bitreader + bitwriter + engine + ipo + jit + linker + support +) + +if ("${LLVM_PACKAGE_VERSION}" VERSION_EQUAL "3.3" OR + "${LLVM_PACKAGE_VERSION}" VERSION_GREATER "3.3") + list(APPEND LLVM_COMPONENTS irreader) +endif() + +klee_get_llvm_libs(LLVM_LIBS ${LLVM_COMPONENTS}) + +set(KLEE_LIBS kleeCore kleeBasic kleeModule kleaverSolver kleaverExpr kleeSupport) + +target_link_libraries(klee ${KLEE_LIBS} ${LLVM_LIBS}) + +install(TARGETS klee RUNTIME DESTINATION bin) + +# The KLEE binary depends on the runtimes +add_dependencies(klee BuildKLEERuntimes) diff --git a/tools/ktest-tool/CMakeLists.txt b/tools/ktest-tool/CMakeLists.txt new file mode 100644 index 00000000..76e31ac0 --- /dev/null +++ b/tools/ktest-tool/CMakeLists.txt @@ -0,0 +1,13 @@ +#===------------------------------------------------------------------------===# +# +# The KLEE Symbolic Virtual Machine +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +install(PROGRAMS ktest-tool DESTINATION bin) + +# Copy into the build directory's binary directory +# so integration tests can find it +configure_file(ktest-tool "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ktest-tool" COPYONLY) |