diff options
author | Michael Stürmer <michael.stuermer@schaeffler.com> | 2018-03-19 20:15:02 (GMT) |
---|---|---|
committer | Michael Stürmer <michael.stuermer@schaeffler.com> | 2018-04-23 05:31:21 (GMT) |
commit | f9042d807db3264772dc08452195809b1f7a3a0c (patch) | |
tree | e1ff9fa588889cfe30a721a0fdba0409c78ff618 /Source/cmGlobalVisualStudioGenerator.cxx | |
parent | 709277640b577adc98bd2cead613b3c79a5546dd (diff) | |
download | CMake-f9042d807db3264772dc08452195809b1f7a3a0c.zip CMake-f9042d807db3264772dc08452195809b1f7a3a0c.tar.gz CMake-f9042d807db3264772dc08452195809b1f7a3a0c.tar.bz2 |
remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index fa7dc51..a0e5d06 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -734,33 +734,10 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly( return false; } -bool cmGlobalVisualStudioGenerator::TargetIsCSharpOnly( - cmGeneratorTarget const* gt) -{ - // C# targets can be defined with add_library() (using SHARED or STATIC) and - // also using add_executable(). We do not treat imported C# targets the same - // (these come in as UTILITY) - if (gt->GetType() != cmStateEnums::SHARED_LIBRARY && - gt->GetType() != cmStateEnums::STATIC_LIBRARY && - gt->GetType() != cmStateEnums::EXECUTABLE) { - return false; - } - - // Issue diagnostic if the source files depend on the config. - std::vector<cmSourceFile*> sources; - if (!gt->GetConfigCommonSourceFiles(sources)) { - return false; - } - - std::set<std::string> languages; - gt->GetLanguages(languages, ""); - return languages.size() == 1 && languages.count("CSharp") > 0; -} - bool cmGlobalVisualStudioGenerator::TargetCanBeReferenced( cmGeneratorTarget const* gt) { - if (this->TargetIsCSharpOnly(gt)) { + if (gt->GetManagedType("") != cmGeneratorTarget::ManagedType::Native) { return true; } if (gt->GetType() != cmStateEnums::SHARED_LIBRARY && |