summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorMichael Stürmer <michael.stuermer@schaeffler.com>2018-03-19 20:15:02 (GMT)
committerMichael Stürmer <michael.stuermer@schaeffler.com>2018-04-23 05:31:21 (GMT)
commitf9042d807db3264772dc08452195809b1f7a3a0c (patch)
treee1ff9fa588889cfe30a721a0fdba0409c78ff618 /Source/cmVisualStudio10TargetGenerator.cxx
parent709277640b577adc98bd2cead613b3c79a5546dd (diff)
downloadCMake-f9042d807db3264772dc08452195809b1f7a3a0c.zip
CMake-f9042d807db3264772dc08452195809b1f7a3a0c.tar.gz
CMake-f9042d807db3264772dc08452195809b1f7a3a0c.tar.bz2
remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index b56104e..f52e79a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -188,9 +188,7 @@ static std::string computeProjectFileExtension(cmGeneratorTarget const* t,
{
std::string res;
res = ".vcxproj";
- std::string lang = t->GetLinkerLanguage(config);
- if (cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(t) ||
- lang == "CSharp") {
+ if (t->HasLanguage("CSharp", config)) {
res = ".csproj";
}
return res;
@@ -3483,15 +3481,17 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
std::string currentBinDir =
this->LocalGenerator->GetCurrentBinaryDirectory();
for (cmComputeLinkInformation::Item const& l : libs) {
- // Do not allow C# targets to be added to the LIB listing. LIB files are
- // used for linking C++ dependencies. C# libraries do not have lib files.
- // Instead, they compile down to C# reference libraries (DLL files). The
- // `<ProjectReference>` elements added to the vcxproj are enough for the
- // IDE to deduce the DLL file required by other C# projects that need its
- // reference library.
- if (l.Target &&
- cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(l.Target)) {
- continue;
+ if (l.Target) {
+ auto managedType = l.Target->GetManagedType("");
+ // Do not allow C# targets to be added to the LIB listing. LIB files are
+ // used for linking C++ dependencies. C# libraries do not have lib files.
+ // Instead, they compile down to C# reference libraries (DLL files). The
+ // `<ProjectReference>` elements added to the vcxproj are enough for the
+ // IDE to deduce the DLL file required by other C# projects that need its
+ // reference library.
+ if (managedType == cmGeneratorTarget::ManagedType::Managed) {
+ continue;
+ }
}
if (l.IsPath) {