[libcxx-commits] [PATCH] D121647: [runtimes] Detect changes to Tests.cmake
Petr Hosek via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 18 10:02:13 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGec10ac750a8a: [runtimes] Detect changes to Tests.cmake (authored by phosek).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121647/new/
https://reviews.llvm.org/D121647
Files:
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
llvm/runtimes/CMakeLists.txt
runtimes/Tests.cmake.in
Index: runtimes/Tests.cmake.in
===================================================================
--- runtimes/Tests.cmake.in
+++ runtimes/Tests.cmake.in
@@ -1,3 +1,3 @@
-set(RUNTIMES_LIT_TESTSUITES @RUNTIMES_LIT_TESTSUITES@)
-set(RUNTIMES_LIT_PARAMS @RUNTIMES_LIT_PARAMS@)
-set(RUNTIMES_LIT_EXTRA_ARGS @RUNTIMES_LIT_EXTRA_ARGS@)
+set(SUB_LIT_TESTSUITES @RUNTIMES_LIT_TESTSUITES@)
+set(SUB_LIT_PARAMS @RUNTIMES_LIT_PARAMS@)
+set(SUB_LIT_EXTRA_ARGS @RUNTIMES_LIT_EXTRA_ARGS@)
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -220,13 +220,11 @@
endforeach()
if(LLVM_INCLUDE_TESTS)
- include(${LLVM_BINARY_DIR}/runtimes/Tests.cmake OPTIONAL RESULT_VARIABLE have_tests)
+ include(${LLVM_BINARY_DIR}/runtimes/Tests.cmake OPTIONAL)
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})
- endif()
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${SUB_LIT_TESTSUITES})
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${SUB_LIT_PARAMS})
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${SUB_LIT_EXTRA_ARGS})
list(APPEND test_targets runtimes-test-depends check-runtimes)
endif()
@@ -262,6 +260,7 @@
${SUB_INSTALL_TARGETS}
USE_TOOLCHAIN
TARGET_TRIPLE ${LLVM_TARGET_TRIPLE}
+ BYPRODUCTS ${LLVM_BINARY_DIR}/runtimes/Tests.cmake
${EXTRA_ARGS})
endfunction()
@@ -303,13 +302,11 @@
endforeach()
if(LLVM_INCLUDE_TESTS)
- include(${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake OPTIONAL RESULT_VARIABLE have_tests)
+ include(${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake OPTIONAL)
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})
- endif()
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${SUB_LIT_TESTSUITES})
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${SUB_LIT_PARAMS})
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${SUB_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})
@@ -369,6 +366,7 @@
${${name}_test_targets}
USE_TOOLCHAIN
TARGET_TRIPLE ${target}
+ BYPRODUCTS ${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake
${EXTRA_ARGS})
endfunction()
Index: llvm/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -56,12 +56,14 @@
# 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"
+ "CMAKE_ARGS;TOOLCHAIN_TOOLS;RUNTIME_LIBRARIES;DEPENDS;EXTRA_TARGETS;PASSTHROUGH_PREFIXES;STRIP_TOOL;TARGET_TRIPLE;BYPRODUCTS"
${ARGN})
canonicalize_tool_name(${name} nameCanon)
@@ -322,6 +324,7 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121647.416541.patch
Type: text/x-patch
Size: 4525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220318/d7029031/attachment.bin>
More information about the libcxx-commits
mailing list