diff options
-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 |