Skip to content

Commit 9adf811

Browse files
authored
[Offload] Fix stray libomptarget message helper calls (#106837)
In #92581 the `LibomptargetUitls.cmake` helpers have been removed, but only uses of `libomptarget_say` were migrated. Migrate the remaining few warning and error messages so the `check-offload` target would not fail due to missing `libomptarget_warning_say`. While at it, update the `check-offload` unavailability message to say `check-offload` instead of `check-libomptarget`. Fixes #92581
1 parent 75545b3 commit 9adf811

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

offload/DeviceRTL/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ if(LIBOMPTARGET_DEVICE_ARCHITECTURES STREQUAL "all")
6060
elseif(LIBOMPTARGET_DEVICE_ARCHITECTURES STREQUAL "auto" OR
6161
LIBOMPTARGET_DEVICE_ARCHITECTURES STREQUAL "native")
6262
if(NOT LIBOMPTARGET_NVPTX_ARCH AND NOT LIBOMPTARGET_AMDGPU_ARCH)
63-
libomptarget_error_say(
63+
message(FATAL_ERROR
6464
"Could not find 'amdgpu-arch' and 'nvptx-arch' tools required for 'auto'")
6565
elseif(NOT LIBOMPTARGET_FOUND_NVIDIA_GPU AND NOT LIBOMPTARGET_FOUND_AMDGPU_GPU)
66-
libomptarget_error_say("No AMD or NVIDIA GPU found on the system when using 'auto'")
66+
message(FATAL_ERROR "No AMD or NVIDIA GPU found on the system when using 'auto'")
6767
endif()
6868
set(LIBOMPTARGET_DEVICE_ARCHITECTURES
6969
"${LIBOMPTARGET_NVPTX_DETECTED_ARCH_LIST};${LIBOMPTARGET_AMDGPU_DETECTED_ARCH_LIST}")
@@ -291,7 +291,7 @@ foreach(gpu_arch ${LIBOMPTARGET_DEVICE_ARCHITECTURES})
291291
elseif("${gpu_arch}" IN_LIST all_nvptx_architectures)
292292
compileDeviceRTLLibrary(${gpu_arch} nvptx nvptx64-nvidia-cuda --cuda-feature=+ptx63)
293293
else()
294-
libomptarget_error_say("Unknown GPU architecture '${gpu_arch}'")
294+
message(FATAL_ERROR "Unknown GPU architecture '${gpu_arch}'")
295295
endif()
296296
endforeach()
297297

offload/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
33
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0.0)
44
message(STATUS "Can only test with Clang compiler in version 6.0.0 or later.")
5-
libomptarget_warning_say("The check-libomptarget target will not be available!")
5+
message(WARNING "The check-offload target will not be available!")
66
return()
77
endif()
88

0 commit comments

Comments
 (0)