From 178b684b968f184d33bae6f0168801ff503af766 Mon Sep 17 00:00:00 2001 From: Hugh Delaney Date: Tue, 13 Dec 2022 13:21:54 +0000 Subject: [PATCH] Add check that ccache is not being used --- libdevice/cmake/modules/SYCLLibdevice.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libdevice/cmake/modules/SYCLLibdevice.cmake b/libdevice/cmake/modules/SYCLLibdevice.cmake index 022f5e077cb03..73df6e473bf7f 100644 --- a/libdevice/cmake/modules/SYCLLibdevice.cmake +++ b/libdevice/cmake/modules/SYCLLibdevice.cmake @@ -37,8 +37,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # freshly built clang. The system one might be very old. get_filename_component(gcc_bin_dir ${CMAKE_CXX_COMPILER} DIRECTORY) get_filename_component(gcc_install_dir ${gcc_bin_dir} DIRECTORY) - list(APPEND compile_opts - "--gcc-toolchain=${gcc_install_dir}") + if (NOT gcc_bin_dir MATCHES "ccache") + list(APPEND compile_opts + "--gcc-toolchain=${gcc_install_dir}") + endif() endif() if ("NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)