diff options
author | Michael Stürmer <michael.stuermer@schaeffler.com> | 2018-04-27 05:29:57 (GMT) |
---|---|---|
committer | Michael Stürmer <michael.stuermer@schaeffler.com> | 2018-05-07 05:21:08 (GMT) |
commit | 1e5a8f882f36648a74c54ebda1d2480bb99c29b1 (patch) | |
tree | a7b0b329263eb2c2593b76ff7442f5bf5afcaba0 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 8d7ffed04819669ebc9fb365ade6bffaab443a3a (diff) | |
download | CMake-1e5a8f882f36648a74c54ebda1d2480bb99c29b1.zip CMake-1e5a8f882f36648a74c54ebda1d2480bb99c29b1.tar.gz CMake-1e5a8f882f36648a74c54ebda1d2480bb99c29b1.tar.bz2 |
cmVisualStudio10TargetGenerator: fix checking for managed target
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index da00f5c..95e52e6 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3811,18 +3811,9 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0) // If the dependency target is not managed (compiled with /clr or // C# target) we cannot reference it and have to set // 'ReferenceOutputAssembly' to false. - cmGeneratorTarget::ManagedType check = - cmGeneratorTarget::ManagedType::Mixed; - // FIXME: These (5) lines should be removed. They are here to allow - // manual setting of the /clr flag in compiler options. Setting - // /clr manually makes cmGeneratorTarget::GetManagedType() return - // 'Native' instead of 'Mixed' or 'Managed'. - check = cmGeneratorTarget::ManagedType::Native; - bool unmanagedStatic = false; - if (dt->GetType() == cmStateEnums::STATIC_LIBRARY) { - unmanagedStatic = !dt->HasLanguage("CSharp", ""); - } - if (dt->GetManagedType("") < check || unmanagedStatic) { + auto referenceNotManaged = + dt->GetManagedType("") < cmGeneratorTarget::ManagedType::Mixed; + if (referenceNotManaged) { e2.Element("ReferenceOutputAssembly", "false"); } } |