summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio10Generator.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/cmLocalVisualStudio10Generator.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/cmLocalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio10Generator.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx
index db1776a..5e81514 100644
--- a/Source/cmLocalVisualStudio10Generator.cxx
+++ b/Source/cmLocalVisualStudio10Generator.cxx
@@ -17,7 +17,12 @@ public:
virtual void CharacterDataHandler(const char* data, int length)
{
if (this->DoGUID) {
- this->GUID.assign(data + 1, length - 2);
+ if (data[0] == '{') {
+ // remove surrounding curly brackets
+ this->GUID.assign(data + 1, length - 2);
+ } else {
+ this->GUID.assign(data, length);
+ }
this->DoGUID = false;
}
}