From 16fed19fbd3b8dfb7273a624907f018b13b64482 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 27 Nov 2010 11:27:09 +0000 Subject: [PATCH] [CMAKE] - Add ccache support. svn path=/branches/cmake-bringup/; revision=49813 --- toolchain-mingw32.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/toolchain-mingw32.cmake b/toolchain-mingw32.cmake index 003a1861e58..214b49b1bea 100644 --- a/toolchain-mingw32.cmake +++ b/toolchain-mingw32.cmake @@ -16,13 +16,19 @@ elseif(ARCH MATCHES amd64) set(MINGW_PREFIX "x86_64-w64-mingw32-" CACHE STRING "MinGW Prefix") endif(ARCH MATCHES i386) +if(ENABLE_CCACHE) +set(CCACHE "ccache" CACHE STRING "ccache") +else() +set(CCACHE "" CACHE STRING "ccache") +endif() + # the name of the target operating system SET(CMAKE_SYSTEM_NAME Windows) SET(CMAKE_SYSTEM_PROCESSOR i686) # which compilers to use for C and C++ -SET(CMAKE_C_COMPILER ${MINGW_PREFIX}gcc) -SET(CMAKE_CXX_COMPILER ${MINGW_PREFIX}g++) +SET(CMAKE_C_COMPILER ${CCACHE} ${MINGW_PREFIX}gcc) +SET(CMAKE_CXX_COMPILER ${CCACHE} ${MINGW_PREFIX}g++) SET(CMAKE_RC_COMPILER ${MINGW_PREFIX}windres) SET(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc) SET(CMAKE_ASM_COMPILE_OBJECT " -x assembler-with-cpp -o -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm -D__ASM__ -c ")