Skip to content

Commit

Permalink
[Offload] Fix CMake detection when it is not found (#90729)
Browse files Browse the repository at this point in the history
Summary:
This variable could be unset if not found or when building standalone.
We should check for that and set it to true or false.

Fixes: #90708
  • Loading branch information
jhuber6 committed May 1, 2024
1 parent 0647b2a commit e312f07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion offload/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,12 @@ endif()

pythonize_bool(LIBOMPTARGET_OMPT_SUPPORT)

set(LIBOMPTARGET_GPU_LIBC_SUPPORT ${LLVM_LIBC_GPU_BUILD} CACHE BOOL
if(${LLVM_LIBC_GPU_BUILD})
set(LIBOMPTARGET_HAS_LIBC TRUE)
else()
set(LIBOMPTARGET_HAS_LIBC FALSE)
endif()
set(LIBOMPTARGET_GPU_LIBC_SUPPORT ${LIBOMPTARGET_HAS_LIBC} CACHE BOOL
"Libomptarget support for the GPU libc")
pythonize_bool(LIBOMPTARGET_GPU_LIBC_SUPPORT)

Expand Down

0 comments on commit e312f07

Please sign in to comment.