summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorSumit Bhardwaj <subhardw@microsoft.com>2020-01-20 00:41:57 (GMT)
committerBrad King <brad.king@kitware.com>2020-01-24 19:43:37 (GMT)
commiteffd4d05694382598675913b957dda2e08aa7392 (patch)
tree31991b6d67f24e5b845133d349991e213a6eaf31 /Source/cmVisualStudio10TargetGenerator.cxx
parent93d414861251cb6c88021756f53621160b98bf96 (diff)
downloadCMake-effd4d05694382598675913b957dda2e08aa7392.zip
CMake-effd4d05694382598675913b957dda2e08aa7392.tar.gz
CMake-effd4d05694382598675913b957dda2e08aa7392.tar.bz2
CSharp: Do not pass definitions with values
The Microsoft C# tooling does not accept definitions with values. Filter them out. Fixes: #19817
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f707bb4..4478517 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -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);