[cmake-commits] king committed cmake.cxx 1.332 1.333 cmake.h 1.94 1.95
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Nov 19 13:45:18 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv16681/Source
Modified Files:
cmake.cxx cmake.h
Log Message:
ENH: Added call to StopBuild VS macro when projects fail to regenerate during a build.
Index: cmake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- cmake.h 10 Nov 2007 13:15:13 -0000 1.94
+++ cmake.h 19 Nov 2007 18:45:16 -0000 1.95
@@ -402,6 +402,7 @@
std::string CCEnvironment;
std::string CheckBuildSystemArgument;
std::string CheckStampFile;
+ std::string VSSolutionFile;
std::string CTestCommand;
std::string CPackCommand;
bool ClearBuildSystem;
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.332
retrieving revision 1.333
diff -u -d -r1.332 -r1.333
--- cmake.cxx 16 Nov 2007 12:01:58 -0000 1.332
+++ cmake.cxx 19 Nov 2007 18:45:16 -0000 1.333
@@ -530,6 +530,10 @@
{
this->CheckStampFile = args[++i];
}
+ else if((i < args.size()-1) && (arg.find("--vs-solution-file",0) == 0))
+ {
+ this->VSSolutionFile = args[++i];
+ }
else if(arg.find("-V",0) == 0)
{
this->Verbose = true;
@@ -2099,6 +2103,20 @@
int ret = this->Configure();
if (ret || this->ScriptMode)
{
+ if(!this->VSSolutionFile.empty() && this->GlobalGenerator)
+ {
+ // CMake is running to regenerate a Visual Studio build tree
+ // during a build from the VS IDE. The build files cannot be
+ // regenerated, so we should stop the build.
+ cmSystemTools::Message(
+ "CMake Configure step failed. "
+ "Build files cannot be regenerated correctly. "
+ "Attempting to stop IDE build.");
+ cmGlobalVisualStudioGenerator* gg =
+ static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator);
+ gg->CallVisualStudioMacro(cmGlobalVisualStudioGenerator::MacroStop,
+ this->VSSolutionFile.c_str());
+ }
return ret;
}
ret = this->Generate();
More information about the Cmake-commits
mailing list