summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-06-09 13:48:44 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-06-09 13:48:44 (GMT)
commit2d4b06c8e55cb78434d9bb8f558c97feccf6335b (patch)
treeb54c043bf7815e0a969f4da04469af72ac3667b8 /Source
parenta7fcb0741854c9759cc64cb2cf482876c01230fd (diff)
downloadCMake-2d4b06c8e55cb78434d9bb8f558c97feccf6335b.zip
CMake-2d4b06c8e55cb78434d9bb8f558c97feccf6335b.tar.gz
CMake-2d4b06c8e55cb78434d9bb8f558c97feccf6335b.tar.bz2
ENH: some better error reporting and more robust handlign of bad targets
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx16
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx3
2 files changed, 12 insertions, 7 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 7a155d5..c225f43 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -704,7 +704,9 @@ cmGlobalUnixMakefileGenerator3
{
// Don't emit the same rule twice (e.g. two targets with the same
// simple name)
- if(emitted.insert(t->second.GetName()).second)
+ if(t->second.GetName() &&
+ strlen(t->second.GetName()) &&
+ emitted.insert(t->second.GetName()).second)
{
// Add a rule to build the target by name.
lg->WriteDivider(ruleFileStream);
@@ -749,11 +751,13 @@ cmGlobalUnixMakefileGenerator3
bool needRequiresStep = this->NeedRequiresStep(lg);
for(cmTargets::const_iterator t = targets.begin(); t != targets.end(); ++t)
{
- if((t->second.GetType() == cmTarget::EXECUTABLE) ||
- (t->second.GetType() == cmTarget::STATIC_LIBRARY) ||
- (t->second.GetType() == cmTarget::SHARED_LIBRARY) ||
- (t->second.GetType() == cmTarget::MODULE_LIBRARY) ||
- (t->second.GetType() == cmTarget::UTILITY))
+ if (((t->second.GetType() == cmTarget::EXECUTABLE) ||
+ (t->second.GetType() == cmTarget::STATIC_LIBRARY) ||
+ (t->second.GetType() == cmTarget::SHARED_LIBRARY) ||
+ (t->second.GetType() == cmTarget::MODULE_LIBRARY) ||
+ (t->second.GetType() == cmTarget::UTILITY)) &&
+ t->second.GetName() &&
+ strlen(t->second.GetName()))
{
// Add a rule to build the target by name.
localName = lg->GetRelativeTargetDirectory(t->second);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index df0c2c0..1e2ce43 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -864,7 +864,8 @@ cmLocalUnixMakefileGenerator3
// Make sure there is a target.
if(!target || !*target)
{
- cmSystemTools::Error("No target for WriteMakeRule!");
+ cmSystemTools::Error("No target for WriteMakeRule! called with comment: ",
+ comment);
return;
}