summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-09-22 17:53:25 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-09-22 17:53:25 (GMT)
commitdda5bbd7c9de31ea5da8463a3ae3a73830e0d7c5 (patch)
tree374a44095c31360bca97ead190af8fc72c67aa7e
parent14d5ea7438d4da9aa8c50323418f4ad1c4facc9a (diff)
parent775697d5f5e8812dc642d1e21e7bc5405df943cd (diff)
downloadCMake-dda5bbd7c9de31ea5da8463a3ae3a73830e0d7c5.zip
CMake-dda5bbd7c9de31ea5da8463a3ae3a73830e0d7c5.tar.gz
CMake-dda5bbd7c9de31ea5da8463a3ae3a73830e0d7c5.tar.bz2
Merge topic 'fix_windows7_untar'
775697d Add a delay after untar on windows to make external project work on windows 7
-rw-r--r--Source/cmake.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index e6c7bb0..1e3b018 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1574,6 +1574,24 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
cmSystemTools::Error("Problem extracting tar: ", outFile.c_str());
return 1;
}
+#ifdef WIN32
+ // OK, on windows 7 after we untar some files,
+ // sometimes we can not rename the directory after
+ // the untar is done. This breaks the external project
+ // untar and rename code. So, by default we will wait
+ // 1/10th of a second after the untar. If CMAKE_UNTAR_DELAY
+ // is set in the env, its value will be used instead of 100.
+ int delay = 100;
+ const char* delayVar = cmSystemTools::GetEnv("CMAKE_UNTAR_DELAY");
+ if(delayVar)
+ {
+ delay = atoi(delayVar);
+ }
+ if(delay)
+ {
+ cmSystemTools::Delay(delay);
+ }
+#endif
}
return 0;
}