Kaydet (Commit) 7d2bbd22 authored tarafından Peter Foley's avatar Peter Foley Kaydeden (comit) David Tardon

prevent ccache from being doubled with MSVC

Change-Id: Idb2fd2a115c5e32d3e894d70c0e86730b38e73e9
üst 0e866192
...@@ -2455,7 +2455,7 @@ AC_SUBST(SYSBASE) ...@@ -2455,7 +2455,7 @@ AC_SUBST(SYSBASE)
dnl =================================================================== dnl ===================================================================
dnl Checks if ccache is available dnl Checks if ccache is available
dnl =================================================================== 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 case "%$CC%$CXX%" in
# If $CC and/or $CXX already contain "ccache" (possibly suffixed with some verison number etc), # If $CC and/or $CXX already contain "ccache" (possibly suffixed with some verison number etc),
# assume that's good then # assume that's good then
...@@ -4850,22 +4850,24 @@ fi ...@@ -4850,22 +4850,24 @@ fi
# #
# prefx CXX with ccache if needed # prefx CXX with ccache if needed
# #
if test "$CCACHE" != ""; then if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
AC_MSG_CHECKING([whether $CXX is already ccached]) if test "$CCACHE" != ""; then
AC_LANG_PUSH([C++]) AC_MSG_CHECKING([whether $CXX is already ccached])
save_CXXFLAGS=$CXXFLAGS AC_LANG_PUSH([C++])
CXXFLAGS="$CXXFLAGS --ccache-skip -O2" save_CXXFLAGS=$CXXFLAGS
dnl an empty program will do, we're checking the compiler flags CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], dnl an empty program will do, we're checking the compiler flags
[use_ccache=yes], [use_ccache=no]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
if test $use_ccache = yes; then [use_ccache=yes], [use_ccache=no])
AC_MSG_RESULT([yes]) if test $use_ccache = yes; then
else AC_MSG_RESULT([yes])
CXX="$CCACHE $CXX" else
AC_MSG_RESULT([no]) CXX="$CCACHE $CXX"
fi AC_MSG_RESULT([no])
CXXFLAGS=$save_CXXFLAGS fi
AC_LANG_POP([C++]) CXXFLAGS=$save_CXXFLAGS
AC_LANG_POP([C++])
fi
fi fi
dnl =================================================================== dnl ===================================================================
......
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