Commit 98f8311f authored by Dominik Charousset's avatar Dominik Charousset

Add ccache build option

parent ca3a217a
......@@ -31,6 +31,21 @@ if(DEFINED CAF_QT_PREFIX_PATH)
set(CMAKE_PREFIX_PATH "${CAF_QT_PREFIX_PATH}")
endif()
################################################################################
# enable ccache if required by user #
################################################################################
if(CAF_USE_CCACHE)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message(STATUS "Using ccache command: ${CCACHE_PROGRAM}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_PROGRAM}")
else()
message(STATUS "Unable to find ccache")
endif()
endif(CAF_USE_CCACHE)
################################################################################
# make sure all variables are set to "no" if undefined for summary output #
################################################################################
......
......@@ -49,9 +49,10 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--more-warnings enables most warnings
--no-compiler-check disable compiler version check
--no-auto-libc++ do not automatically enable libc++ for Clang
--no-exceptions build CAF without C++ exceptions
--no-exceptions do not catch exceptions in CAF
--force-no-exceptions build CAF with '-fno-exceptions'
--warnings-as-errors enables -Werror
--warnings-as-errors build with '-Werror'
--with-ccache use ccache to improve build performance
Installation Directories:
--prefix=PREFIX installation directory [/usr/local]
......@@ -255,6 +256,9 @@ while [ $# -ne 0 ]; do
--warnings-as-errors)
append_cache_entry CAF_CXX_WARNINGS_AS_ERRORS BOOL yes
;;
--with-ccache)
append_cache_entry CAF_USE_CCACHE BOOL yes
;;
--sysroot=*)
append_cache_entry CAF_OSX_SYSROOT PATH "$optarg"
;;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment