summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2015-06-04 13:48:03 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2015-06-05 07:17:17 (GMT)
commitcdf2cba3e71b92c5bddf7afe760c131953f999a4 (patch)
treebe6347bfd4aaf7146d40a11cb9e6df1eaab93e65 /Source/cmGlobalVisualStudio7Generator.cxx
parentc85367f408befa419185a4fec4816ea0ee3e1ee6 (diff)
downloadCMake-cdf2cba3e71b92c5bddf7afe760c131953f999a4.zip
CMake-cdf2cba3e71b92c5bddf7afe760c131953f999a4.tar.gz
CMake-cdf2cba3e71b92c5bddf7afe760c131953f999a4.tar.bz2
VS: Use cmUuid RFC 4122 compliant hash based UUID generation
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index a242046..0ced245 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -15,6 +15,7 @@
#include "cmGeneratedFileStream.h"
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
+#include "cmUuid.h"
#include "cmake.h"
#include <cmsys/Encoding.hxx>
@@ -953,14 +954,15 @@ std::string cmGlobalVisualStudio7Generator::GetGUID(std::string const& name)
std::string input = this->CMakeInstance->GetState()->GetBinaryDirectory();
input += "|";
input += name;
- std::string md5 = cmSystemTools::ComputeStringMD5(input);
- assert(md5.length() == 32);
- std::string const& guid =
- (md5.substr( 0,8)+"-"+
- md5.substr( 8,4)+"-"+
- md5.substr(12,4)+"-"+
- md5.substr(16,4)+"-"+
- md5.substr(20,12));
+
+ cmUuid uuidGenerator;
+
+ std::vector<unsigned char> uuidNamespace;
+ uuidGenerator.StringToBinary(
+ "ee30c4be-5192-4fb0-b335-722a2dffe760", uuidNamespace);
+
+ std::string guid = uuidGenerator.FromMd5(uuidNamespace, input);
+
return cmSystemTools::UpperCase(guid);
}