[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 27 Nov 2010 11:27:09 +0000 (11:27 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 27 Nov 2010 11:27:09 +0000 (11:27 +0000)
- Add ccache support.

svn path=/branches/cmake-bringup/; revision=49813

toolchain-mingw32.cmake

index 003a186..214b49b 100644 (file)
@@ -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 "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o <OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm <FLAGS> <DEFINES> -D__ASM__ -c <SOURCE>")