Skip to content

Commit

Permalink
[libc][obvious] Fix conditional when CUDA is not found
Browse files Browse the repository at this point in the history
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.

Differential Revision: https://reviews.llvm.org/D152209
  • Loading branch information
jhuber6 committed Jun 5, 2023
1 parent 23dc96b commit a59e171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libc/utils/gpu/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ find_package(CUDAToolkit QUIET)
# 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}")
Expand Down

0 comments on commit a59e171

Please sign in to comment.