diff options
author | Fredrik Orderud <forderud@gmail.com> | 2017-09-26 14:29:03 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-26 08:56:20 -0400 |
commit | b3e6514c2a63bcbdce0016a03d1aef98ffb25092 (patch) | |
tree | 4f2b4babd7cdbe61cdfdd4834fcc26fb433efff9 /Source/cmLocalVisualStudio10Generator.cxx | |
parent | c40d130034278e28964929e8d61f3280945b7531 (diff) | |
download | cmake-b3e6514c2a63bcbdce0016a03d1aef98ffb25092.tar.gz |
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.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index db1776ac29..5e81514d4f 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; } } |