Skip to content

[SYCL][libdevice] Add check that ccache is not being used #7761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions libdevice/cmake/modules/SYCLLibdevice.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ 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)
# /bin/g++ doesn't need any fixup.
if (NOT gcc_install_dir STREQUAL "/")
# /bin/g++ doesn't need any fixup. We also need to check that ccache is
# not being used.
if (NOT gcc_install_dir STREQUAL "/" AND NOT gcc_bin_dir MATCHES "ccache")
list(APPEND compile_opts "--gcc-toolchain=${gcc_install_dir}")
endif()
endif()
Expand Down