diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index a7f0616f5..c4cbdef39 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -1935,7 +1935,7 @@ cmLocalVisualStudio6Generator //---------------------------------------------------------------------------- std::string cmLocalVisualStudio6Generator -::ComputeLongestObjectDirectory(cmTarget&) const +::ComputeLongestObjectDirectory(cmGeneratorTarget const*) const { // Compute the maximum length configuration name. std::string config_max; diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h index 4772d548d..dab32a5f8 100644 --- a/Source/cmLocalVisualStudio6Generator.h +++ b/Source/cmLocalVisualStudio6Generator.h @@ -50,7 +50,8 @@ public: virtual std::string GetTargetDirectory(cmGeneratorTarget const* target) const; - virtual std::string ComputeLongestObjectDirectory(cmTarget&) const; + virtual std::string + ComputeLongestObjectDirectory(cmGeneratorTarget const*) const; private: std::string DSPHeaderTemplate; std::string DSPFooterTemplate; diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index a3ca67e67..8b1915a3b 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1689,10 +1689,10 @@ cmLocalVisualStudio7GeneratorFCInfo //---------------------------------------------------------------------------- std::string cmLocalVisualStudio7Generator -::ComputeLongestObjectDirectory(cmTarget& target) const +::ComputeLongestObjectDirectory(cmGeneratorTarget const* target) const { std::vector configs; - target.GetMakefile()->GetConfigurations(configs); + target->Target->GetMakefile()->GetConfigurations(configs); // Compute the maximum length configuration name. std::string config_max; @@ -1711,9 +1711,7 @@ cmLocalVisualStudio7Generator std::string dir_max; dir_max += this->GetCurrentBinaryDirectory(); dir_max += "/"; - cmGeneratorTarget* gt = - this->GlobalGenerator->GetGeneratorTarget(&target); - dir_max += this->GetTargetDirectory(gt); + dir_max += this->GetTargetDirectory(target); dir_max += "/"; dir_max += config_max; dir_max += "/"; diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index deb8d8f84..7bb9cc6a0 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -56,7 +56,8 @@ public: std::string GetTargetDirectory(cmGeneratorTarget const* target) const; cmSourceFile* CreateVCProjBuildRule(); void WriteStampFiles(); - virtual std::string ComputeLongestObjectDirectory(cmTarget&) const; + virtual std::string + ComputeLongestObjectDirectory(cmGeneratorTarget const*) const; virtual void ReadAndStoreExternalGUID(const std::string& name, const char* path); diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 2f44fb7c2..8516ce7cb 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -43,7 +43,7 @@ void cmLocalVisualStudioGenerator::ComputeObjectFilenames( std::map& mapping, cmGeneratorTarget const* gt) { - std::string dir_max = this->ComputeLongestObjectDirectory(*gt->Target); + std::string dir_max = this->ComputeLongestObjectDirectory(gt); // Count the number of object files with each name. Note that // windows file names are not case sensitive. diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 071bfb31b..6d915e7c2 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -44,7 +44,8 @@ public: cmGlobalVisualStudioGenerator::VSVersion GetVersion() const; - virtual std::string ComputeLongestObjectDirectory(cmTarget&) const = 0; + virtual std::string + ComputeLongestObjectDirectory(cmGeneratorTarget const*) const = 0; virtual void AddCMakeListsRules() = 0;