mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-28 01:49:23 -05:00
CSharp: Do not pass definitions with values
The Microsoft C# tooling does not accept definitions with values. Filter them out. Fixes: #19817
This commit is contained in:
committed by
Brad King
parent
93d4148612
commit
effd4d0569
@@ -6,6 +6,7 @@
|
||||
#include <set>
|
||||
|
||||
#include <cm/memory>
|
||||
#include <cm/vector>
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
@@ -2801,6 +2802,9 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
||||
case csproj:
|
||||
this->GeneratorTarget->GetCompileDefinitions(targetDefines, configName,
|
||||
"CSharp");
|
||||
cm::erase_if(targetDefines, [](std::string const& def) {
|
||||
return def.find('=') != std::string::npos;
|
||||
});
|
||||
break;
|
||||
}
|
||||
clOptions.AddDefines(targetDefines);
|
||||
|
||||
Reference in New Issue
Block a user