diff --git a/Source/cmFastbuildNormalTargetGenerator.cxx b/Source/cmFastbuildNormalTargetGenerator.cxx index 8ce597c316..a3d2c19158 100644 --- a/Source/cmFastbuildNormalTargetGenerator.cxx +++ b/Source/cmFastbuildNormalTargetGenerator.cxx @@ -570,7 +570,7 @@ void cmFastbuildNormalTargetGenerator::GenerateModuleDefinitionInfo( for (cmSourceFile const* it : objectSources) { mapping[it]; } - GeneratorTarget->LocalGenerator->ComputeObjectFilenames(mapping, + GeneratorTarget->LocalGenerator->ComputeObjectFilenames(mapping, Config, GeneratorTarget); std::vector objs; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 671c278263..4fa320991c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -698,7 +698,7 @@ void cmGeneratorTarget::GetObjectSources( this->Objects[it]; } - this->LocalGenerator->ComputeObjectFilenames(this->Objects, this); + this->LocalGenerator->ComputeObjectFilenames(this->Objects, config, this); this->VisitedConfigsForObjects.insert(config); } @@ -4043,7 +4043,7 @@ void cmGeneratorTarget::GetTargetObjectLocations( mapping[sf]; } - this->LocalGenerator->ComputeObjectFilenames(mapping, this); + this->LocalGenerator->ComputeObjectFilenames(mapping, config, this); auto const buildUseShortPaths = this->GetUseShortObjectNames() ? cmObjectLocations::UseShortPath::Yes diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index d225718b60..dddd6d0d82 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -723,7 +723,7 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand( for (cmSourceFile const* it : objectSources) { mapping[it]; } - gt->LocalGenerator->ComputeObjectFilenames(mapping, gt); + gt->LocalGenerator->ComputeObjectFilenames(mapping, configName, gt); std::string obj_dir = gt->ObjectDirectory; std::string cmakeCommand = cmSystemTools::GetCMakeCommand(); std::string obj_dir_expanded = obj_dir; diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx index 3c026eed99..5e0d81d317 100644 --- a/Source/cmLocalCommonGenerator.cxx +++ b/Source/cmLocalCommonGenerator.cxx @@ -116,7 +116,7 @@ std::string cmLocalCommonGenerator::GetTargetDirectory( void cmLocalCommonGenerator::ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* gt) + std::string const& config, cmGeneratorTarget const* gt) { // Determine if these object files should use a custom extension char const* custom_ext = gt->GetCustomObjectExtension(); diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h index 82271a7454..5de2365c95 100644 --- a/Source/cmLocalCommonGenerator.h +++ b/Source/cmLocalCommonGenerator.h @@ -45,7 +45,7 @@ public: void ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* gt = nullptr) override; + std::string const& config, cmGeneratorTarget const* gt = nullptr) override; protected: std::vector ConfigNames; diff --git a/Source/cmLocalFastbuildGenerator.cxx b/Source/cmLocalFastbuildGenerator.cxx index 8460e5f4ab..46ad852a08 100644 --- a/Source/cmLocalFastbuildGenerator.cxx +++ b/Source/cmLocalFastbuildGenerator.cxx @@ -60,7 +60,7 @@ cmLocalFastbuildGenerator::GetGlobalFastbuildGenerator() void cmLocalFastbuildGenerator::ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* gt) + std::string const& config, cmGeneratorTarget const* gt) { for (auto& si : mapping) { cmSourceFile const* sf = si.first; diff --git a/Source/cmLocalFastbuildGenerator.h b/Source/cmLocalFastbuildGenerator.h index 6e7601aec5..8c9c27da51 100644 --- a/Source/cmLocalFastbuildGenerator.h +++ b/Source/cmLocalFastbuildGenerator.h @@ -26,7 +26,7 @@ public: void ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* gt = nullptr) override; + std::string const& config, cmGeneratorTarget const* gt = nullptr) override; cmGlobalFastbuildGenerator const* GetGlobalFastbuildGenerator() const; cmGlobalFastbuildGenerator* GetGlobalFastbuildGenerator(); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2e338c3ad7..641de76781 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -4157,7 +4157,7 @@ std::string& cmLocalGenerator::CreateSafeUniqueObjectFileName( void cmLocalGenerator::ComputeObjectFilenames( std::map& /*unused*/, - cmGeneratorTarget const* /*unused*/) + std::string const& /*unused*/, cmGeneratorTarget const* /*unused*/) { } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 0fe8203dcf..5c6ef83b20 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -529,7 +529,7 @@ public: virtual void ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* gt = nullptr); + std::string const& config, cmGeneratorTarget const* gt = nullptr); bool IsWindowsShell() const; bool IsWatcomWMake() const; diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx index 910e10df68..4f5f828a92 100644 --- a/Source/cmLocalGhsMultiGenerator.cxx +++ b/Source/cmLocalGhsMultiGenerator.cxx @@ -50,7 +50,7 @@ void cmLocalGhsMultiGenerator::Generate() void cmLocalGhsMultiGenerator::ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* gt) + std::string const& config, cmGeneratorTarget const* gt) { std::string dir_max = cmStrCat(gt->GetSupportDirectory(), '/'); diff --git a/Source/cmLocalGhsMultiGenerator.h b/Source/cmLocalGhsMultiGenerator.h index 390648788e..6f4c5f81b0 100644 --- a/Source/cmLocalGhsMultiGenerator.h +++ b/Source/cmLocalGhsMultiGenerator.h @@ -40,5 +40,5 @@ public: void ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* gt = nullptr) override; + std::string const& config, cmGeneratorTarget const* gt = nullptr) override; }; diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 4146128313..763d7210aa 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -40,7 +40,7 @@ cmLocalVisualStudioGenerator::GetVersion() const void cmLocalVisualStudioGenerator::ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* gt) + std::string const& config, cmGeneratorTarget const* gt) { char const* custom_ext = gt->GetCustomObjectExtension(); std::string dir_max = this->ComputeLongestObjectDirectory(gt); diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 8c472c5e96..e9ea26cf09 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -51,7 +51,7 @@ public: void ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* = nullptr) override; + std::string const& config, cmGeneratorTarget const* = nullptr) override; std::string GetObjectOutputRoot( cmStateEnums::IntermediateDirKind kind = diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx index b49b717632..4f026a6f56 100644 --- a/Source/cmLocalXCodeGenerator.cxx +++ b/Source/cmLocalXCodeGenerator.cxx @@ -121,6 +121,7 @@ void cmLocalXCodeGenerator::AddGeneratorSpecificInstallSetup(std::ostream& os) void cmLocalXCodeGenerator::ComputeObjectFilenames( std::map& mapping, + std::string const& config, cmGeneratorTarget const*) { // Count the number of object files with each name. Warn about duplicate diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h index aea32e1c54..bef42f77a7 100644 --- a/Source/cmLocalXCodeGenerator.h +++ b/Source/cmLocalXCodeGenerator.h @@ -38,7 +38,7 @@ public: void AddGeneratorSpecificInstallSetup(std::ostream& os) override; void ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* gt = nullptr) override; + std::string const& config, cmGeneratorTarget const* gt = nullptr) override; void AddXCConfigSources(cmGeneratorTarget* target) override;