summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2012-09-15 16:41:10 -0400
committerPeter Foley <pefoley2@verizon.net>2012-10-02 14:37:38 -0400
commitb670123feda97fea254d8832f7b20857184f4896 (patch)
tree066f91a5cf93b2e79d422478cfafe1ceb62ca575
parentc605b2c0d8bbcf97bb138a1fd324b7146258607f (diff)
prevent ccache from being doubled with MSVC
Change-Id: Idb2fd2a115c5e32d3e894d70c0e86730b38e73e9
-rw-r--r--configure.in36
1 files changed, 19 insertions, 17 deletions
diff --git a/configure.in b/configure.in
index 19ac43603dd6..67c7457d907e 100644
--- a/configure.in
+++ b/configure.in
@@ -2449,7 +2449,7 @@ AC_SUBST(SYSBASE)
dnl ===================================================================
dnl Checks if ccache is available
dnl ===================================================================
-if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" -a "$build_os" != "cygwin" \); then
+if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
case "%$CC%$CXX%" in
# If $CC and/or $CXX already contain "ccache" (possibly suffixed with some verison number etc),
# assume that's good then
@@ -4836,22 +4836,24 @@ fi
#
# prefx CXX with ccache if needed
#
-if test "$CCACHE" != ""; then
- AC_MSG_CHECKING([whether $CXX is already ccached])
- AC_LANG_PUSH([C++])
- save_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
- dnl an empty program will do, we're checking the compiler flags
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
- [use_ccache=yes], [use_ccache=no])
- if test $use_ccache = yes; then
- AC_MSG_RESULT([yes])
- else
- CXX="$CCACHE $CXX"
- AC_MSG_RESULT([no])
- fi
- CXXFLAGS=$save_CXXFLAGS
- AC_LANG_POP([C++])
+if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+ if test "$CCACHE" != ""; then
+ AC_MSG_CHECKING([whether $CXX is already ccached])
+ AC_LANG_PUSH([C++])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
+ dnl an empty program will do, we're checking the compiler flags
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [use_ccache=yes], [use_ccache=no])
+ if test $use_ccache = yes; then
+ AC_MSG_RESULT([yes])
+ else
+ CXX="$CCACHE $CXX"
+ AC_MSG_RESULT([no])
+ fi
+ CXXFLAGS=$save_CXXFLAGS
+ AC_LANG_POP([C++])
+ fi
fi
dnl ===================================================================