CMake: avoid a reconfigure loop from r213091
authorAlp Toker <alp@nuanti.com>
Tue, 15 Jul 2014 22:11:54 +0000 (22:11 +0000)
committerAlp Toker <alp@nuanti.com>
Tue, 15 Jul 2014 22:11:54 +0000 (22:11 +0000)
Removing the native CMakeCache.txt causes the target to get re-run needlessly
on some systems. We'll want another solution for that part of the fix.

llvm-svn: 213099

llvm/cmake/modules/TableGen.cmake

index e46b4ae..845c986 100644 (file)
@@ -86,8 +86,7 @@ if(CMAKE_CROSSCOMPILING)
   endforeach()
 
   add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt
-    # Remove the old cache to avoid persisting previous flags.
-    COMMAND ${CMAKE_COMMAND} -E remove ${CX_NATIVE_TG_DIR}/CMakeCache.txt
+    # TODO: Clear the old CMakeCache.txt somehow without breaking restat.
     COMMAND ${CMAKE_COMMAND} -UMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release
                              -DLLVM_BUILD_POLLY=OFF ${CX_CMAKE_ARGUMENTS}
                              -G "${CMAKE_GENERATOR}" ${CMAKE_SOURCE_DIR}