diff --git a/offload/CMakeLists.txt b/offload/CMakeLists.txt index a416ac29873f4..42e0f5740f116 100644 --- a/offload/CMakeLists.txt +++ b/offload/CMakeLists.txt @@ -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)