[llvm] [CMake] Always define runtimes-test-depends (PR #73629)

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 01:33:11 PST 2023


https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/73629

This allows the parent build to depend on this target unconditionally even when the tests are disabled.

>From 3858bb87037e589dce54fd61e03c8ef19ac1491b Mon Sep 17 00:00:00 2001
From: Petr Hosek <phosek at google.com>
Date: Tue, 28 Nov 2023 09:24:17 +0000
Subject: [PATCH] [CMake] Always define runtimes-test-depends

This allows the parent build to depend on this target unconditionally
even when the tests are disabled.
---
 runtimes/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index 603a3289c27b682..06d1f2f993eab81 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -222,12 +222,14 @@ foreach(entry ${runtimes})
   add_subdirectory(${entry} ${projName})
 endforeach()
 
+# Define runtimes-test-depends so the parent build can use it unconditionally.
+add_custom_target(runtimes-test-depends)
+
 if(LLVM_INCLUDE_TESTS)
   # LLVM_RUNTIMES_LIT_DEPENDS is populated when lit tests are added between
   # umbrella_list_testsuite begin and end. The bootstrap runtimes builds
   # currently assumes this target exists.
   get_property(LLVM_RUNTIMES_LIT_DEPENDS GLOBAL PROPERTY LLVM_RUNTIMES_LIT_DEPENDS)
-  add_custom_target(runtimes-test-depends)
   if(LLVM_RUNTIMES_LIT_DEPENDS)
     # add_dependencies complains if called with no dependencies
     add_dependencies(runtimes-test-depends ${LLVM_RUNTIMES_LIT_DEPENDS})



More information about the llvm-commits mailing list