summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-02 15:49:07 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-04 12:40:08 (GMT)
commitc85367f408befa419185a4fec4816ea0ee3e1ee6 (patch)
tree38bf982028775eba045b4cabfab5466d49befae4 /Source/cmLocalVisualStudio7Generator.cxx
parentd3bb5da9294ddbfcc5fddf7ba3dafd2c3e0b32b2 (diff)
downloadCMake-c85367f408befa419185a4fec4816ea0ee3e1ee6.zip
CMake-c85367f408befa419185a4fec4816ea0ee3e1ee6.tar.gz
CMake-c85367f408befa419185a4fec4816ea0ee3e1ee6.tar.bz2
VS: Compute project GUIDs deterministically
Compute deterministic GUIDs that are unique to the build tree by hashing the path to the build tree with the GUID logical name. Avoid storing them in the cache, but honor any found there. This will allow project GUIDs to be reproduced in a fresh build tree so long as its path is the same as the original, which may be useful for incremental builds.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 9c031cf..28a74cb 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -82,8 +82,6 @@ void cmLocalVisualStudio7Generator::AddHelperCommands()
// Now create GUIDs for targets
cmTargets &tgts = this->Makefile->GetTargets();
- cmGlobalVisualStudio7Generator* gg =
- static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
{
if(l->second.GetType() == cmTarget::INTERFACE_LIBRARY)
@@ -96,10 +94,6 @@ void cmLocalVisualStudio7Generator::AddHelperCommands()
this->ReadAndStoreExternalGUID(
l->second.GetName().c_str(), path);
}
- else
- {
- gg->CreateGUID(l->first.c_str());
- }
}
@@ -2312,12 +2306,9 @@ void cmLocalVisualStudio7Generator::ReadAndStoreExternalGUID(
{
cmVS7XMLParser parser;
parser.ParseFile(path);
- // if we can not find a GUID then create one
+ // if we can not find a GUID then we will generate one later
if(parser.GUID.size() == 0)
{
- cmGlobalVisualStudio7Generator* gg =
- static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
- gg->CreateGUID(name);
return;
}
std::string guidStoreName = name;