summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMichael Stürmer <michael.stuermer@schaeffler.com>2018-04-27 05:31:03 (GMT)
committerMichael Stürmer <michael.stuermer@schaeffler.com>2018-05-07 05:21:10 (GMT)
commitd244f2cad3fea2884eb706e2761189ea9644b70b (patch)
treefca6730f7b2019f5cd507eb65d71f53d393cd0f0 /Source
parent1e5a8f882f36648a74c54ebda1d2480bb99c29b1 (diff)
downloadCMake-d244f2cad3fea2884eb706e2761189ea9644b70b.zip
CMake-d244f2cad3fea2884eb706e2761189ea9644b70b.tar.gz
CMake-d244f2cad3fea2884eb706e2761189ea9644b70b.tar.bz2
cmVisualStudio10TargetGenerator: add handling of manual /clr setting
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 95e52e6..3fb0e10 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3813,6 +3813,16 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
// 'ReferenceOutputAssembly' to false.
auto referenceNotManaged =
dt->GetManagedType("") < cmGeneratorTarget::ManagedType::Mixed;
+ // Workaround to check for manually set /clr flags.
+ if (referenceNotManaged) {
+ if (const auto* flags = dt->GetProperty("COMPILE_OPTIONS")) {
+ std::string flagsStr = flags;
+ if (flagsStr.find("clr") != std::string::npos) {
+ // There is a warning already issued when building the flags.
+ referenceNotManaged = false;
+ }
+ }
+ }
if (referenceNotManaged) {
e2.Element("ReferenceOutputAssembly", "false");
}