From 617f665fb6ff3c1822f251a083c1de18cdcca281 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 20 Mar 2024 00:07:58 +0000 Subject: [PATCH] fixup! cmake: Add `ccache` support Avoid using `CMAKE_VS_GLOBALS` variable. --- cmake/optional.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/optional.cmake b/cmake/optional.cmake index 96db91f736eee..671ec2f601c97 100644 --- a/cmake/optional.cmake +++ b/cmake/optional.cmake @@ -21,10 +21,10 @@ if(CCACHE) # See https://github.com/ccache/ccache/wiki/MS-Visual-Studio set(CCACHE ON) file(COPY_FILE ${CCACHE_COMMAND} ${CMAKE_BINARY_DIR}/cl.exe ONLY_IF_DIFFERENT) - list(APPEND CMAKE_VS_GLOBALS - "CLToolExe=cl.exe" - "CLToolPath=${CMAKE_BINARY_DIR}" - "DebugInformationFormat=OldStyle" + set_target_properties(core_base_interface PROPERTIES + VS_GLOBAL_CLToolExe "cl.exe" + VS_GLOBAL_CLToolPath "${CMAKE_BINARY_DIR}" + VS_GLOBAL_DebugInformationFormat "OldStyle" ) set(CMAKE_VS_NO_COMPILE_BATCHING ON) # By default Visual Studio generators will use /Zi which is not compatible