1
0
Эх сурвалжийг харах

VS: Port TargetIsFortranOnly to cmGeneratorTarget

Stephen Kelly 10 жил өмнө
parent
commit
8ac8739b2e

+ 1 - 1
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}\") = \"";

+ 1 - 1
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}\") = \"";

+ 1 - 3
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<std::string> languages;
   {

+ 1 - 1
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();

+ 1 - 1
Source/cmLocalVisualStudio10Generator.cxx

@@ -83,7 +83,7 @@ void cmLocalVisualStudio10Generator::Generate()
       continue;
       }
     if(static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator)
-       ->TargetIsFortranOnly(*(*l)->Target))
+       ->TargetIsFortranOnly(*l))
       {
       this->CreateSingleVCProj((*l)->GetName().c_str(), *l);
       }

+ 1 - 1
Source/cmLocalVisualStudio7Generator.cxx

@@ -229,7 +229,7 @@ void cmLocalVisualStudio7Generator
 {
   cmGlobalVisualStudioGenerator* gg
       = static_cast<cmGlobalVisualStudioGenerator*>(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.

+ 1 - 1
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<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator)
-       ->TargetIsFortranOnly(*dt->Target))
+       ->TargetIsFortranOnly(dt))
       {
       continue;
       }