summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx7
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);
+ }
}
}