Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/cmake/platform/platform_apple.cmake')
-rw-r--r--build_files/cmake/platform/platform_apple.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index 6baa2f3d855..31da5292eaf 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -470,3 +470,17 @@ set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
+
+if(WITH_COMPILER_CCACHE)
+ if(NOT CMAKE_GENERATOR STREQUAL "Xcode")
+ find_program(CCACHE_PROGRAM ccache)
+ if(CCACHE_PROGRAM)
+ # Makefiles and ninja
+ set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
+ set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
+ else()
+ message(WARNING "Ccache NOT found, disabling WITH_COMPILER_CCACHE")
+ set(WITH_COMPILER_CCACHE OFF)
+ endif()
+ endif()
+endif()