From 2bee8b5109d440a74f89a4445325ba53552141f1 Mon Sep 17 00:00:00 2001 From: Alexander Wilms <f.alexander.wilms@gmail.com> Date: Fri, 6 Oct 2023 19:55:40 +0200 Subject: [PATCH] Make suggested changes --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1bacc055..ffb1df656 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,11 +81,11 @@ endif() # On Linux, use -DCMAKE_CXX_COMPILER_LAUNCHER=ccache instead. # The iOS and MSVC builds each require some configuration, which is enabled by the following option: -if(CMAKE_GENERATOR MATCHES "Xcode" OR "Visual Studio") +if(MSVC OR (CMAKE_GENERATOR STREQUAL "Xcode")) option(ENABLE_CCACHE "Speed up recompilation by caching previous compilations" ON) endif() -if(ENABLE_CCACHE) +if(ENABLE_CCACHE AND (CMAKE_GENERATOR STREQUAL "Xcode")) find_program(CCACHE ccache REQUIRED) if(CCACHE) # https://stackoverflow.com/a/36515503/2278742