From 8a31330ea6fdffd49f4944e12b38d92408f0729e Mon Sep 17 00:00:00 2001 From: silverqx Date: Wed, 19 Jun 2024 23:23:25 +0200 Subject: [PATCH] cmake bugfix PCH mtime with ccache (clang-cl MSVC) --- cmake/CommonModules/TinyHelpers.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmake/CommonModules/TinyHelpers.cmake b/cmake/CommonModules/TinyHelpers.cmake index 71c8b386e..67d152734 100644 --- a/cmake/CommonModules/TinyHelpers.cmake +++ b/cmake/CommonModules/TinyHelpers.cmake @@ -624,8 +624,8 @@ endfunction() # contains ccache/sccache (fixes for Clang compilers) function(tiny_should_fix_ccache_clang out_variable) - # Target the Clang on Linux and MSYS2 - if(MSVC OR NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # Target the Clang on Linux, MSYS2, and also clang-cl with MSVC + if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(${out_variable} FALSE PARENT_SCOPE) return() endif() @@ -651,11 +651,9 @@ function(tiny_fix_ccache) if(shouldFixCcacheMsvc) tiny_fix_ccache_msvc() - - # The early return() can be here, but I chose not to add it endif() - # Fixes for the Clang compiler on Linux and MSYS2 (excluding the clang-cl with MSVC) + # Fixes for the Clang compiler on Linux, MSYS2, and also clang-cl with MSVC # Ignore PCH timestamps if the ccache is used (recommended in ccache docs) set(shouldFixCcacheClang FALSE) tiny_should_fix_ccache_clang(shouldFixCcacheClang)