mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-12 20:39:49 -05:00
cmVisualStudio10TargetGenerator: add handling of manual /clr setting
This commit is contained in:
@@ -3813,6 +3813,16 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
|
|||||||
// 'ReferenceOutputAssembly' to false.
|
// 'ReferenceOutputAssembly' to false.
|
||||||
auto referenceNotManaged =
|
auto referenceNotManaged =
|
||||||
dt->GetManagedType("") < cmGeneratorTarget::ManagedType::Mixed;
|
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) {
|
if (referenceNotManaged) {
|
||||||
e2.Element("ReferenceOutputAssembly", "false");
|
e2.Element("ReferenceOutputAssembly", "false");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user