diff options
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5bf9d32..cedb367 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -3377,7 +3377,12 @@ void cmLocalGenerator::AppendDefines( if (!this->CheckDefinition(d.Value)) { continue; } - defines.insert(d); + // remove any leading -D + if (cmHasLiteralPrefix(d.Value, "-D")) { + defines.emplace(d.Value.substr(2), d.Backtrace); + } else { + defines.insert(d); + } } } |