diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2017-03-30 10:14:54 +0100 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2017-03-30 14:12:23 +0100 |
commit | ec3ac104af50e07f3430a35b3ffae0c340fcb78f (patch) | |
tree | cb29dd78ba78a9ea85acb7cea557b75c887a7ae5 | |
parent | 08e79adeb0c732de443eb81122594d03c39248b3 (diff) | |
download | klee-ec3ac104af50e07f3430a35b3ffae0c340fcb78f.tar.gz |
[CMake] When supported pass `USES_TERMINAL` argument to
`ExternalProject_Add_Step()` so that when using Ninja the output of the bitcode build system is shown immediately.
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | runtime/CMakeLists.txt | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 97c51a2e..ff55ad23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,13 @@ else() set(ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG "") endif() +if (("${CMAKE_VERSION}" VERSION_EQUAL "3.4") OR ("${CMAKE_VERSION}" VERSION_GREATER "3.4")) + # In CMake >= 3.4 ExternalProject_Add_Step() supports a `USES_TERMINAL` argument + set(EXTERNAL_PROJECT_ADD_STEP_USES_TERMINAL_ARG "USES_TERMINAL" "1") +else() + set(EXTERNAL_PROJECT_ADD_STEP_USES_TERMINAL_ARG "") +endif() + ################################################################################ # Sanity check - Disallow building in source. # Otherwise we would overwrite the Makefiles of the old build system. diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 1e680e5d..c980a27a 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -111,6 +111,7 @@ ExternalProject_Add_Step(BuildKLEERuntimes RuntimeBuild COMMAND ${ENV_BINARY} MAKEFLAGS="" ${MAKE_BINARY} -f Makefile.cmake.bitcode all ALWAYS ${EXTERNAL_PROJECT_BUILD_ALWAYS_ARG} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + ${EXTERNAL_PROJECT_ADD_STEP_USES_TERMINAL_ARG} ) # FIXME: Invoke `make clean` in the bitcode build system |