diff options
author | Matt Hill <theothermatt> | 2020-12-21 08:17:35 +0300 |
---|---|---|
committer | Ankit Meel <ankitjmeel@gmail.com> | 2020-12-21 08:17:35 +0300 |
commit | fdb7623e098fe431397815fc67667c5904074913 (patch) | |
tree | 3ce2e718b5e9fee8f330c85925b88d6013226580 /GNUmakefile | |
parent | 84cc00f3b68e12209e000008f992fad3ac48f757 (diff) |
Unix/macOS: support building with Ccache
This adds an option (WITH_COMPILER_CCACHE) to build using Ccache if it's
found. Makefiles-based, Ninja-based and Xcode generators are supported.
Pass `-DWITH_COMPILER_CCACHE=ON` to cmake to enable Ccache.
Utility option in GNUmakefile is also added: for e.g.,
`make ninja ccache`.
Reviewed By: brecht, ankitm
Differential Revision: https://developer.blender.org/D9665
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile index 1a462b7a351..3b5b9d65521 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -41,6 +41,7 @@ Convenience Targets * developer: Enable faster builds, error checking and tests, recommended for developers. * config: Run cmake configuration tool to set build options. * ninja: Use ninja build tool for faster builds. + * ccache: Use ccache for faster rebuilds. Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir. Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments. @@ -241,6 +242,10 @@ ifneq "$(findstring developer, $(MAKECMDGOALS))" "" CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS) endif +ifneq "$(findstring ccache, $(MAKECMDGOALS))" "" + CMAKE_CONFIG_ARGS:=-DWITH_COMPILER_CCACHE=YES $(CMAKE_CONFIG_ARGS) +endif + # ----------------------------------------------------------------------------- # build tool @@ -340,6 +345,7 @@ headless: all bpy: all developer: all ninja: all +ccache: all # ----------------------------------------------------------------------------- # Build dependencies |