forked from OSchip/llvm-project
Revert "[runtimes] Detect changes to Tests.cmake"
This reverts commit ec10ac750a
.
See https://discourse.llvm.org/t/cmake-regeneration-is-broken/62788.
This change caused Ninja's CMake regeneration to depend on the build,
which prevented CMake regeneration from functioning properly and caused
spurious build failures on incremental builds when a CMake change
occurred.
This commit is contained in:
parent
0be0a53df6
commit
a831ce528f
|
@ -56,14 +56,12 @@ endfunction()
|
|||
# Use provided strip tool instead of the default one.
|
||||
# TARGET_TRIPLE triple
|
||||
# Optional target triple to pass to the compiler
|
||||
# BYPRODUCTS files...
|
||||
# Files generated as a byproduct of this build.
|
||||
# )
|
||||
function(llvm_ExternalProject_Add name source_dir)
|
||||
cmake_parse_arguments(ARG
|
||||
"USE_TOOLCHAIN;EXCLUDE_FROM_ALL;NO_INSTALL;ALWAYS_CLEAN"
|
||||
"SOURCE_DIR"
|
||||
"CMAKE_ARGS;TOOLCHAIN_TOOLS;RUNTIME_LIBRARIES;DEPENDS;EXTRA_TARGETS;PASSTHROUGH_PREFIXES;STRIP_TOOL;TARGET_TRIPLE;BYPRODUCTS"
|
||||
"CMAKE_ARGS;TOOLCHAIN_TOOLS;RUNTIME_LIBRARIES;DEPENDS;EXTRA_TARGETS;PASSTHROUGH_PREFIXES;STRIP_TOOL;TARGET_TRIPLE"
|
||||
${ARGN})
|
||||
canonicalize_tool_name(${name} nameCanon)
|
||||
|
||||
|
@ -324,7 +322,6 @@ function(llvm_ExternalProject_Add name source_dir)
|
|||
INSTALL_COMMAND ""
|
||||
STEP_TARGETS configure build
|
||||
BUILD_ALWAYS 1
|
||||
BUILD_BYPRODUCTS ${ARG_BYPRODUCTS}
|
||||
USES_TERMINAL_CONFIGURE 1
|
||||
USES_TERMINAL_BUILD 1
|
||||
USES_TERMINAL_INSTALL 1
|
||||
|
|
|
@ -219,11 +219,13 @@ function(runtime_default_target)
|
|||
endforeach()
|
||||
|
||||
if(LLVM_INCLUDE_TESTS)
|
||||
include(${LLVM_BINARY_DIR}/runtimes/Tests.cmake OPTIONAL)
|
||||
include(${LLVM_BINARY_DIR}/runtimes/Tests.cmake OPTIONAL RESULT_VARIABLE have_tests)
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/Tests.cmake)
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_TESTSUITES ${SUB_LIT_TESTSUITES})
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_PARAMS ${SUB_LIT_PARAMS})
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_EXTRA_ARGS ${SUB_LIT_EXTRA_ARGS})
|
||||
if(have_tests)
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_TESTSUITES ${SUB_LIT_TESTSUITES})
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_PARAMS ${SUB_LIT_PARAMS})
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_EXTRA_ARGS ${SUB_LIT_EXTRA_ARGS})
|
||||
endif()
|
||||
list(APPEND test_targets runtimes-test-depends check-runtimes)
|
||||
endif()
|
||||
|
||||
|
@ -258,7 +260,6 @@ function(runtime_default_target)
|
|||
${SUB_INSTALL_TARGETS}
|
||||
USE_TOOLCHAIN
|
||||
TARGET_TRIPLE ${LLVM_TARGET_TRIPLE}
|
||||
BYPRODUCTS ${LLVM_BINARY_DIR}/runtimes/Tests.cmake
|
||||
${EXTRA_ARGS})
|
||||
endfunction()
|
||||
|
||||
|
@ -300,11 +301,13 @@ function(runtime_register_target name target)
|
|||
endforeach()
|
||||
|
||||
if(LLVM_INCLUDE_TESTS)
|
||||
include(${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake OPTIONAL)
|
||||
include(${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake OPTIONAL RESULT_VARIABLE have_tests)
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake)
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_TESTSUITES ${SUB_LIT_TESTSUITES})
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_PARAMS ${SUB_LIT_PARAMS})
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_EXTRA_ARGS ${SUB_LIT_EXTRA_ARGS})
|
||||
if(have_tests)
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_TESTSUITES ${SUB_LIT_TESTSUITES})
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_PARAMS ${SUB_LIT_PARAMS})
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_EXTRA_ARGS ${SUB_LIT_EXTRA_ARGS})
|
||||
endif()
|
||||
set(runtimes-test-depends-${name} runtimes-test-depends)
|
||||
set(check-runtimes-${name} check-runtimes)
|
||||
list(APPEND ${name}_test_targets runtimes-test-depends-${name} check-runtimes-${name})
|
||||
|
@ -364,7 +367,6 @@ function(runtime_register_target name target)
|
|||
${${name}_test_targets}
|
||||
USE_TOOLCHAIN
|
||||
TARGET_TRIPLE ${target}
|
||||
BYPRODUCTS ${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake
|
||||
${EXTRA_ARGS})
|
||||
endfunction()
|
||||
|
||||
|
|
Loading…
Reference in New Issue