[PATCH] D121647: [runtimes] Create an empty Tests.cmake if absent
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 15:18:37 PDT 2022
phosek created this revision.
phosek added reviewers: ldionne, beanz, smeenai.
Herald added a subscriber: mgorny.
Herald added a project: All.
phosek requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This ensures that Tests.cmake is tracked by Ninja and any changes to
this file from the subbuilds are correctly detected.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121647
Files:
llvm/runtimes/CMakeLists.txt
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -220,13 +220,15 @@
endforeach()
if(LLVM_INCLUDE_TESTS)
- 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)
- if(have_tests)
- set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${RUNTIMES_LIT_TESTSUITES})
- set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${RUNTIMES_LIT_PARAMS})
- set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${RUNTIMES_LIT_EXTRA_ARGS})
+ if (NOT EXISTS ${LLVM_BINARY_DIR}/runtimes/Tests.cmake)
+ # This file will be later replaced by the runtimes subbuild.
+ file(TOUCH ${LLVM_BINARY_DIR}/runtimes/Tests.cmake)
endif()
+ include(${LLVM_BINARY_DIR}/runtimes/Tests.cmake)
+ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/Tests.cmake)
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${RUNTIMES_LIT_TESTSUITES})
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${RUNTIMES_LIT_PARAMS})
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${RUNTIMES_LIT_EXTRA_ARGS})
list(APPEND test_targets runtimes-test-depends check-runtimes)
endif()
@@ -303,13 +305,15 @@
endforeach()
if(LLVM_INCLUDE_TESTS)
- 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)
- if(have_tests)
- set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${RUNTIMES_LIT_TESTSUITES})
- set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${RUNTIMES_LIT_PARAMS})
- set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${RUNTIMES_LIT_EXTRA_ARGS})
+ if (NOT EXISTS ${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake)
+ # This file will be later replaced by the runtimes subbuild.
+ file(TOUCH ${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake)
endif()
+ include(${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake)
+ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake)
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${RUNTIMES_LIT_TESTSUITES})
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${RUNTIMES_LIT_PARAMS})
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${RUNTIMES_LIT_EXTRA_ARGS})
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})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121647.415246.patch
Type: text/x-patch
Size: 2847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220314/83273909/attachment.bin>
More information about the llvm-commits
mailing list