From 8ac8739b2e5df2f36194261f9dcac95107b4b5f7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 23 Oct 2015 18:26:43 +0200 Subject: VS: Port TargetIsFortranOnly to cmGeneratorTarget --- Source/cmGlobalVisualStudio71Generator.cxx | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 2 +- Source/cmGlobalVisualStudioGenerator.cxx | 4 +--- Source/cmGlobalVisualStudioGenerator.h | 2 +- Source/cmLocalVisualStudio10Generator.cxx | 2 +- Source/cmLocalVisualStudio7Generator.cxx | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index adf5c67..195aaa0 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -158,7 +158,7 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, const char* ext = ".vcproj"; const char* project = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""; - if(this->TargetIsFortranOnly(*t->Target)) + if(this->TargetIsFortranOnly(t)) { ext = ".vfproj"; project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 8b874b6..906166c 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -692,7 +692,7 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, const char* ext = ".vcproj"; const char* project = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""; - if(this->TargetIsFortranOnly(*target->Target)) + if(this->TargetIsFortranOnly(target)) { ext = ".vfproj"; project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index c43f884..39a7bda 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -831,10 +831,8 @@ void RegisterVisualStudioMacros(const std::string& macrosFile, } } bool -cmGlobalVisualStudioGenerator::TargetIsFortranOnly(cmTarget const& target) +cmGlobalVisualStudioGenerator::TargetIsFortranOnly(cmGeneratorTarget const* gt) { - cmGeneratorTarget* gt = this->GetGeneratorTarget(&target); - // check to see if this is a fortran build std::set languages; { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 5ada37e..f0bc5dc 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -73,7 +73,7 @@ public: const char* vsSolutionFile = 0); // return true if target is fortran only - bool TargetIsFortranOnly(cmTarget const& t); + bool TargetIsFortranOnly(const cmGeneratorTarget *gt); /** Get the top-level registry key for this VS version. */ std::string GetRegistryBase(); diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 0040331..d59fdc6 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -83,7 +83,7 @@ void cmLocalVisualStudio10Generator::Generate() continue; } if(static_cast(this->GlobalGenerator) - ->TargetIsFortranOnly(*(*l)->Target)) + ->TargetIsFortranOnly(*l)) { this->CreateSingleVCProj((*l)->GetName().c_str(), *l); } diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index a2d4d16..5ba59ee 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -229,7 +229,7 @@ void cmLocalVisualStudio7Generator { cmGlobalVisualStudioGenerator* gg = static_cast(this->GlobalGenerator); - this->FortranProject = gg->TargetIsFortranOnly(*target->Target); + this->FortranProject = gg->TargetIsFortranOnly(target); this->WindowsCEProject = gg->TargetsWindowsCE(); // Intel Fortran for VS10 uses VS9 format ".vfproj" files. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 3f8e627..2bb67fd 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2886,7 +2886,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() // skip fortran targets as they can not be processed by MSBuild // the only reference will be in the .sln file if(static_cast(this->GlobalGenerator) - ->TargetIsFortranOnly(*dt->Target)) + ->TargetIsFortranOnly(dt)) { continue; } -- cgit v0.12