From 1bb64f774fc0c9595f60e44d9a5f9cda9eda8cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Fri, 22 Jan 2016 07:43:00 +0100 Subject: [PATCH] Add detection of defined _COMPILER_LAUNCHER vars Since CMake 3.3 it is possible to use _COMPILER_LAUNCHER target property to define ccache. So we need to check those setting, too. --- CMake/cotire.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMake/cotire.cmake b/CMake/cotire.cmake index d103357..74c008d 100644 --- a/CMake/cotire.cmake +++ b/CMake/cotire.cmake @@ -1811,7 +1811,8 @@ function (cotire_check_precompiled_header_support _language _target _msgVar) else() set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE) endif() - if (CMAKE_${_language}_COMPILER MATCHES "ccache") + get_target_property(launcher ${_target} ${_language}_COMPILER_LAUNCHER) + if (CMAKE_${_language}_COMPILER MATCHES "ccache" OR launcher MATCHES "ccache") if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros|pch_defines") set (${_msgVar} "ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"."