ENH: Added call to StopBuild VS macro when projects fail to regenerate during a build.
This commit is contained in:
parent
9f864879b4
commit
3b59c7b97a
@ -530,6 +530,10 @@ void cmake::SetArgs(const std::vector<std::string>& args)
|
|||||||
{
|
{
|
||||||
this->CheckStampFile = args[++i];
|
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)
|
else if(arg.find("-V",0) == 0)
|
||||||
{
|
{
|
||||||
this->Verbose = true;
|
this->Verbose = true;
|
||||||
@ -2099,6 +2103,20 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
|
|||||||
int ret = this->Configure();
|
int ret = this->Configure();
|
||||||
if (ret || this->ScriptMode)
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = this->Generate();
|
ret = this->Generate();
|
||||||
|
@ -402,6 +402,7 @@ private:
|
|||||||
std::string CCEnvironment;
|
std::string CCEnvironment;
|
||||||
std::string CheckBuildSystemArgument;
|
std::string CheckBuildSystemArgument;
|
||||||
std::string CheckStampFile;
|
std::string CheckStampFile;
|
||||||
|
std::string VSSolutionFile;
|
||||||
std::string CTestCommand;
|
std::string CTestCommand;
|
||||||
std::string CPackCommand;
|
std::string CPackCommand;
|
||||||
bool ClearBuildSystem;
|
bool ClearBuildSystem;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user