From a19b626b76d05192954501e631dc29d5f4d13702 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Mon, 6 Apr 2020 14:30:16 +0100 Subject: [cmake] Remove several leftovers from old autoconf build system --- CMakeLists.txt | 40 ---------------------------------------- docs/CMakeLists.txt | 2 +- test/CMakeLists.txt | 2 +- unittests/CMakeLists.txt | 2 +- 4 files changed, 3 insertions(+), 43 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fc54484..2ec7c1ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,13 +50,6 @@ message(STATUS "KLEE version ${KLEE_VERSION}") set(PACKAGE_STRING "\"KLEE ${KLEE_VERSION}\"") set(PACKAGE_URL "\"https://klee.github.io\"") -################################################################################ -# Set various useful variables depending on CMake version -################################################################################ -set(ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG "USES_TERMINAL") - -set(EXTERNAL_PROJECT_ADD_STEP_USES_TERMINAL_ARG "USES_TERMINAL" "1") - ################################################################################ # Sanity check - Disallow building in source. # Otherwise we would overwrite the Makefiles of the old build system. @@ -66,39 +59,6 @@ if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") "CMake from a different directory.") endif() -################################################################################ -# Sanity Check: Check for in source build of the old build system. -# Some build files from the old build system could interfere with our build. -################################################################################ -set(KLEE_OLD_BUILD_SYSTEM_FILES - "include/klee/Config/config.h" - "test/lit.site.cfg" -) -foreach (legacy_file ${KLEE_OLD_BUILD_SYSTEM_FILES}) - if (EXISTS "${CMAKE_SOURCE_DIR}/${legacy_file}") - if (EXISTS "${CMAKE_SOURCE_DIR}/.git") - set(CLEAN_SRC_DIR_INSTRUCTIONS - "The KLEE source tree apears to be a git repository so you can run" - " \"git clean -dxn\" to see what files aren't part of the repo and then" - " run \"git clean -fdx\" to remove them." - ) - else() - # This is the only reliable way to fix this. - set(CLEAN_SRC_DIR_INSTRUCTIONS - "The KLEE source tree doesn't appear to be a git repository so you will" - " need to download a fresh copy of KLEE's source code." - ) - endif() - message(FATAL_ERROR "\"${CMAKE_SOURCE_DIR}/${legacy_file}\"" - " exists in KLEE's source tree. It is likely that the Autoconf/Makefile" - " build system was configured to do an in-source build in KLEE's source" - " tree. This could cause problems with the CMake build. " - ${CLEAN_SRC_DIR_INSTRUCTIONS} - " You can then run cmake again." - ) - endif() -endforeach() - ################################################################################ # Build type ################################################################################ diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index f689e8a0..6f4168c3 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -25,7 +25,7 @@ if (ENABLE_DOXYGEN) add_custom_target(doc-doxygen COMMAND "${DOXYGEN_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg" COMMENT "Generating Doxygen documentation" - ${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG} + USES_TERMINAL ) add_dependencies(docs doc-doxygen) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0da40cf0..f850d745 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -146,7 +146,7 @@ add_custom_target(systemtests COMMAND "${LIT_TOOL}" ${LIT_ARGS} "${CMAKE_CURRENT_BINARY_DIR}" DEPENDS klee kleaver klee-replay kleeRuntest gen-bout gen-random-bout COMMENT "Running system tests" - ${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG} + USES_TERMINAL ) # Tell CMake to remove lit's output directories when diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index fbc6c256..aff9d26e 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -188,5 +188,5 @@ add_custom_target(unittests "${LIT_TOOL}" ${LIT_ARGS} "${CMAKE_CURRENT_BINARY_DIR}" DEPENDS ${UNIT_TEST_DEPENDS} COMMENT "Running unittests" - ${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG} + USES_TERMINAL ) -- cgit 1.4.1