diff options
author | Shoaib Meenai <smeenai@fb.com> | 2022-05-26 09:34:18 -0700 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2022-05-26 09:34:18 -0700 |
commit | a831ce528fc0fd16734d644e62ae956834276c1b (patch) | |
tree | 22286ca07851d0fe4f68ea9dce6f76868a7e48b7 /llvm/runtimes | |
parent | 0be0a53df65cb402359c257922d80ab93d86fb40 (diff) | |
download | llvm-a831ce528fc0fd16734d644e62ae956834276c1b.zip llvm-a831ce528fc0fd16734d644e62ae956834276c1b.tar.gz llvm-a831ce528fc0fd16734d644e62ae956834276c1b.tar.bz2 |
Revert "[runtimes] Detect changes to Tests.cmake"
This reverts commit ec10ac750a8ad96983d85263323635f3dabe92fd.
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.
Diffstat (limited to 'llvm/runtimes')
-rw-r--r-- | llvm/runtimes/CMakeLists.txt | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index 836e914..34fccca 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -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() |