Skip to content

Commit

Permalink
Add CMake option to disable ccache
Browse files Browse the repository at this point in the history
There are situations where ccache causes problems (such as interactions
with other build accelerators) so it's useful to be able to turn it off.
It remains on by default.
  • Loading branch information
jbytheway committed Apr 21, 2020
1 parent a848ae0 commit 8e199b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ option(LOCALIZE "Support for language localizations. Also enable UTF support
option(LANGUAGES "Compile localization files for specified languages." "")
option(DYNAMIC_LINKING "Use dynamic linking. Or use static to remove MinGW dependency instead." "ON")
option(JSON_FORMAT "Build JSON formatter" "OFF")
option(CATA_CCACHE "Try to find and build with ccache" "ON")
option(CATA_CLANG_TIDY_PLUGIN "Build Cata's custom clang-tidy plugin" "OFF")
set(CATA_CLANG_TIDY_INCLUDE_DIR "" CACHE STRING "Path to internal clang-tidy headers required for plugin (e.g. ClangTidy.h)")
set(CATA_CHECK_CLANG_TIDY "" CACHE STRING "Path to check_clang_tidy.py for plugin tests")
Expand Down Expand Up @@ -392,9 +393,9 @@ ADD_CUSTOM_TARGET(uninstall
)

find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
if(CCACHE_FOUND AND CATA_CCACHE)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
endif()

# vim:noet

0 comments on commit 8e199b1

Please sign in to comment.