[libc-commits] [PATCH] D152209: [libc][obvious] Fix conditional when CUDA is not found
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jun 5 16:50:33 PDT 2023
jhuber6 created this revision.
Herald added subscribers: libc-commits, mattd, tschuett, yaxunl.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.
If CUDA is not found this string will expand into nothing. We need to
surround it with a string otherwise it will cause build failures.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152209
Files:
libc/utils/gpu/loader/CMakeLists.txt
Index: libc/utils/gpu/loader/CMakeLists.txt
===================================================================
--- libc/utils/gpu/loader/CMakeLists.txt
+++ libc/utils/gpu/loader/CMakeLists.txt
@@ -15,10 +15,10 @@
# The CUDA loader requires LLVM to traverse the ELF image for symbols.
find_package(LLVM QUIET)
if(CUDAToolkit_FOUND AND LLVM_FOUND AND
- ${CUDAToolkit_VERSION} VERSION_GREATER_EQUAL "11.2")
+ "${CUDAToolkit_VERSION}" VERSION_GREATER_EQUAL "11.2")
add_subdirectory(nvptx)
else()
- if(${CUDAToolkit_VERSION} VERSION_LESS "11.2")
+ if("${CUDAToolkit_VERSION}" VERSION_LESS "11.2")
message(WARNING
"Skipping CUDA loader for gpu target, CUDA must be version 11.2 or later.
Found CUDA Version ${CUDAToolkit_VERSION}")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152209.528630.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230605/f64de2e5/attachment-0001.bin>
More information about the libc-commits
mailing list