summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx13
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx40
2 files changed, 46 insertions, 7 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index e5583c1..0716773 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -295,8 +295,17 @@ void cmGlobalVisualStudio71Generator::WriteProjectDepends(std::ostream& fout,
// target names anyways.
name.erase(name.begin(), name.begin() + 27);
}
- fout << "\t\t{" << this->GetGUID(name.c_str()) << "} = {"
- << this->GetGUID(name.c_str()) << "}\n";
+ std::string guid = this->GetGUID(name.c_str());
+ if(guid.size() == 0)
+ {
+ std::string m = "Target: ";
+ m += target.GetName();
+ m += " depends on unknown target: ";
+ m += name;
+ cmSystemTools::Error(m.c_str());
+ }
+
+ fout << "\t\t{" << guid << "} = {" << guid << "}\n";
}
}
}
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index ef2faf8..7172d7c 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -435,8 +435,18 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
int depcount = 0;
for(iter = depends.begin(); iter != depends.end(); ++iter)
{
+ std::string guid = this->GetGUID(iter->c_str());
+ if(guid.size() == 0)
+ {
+ std::string m = "Target: ";
+ m += l->first;
+ m += " depends on unknown target: ";
+ m += iter->c_str();
+ cmSystemTools::Error(m.c_str());
+ }
+
fout << "\t\t{" << this->GetGUID(name.c_str()) << "}." << depcount << " = {"
- << this->GetGUID(iter->c_str()) << "}\n";
+ << guid.c_str() << "}\n";
depcount++;
}
}
@@ -532,8 +542,18 @@ void cmGlobalVisualStudio7Generator::WriteProjectDepends(std::ostream& fout,
= m_CMakeInstance->GetCacheDefinition(libPath.c_str());
if(cacheValue && *cacheValue)
{
+ std::string guid = this->GetGUID(j->first.c_str());
+ if(guid.size() == 0)
+ {
+ std::string m = "Target: ";
+ m += dspname;
+ m += " depends on unknown target: ";
+ m += j->first.c_str();
+ cmSystemTools::Error(m.c_str());
+ }
+
fout << "\t\t{" << this->GetGUID(dspname) << "}." << depcount << " = {"
- << this->GetGUID(j->first.c_str()) << "}\n";
+ << guid << "}\n";
depcount++;
}
}
@@ -559,8 +579,18 @@ void cmGlobalVisualStudio7Generator::WriteProjectDepends(std::ostream& fout,
// target names anyways.
name.erase(name.begin(), name.begin() + 27);
}
+ std::string guid = this->GetGUID(name.c_str());
+ if(guid.size() == 0)
+ {
+ std::string m = "Target: ";
+ m += dspname;
+ m += " depends on unknown target: ";
+ m += name.c_str();
+ cmSystemTools::Error(m.c_str());
+ }
+
fout << "\t\t{" << this->GetGUID(dspname) << "}." << depcount << " = {"
- << this->GetGUID(name.c_str()) << "}\n";
+ << guid << "}\n";
depcount++;
}
}
@@ -634,9 +664,9 @@ std::string cmGlobalVisualStudio7Generator::GetGUID(const char* name)
{
return std::string(storedGUID);
}
- cmSystemTools::Error("Internal CMake Error, Could not find GUID for target: ",
+ cmSystemTools::Error("Unknown Target referenced : ",
name);
- return guidStoreName;
+ return "";
}