better error reporting
This commit is contained in:
parent
620b832da3
commit
11a698558e
|
@ -465,15 +465,22 @@ void cmMakefile::AddCustomCommand(const char* source,
|
||||||
sname += ".rule";
|
sname += ".rule";
|
||||||
if (!this->GetSource(sname.c_str()))
|
if (!this->GetSource(sname.c_str()))
|
||||||
{
|
{
|
||||||
m_Targets[target].GetSourceLists().push_back(source);
|
if (m_Targets.find(target) != m_Targets.end())
|
||||||
|
{
|
||||||
|
m_Targets[target].GetSourceLists().push_back(source);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmSystemTools::Error("Attempt to add a custom rule to a target that does not exist yet for target ", target);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->AddCustomCommandToTarget(target, command, commandArgs,
|
this->AddCustomCommandToTarget(target, command, commandArgs,
|
||||||
cmTarget::POST_BUILD,
|
cmTarget::POST_BUILD, comment);
|
||||||
comment);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -931,7 +938,6 @@ void cmMakefile::AddExecutable(const char *exeName,
|
||||||
this->AddGlobalLinkInformation(exeName, target);
|
this->AddGlobalLinkInformation(exeName, target);
|
||||||
m_Targets.insert(cmTargets::value_type(exeName,target));
|
m_Targets.insert(cmTargets::value_type(exeName,target));
|
||||||
|
|
||||||
|
|
||||||
// Add an entry into the cache
|
// Add an entry into the cache
|
||||||
std::string exePath = exeName;
|
std::string exePath = exeName;
|
||||||
exePath += "_CMAKE_PATH";
|
exePath += "_CMAKE_PATH";
|
||||||
|
|
Loading…
Reference in New Issue