Przeglądaj źródła

Merge topic 'bootstrap_ccache_tweak'

1f994d9fdc bootstrap: Use ccache in script-generated makefile

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2107
Brad King 7 lat temu
rodzic
commit
70b930db38
1 zmienionych plików z 6 dodań i 4 usunięć
  1. 6 4
      bootstrap

+ 6 - 4
bootstrap

@@ -1250,6 +1250,12 @@ else
   echo "${cmake_cxx_compiler} does not have <ext/stdio_filebuf.h>"
   echo "${cmake_cxx_compiler} does not have <ext/stdio_filebuf.h>"
 fi
 fi
 
 
+if [ -n "${cmake_ccache_enabled}" ]; then
+  echo "Building CMake with ccache"
+  cmake_c_compiler="ccache ${cmake_c_compiler}"
+  cmake_cxx_compiler="ccache ${cmake_cxx_compiler}"
+fi
+
 # Just to be safe, let us store compiler and flags to the header file
 # Just to be safe, let us store compiler and flags to the header file
 
 
 cmake_bootstrap_version='$Revision$'
 cmake_bootstrap_version='$Revision$'
@@ -1536,10 +1542,6 @@ cd "${cmake_binary_dir}"
 # build with same compiler and make
 # build with same compiler and make
 CC="${cmake_c_compiler}"
 CC="${cmake_c_compiler}"
 CXX="${cmake_cxx_compiler}"
 CXX="${cmake_cxx_compiler}"
-if [ -n "${cmake_ccache_enabled}" ]; then
-  CC="ccache ${CC}"
-  CXX="ccache ${CXX}"
-fi
 MAKE="${cmake_make_processor}"
 MAKE="${cmake_make_processor}"
 export CC
 export CC
 export CXX
 export CXX