summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorFredrik Orderud <forderud@gmail.com>2017-09-26 12:29:03 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-26 12:56:20 (GMT)
commitb3e6514c2a63bcbdce0016a03d1aef98ffb25092 (patch)
tree4f2b4babd7cdbe61cdfdd4834fcc26fb433efff9 /Source/cmLocalVisualStudio7Generator.cxx
parentc40d130034278e28964929e8d61f3280945b7531 (diff)
downloadCMake-b3e6514c2a63bcbdce0016a03d1aef98ffb25092.zip
CMake-b3e6514c2a63bcbdce0016a03d1aef98ffb25092.tar.gz
CMake-b3e6514c2a63bcbdce0016a03d1aef98ffb25092.tar.bz2
VS: Adapt project parsers to support "ProjectGUID" without curly brackets
This is needed to correctly parse Windows Installer "wiproj" projects, that by default contain "ProjectGUID" tags with GUID values without surrounding curly brackets. Otherwise CMake truncates the first & last character from the GUID value for these projects.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index a1771ee..afd71c8 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -2079,7 +2079,10 @@ public:
if (strcmp(atts[i], "ProjectGUID") == 0) {
if (atts[i + 1]) {
this->GUID = atts[i + 1];
- this->GUID = this->GUID.substr(1, this->GUID.size() - 2);
+ if (this->GUID[0] == '{') {
+ // remove surrounding curly brackets
+ this->GUID = this->GUID.substr(1, this->GUID.size() - 2);
+ }
} else {
this->GUID.clear();
}