Skip to content

Commit 900d20d

Browse files
authored
[NFC][Offload] Move conformance test warning outside of function (llvm#152466)
`add_conformance_test` checks for libc and prints a warning if it is not found. However, this warning ends up being printed once for each test, spamming the cmake log. Moving it up to the folder cmake allows it to be reported only once.
1 parent e368b53 commit 900d20d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

offload/unittests/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ function(add_conformance_test test_name)
104104

105105
list(TRANSFORM ARGN PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/" OUTPUT_VARIABLE files)
106106

107-
if(NOT TARGET libc)
108-
message(WARNING "Cannot run conformance tests without the LLVM C library")
109-
return()
110-
endif()
111-
112107
add_executable(${target_name} ${files})
113108
add_dependencies(${target_name} conformance_device_binaries)
114109
target_compile_definitions(${target_name}

offload/unittests/Conformance/tests/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
if(NOT TARGET libc)
2+
message(WARNING "Cannot run conformance tests without the LLVM C library")
3+
return()
4+
endif()
5+
16
add_conformance_test(acosf AcosfTest.cpp)
27
add_conformance_test(acoshf AcoshfTest.cpp)
38
add_conformance_test(asinf AsinfTest.cpp)

0 commit comments

Comments
 (0)