VS: Do not treat custom targets as CSharp targets

Fixes: #16697
This commit is contained in:
Michael Stürmer
2017-03-07 11:40:31 +01:00
committed by Brad King
parent e1adec32b8
commit bd8b5401cf

View File

@@ -750,6 +750,10 @@ bool cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(
if (!gt->GetConfigCommonSourceFiles(sources)) {
return false;
}
// Only "real" targets are allowed to be C# targets.
if (gt->Target->GetType() > cmStateEnums::OBJECT_LIBRARY) {
return false;
}
}
gt->GetLanguages(languages, "");
if (languages.size() == 1) {