mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 02:19:18 -05:00
COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases
Fixes: #24186
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user