[libc-commits] [libc] dbc3e26 - [libc][NFC] More verbose warning message on missing utilities

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Wed Jun 5 16:09:15 PDT 2024


Author: Joseph Huber
Date: 2024-06-05T18:09:06-05:00
New Revision: dbc3e26c25587e5460ae12caed84cb09197c4ed7

URL: https://github.com/llvm/llvm-project/commit/dbc3e26c25587e5460ae12caed84cb09197c4ed7
DIFF: https://github.com/llvm/llvm-project/commit/dbc3e26c25587e5460ae12caed84cb09197c4ed7.diff

LOG: [libc][NFC] More verbose warning message on missing utilities

Summary:
The GPU needs both the loader utility and the architecture to be present
to run tests. This simply makes it easier to detect which is missing in
case of problems.

Added: 
    

Modified: 
    libc/test/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/test/CMakeLists.txt b/libc/test/CMakeLists.txt
index 5e26a1000633b..b5c989aa1d433 100644
--- a/libc/test/CMakeLists.txt
+++ b/libc/test/CMakeLists.txt
@@ -8,10 +8,14 @@ add_custom_target(libc-long-running-tests)
 
 add_subdirectory(UnitTest)
 
-if(LIBC_TARGET_OS_IS_GPU AND
-   (NOT TARGET libc.utils.gpu.loader OR LIBC_GPU_TESTS_DISABLED))
-  message(WARNING "Cannot build libc GPU tests, missing loader or architecture")
-  return()
+if(LIBC_TARGET_OS_IS_GPU)
+  if(NOT TARGET libc.utils.gpu.loader)
+    message(WARNING "Cannot build libc GPU tests, missing loader.")
+    return()
+  elseif(LIBC_GPU_TESTS_DISABLED)
+    message(WARNING "Cannot build libc GPU tests, missing target architecture.")
+    return()
+  endif()
 endif()
 
 add_subdirectory(include)


        


More information about the libc-commits mailing list