Skip to content

Commit dbc3e26

Browse files
committed
[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.
1 parent a9342f2 commit dbc3e26

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

libc/test/CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ add_custom_target(libc-long-running-tests)
88

99
add_subdirectory(UnitTest)
1010

11-
if(LIBC_TARGET_OS_IS_GPU AND
12-
(NOT TARGET libc.utils.gpu.loader OR LIBC_GPU_TESTS_DISABLED))
13-
message(WARNING "Cannot build libc GPU tests, missing loader or architecture")
14-
return()
11+
if(LIBC_TARGET_OS_IS_GPU)
12+
if(NOT TARGET libc.utils.gpu.loader)
13+
message(WARNING "Cannot build libc GPU tests, missing loader.")
14+
return()
15+
elseif(LIBC_GPU_TESTS_DISABLED)
16+
message(WARNING "Cannot build libc GPU tests, missing target architecture.")
17+
return()
18+
endif()
1519
endif()
1620

1721
add_subdirectory(include)

0 commit comments

Comments
 (0)