mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 22:37:30 +08:00
cmLocalGenerator: get the configuration when building object paths
Install locations can be per-configuration, so this information is necessary for this call. Plumb it through; usage will follow in the next commit.
This commit is contained in:
@@ -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<std::string> objs;
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -116,7 +116,7 @@ std::string cmLocalCommonGenerator::GetTargetDirectory(
|
||||
|
||||
void cmLocalCommonGenerator::ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& 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();
|
||||
|
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
void ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
cmGeneratorTarget const* gt = nullptr) override;
|
||||
std::string const& config, cmGeneratorTarget const* gt = nullptr) override;
|
||||
|
||||
protected:
|
||||
std::vector<std::string> ConfigNames;
|
||||
|
@@ -60,7 +60,7 @@ cmLocalFastbuildGenerator::GetGlobalFastbuildGenerator()
|
||||
|
||||
void cmLocalFastbuildGenerator::ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
cmGeneratorTarget const* gt)
|
||||
std::string const& config, cmGeneratorTarget const* gt)
|
||||
{
|
||||
for (auto& si : mapping) {
|
||||
cmSourceFile const* sf = si.first;
|
||||
|
@@ -26,7 +26,7 @@ public:
|
||||
|
||||
void ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
cmGeneratorTarget const* gt = nullptr) override;
|
||||
std::string const& config, cmGeneratorTarget const* gt = nullptr) override;
|
||||
|
||||
cmGlobalFastbuildGenerator const* GetGlobalFastbuildGenerator() const;
|
||||
cmGlobalFastbuildGenerator* GetGlobalFastbuildGenerator();
|
||||
|
@@ -4157,7 +4157,7 @@ std::string& cmLocalGenerator::CreateSafeUniqueObjectFileName(
|
||||
|
||||
void cmLocalGenerator::ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& /*unused*/,
|
||||
cmGeneratorTarget const* /*unused*/)
|
||||
std::string const& /*unused*/, cmGeneratorTarget const* /*unused*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -529,7 +529,7 @@ public:
|
||||
|
||||
virtual void ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
cmGeneratorTarget const* gt = nullptr);
|
||||
std::string const& config, cmGeneratorTarget const* gt = nullptr);
|
||||
|
||||
bool IsWindowsShell() const;
|
||||
bool IsWatcomWMake() const;
|
||||
|
@@ -50,7 +50,7 @@ void cmLocalGhsMultiGenerator::Generate()
|
||||
|
||||
void cmLocalGhsMultiGenerator::ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
cmGeneratorTarget const* gt)
|
||||
std::string const& config, cmGeneratorTarget const* gt)
|
||||
{
|
||||
std::string dir_max = cmStrCat(gt->GetSupportDirectory(), '/');
|
||||
|
||||
|
@@ -40,5 +40,5 @@ public:
|
||||
|
||||
void ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
cmGeneratorTarget const* gt = nullptr) override;
|
||||
std::string const& config, cmGeneratorTarget const* gt = nullptr) override;
|
||||
};
|
||||
|
@@ -40,7 +40,7 @@ cmLocalVisualStudioGenerator::GetVersion() const
|
||||
|
||||
void cmLocalVisualStudioGenerator::ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
cmGeneratorTarget const* gt)
|
||||
std::string const& config, cmGeneratorTarget const* gt)
|
||||
{
|
||||
char const* custom_ext = gt->GetCustomObjectExtension();
|
||||
std::string dir_max = this->ComputeLongestObjectDirectory(gt);
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
void ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
cmGeneratorTarget const* = nullptr) override;
|
||||
std::string const& config, cmGeneratorTarget const* = nullptr) override;
|
||||
|
||||
std::string GetObjectOutputRoot(
|
||||
cmStateEnums::IntermediateDirKind kind =
|
||||
|
@@ -121,6 +121,7 @@ void cmLocalXCodeGenerator::AddGeneratorSpecificInstallSetup(std::ostream& os)
|
||||
|
||||
void cmLocalXCodeGenerator::ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
std::string const& config,
|
||||
cmGeneratorTarget const*)
|
||||
{
|
||||
// Count the number of object files with each name. Warn about duplicate
|
||||
|
@@ -38,7 +38,7 @@ public:
|
||||
void AddGeneratorSpecificInstallSetup(std::ostream& os) override;
|
||||
void ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||
cmGeneratorTarget const* gt = nullptr) override;
|
||||
std::string const& config, cmGeneratorTarget const* gt = nullptr) override;
|
||||
|
||||
void AddXCConfigSources(cmGeneratorTarget* target) override;
|
||||
|
||||
|
Reference in New Issue
Block a user