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) {
|
for (cmSourceFile const* it : objectSources) {
|
||||||
mapping[it];
|
mapping[it];
|
||||||
}
|
}
|
||||||
GeneratorTarget->LocalGenerator->ComputeObjectFilenames(mapping,
|
GeneratorTarget->LocalGenerator->ComputeObjectFilenames(mapping, Config,
|
||||||
GeneratorTarget);
|
GeneratorTarget);
|
||||||
|
|
||||||
std::vector<std::string> objs;
|
std::vector<std::string> objs;
|
||||||
|
@@ -698,7 +698,7 @@ void cmGeneratorTarget::GetObjectSources(
|
|||||||
this->Objects[it];
|
this->Objects[it];
|
||||||
}
|
}
|
||||||
|
|
||||||
this->LocalGenerator->ComputeObjectFilenames(this->Objects, this);
|
this->LocalGenerator->ComputeObjectFilenames(this->Objects, config, this);
|
||||||
this->VisitedConfigsForObjects.insert(config);
|
this->VisitedConfigsForObjects.insert(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4043,7 +4043,7 @@ void cmGeneratorTarget::GetTargetObjectLocations(
|
|||||||
mapping[sf];
|
mapping[sf];
|
||||||
}
|
}
|
||||||
|
|
||||||
this->LocalGenerator->ComputeObjectFilenames(mapping, this);
|
this->LocalGenerator->ComputeObjectFilenames(mapping, config, this);
|
||||||
|
|
||||||
auto const buildUseShortPaths = this->GetUseShortObjectNames()
|
auto const buildUseShortPaths = this->GetUseShortObjectNames()
|
||||||
? cmObjectLocations::UseShortPath::Yes
|
? cmObjectLocations::UseShortPath::Yes
|
||||||
|
@@ -723,7 +723,7 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
|
|||||||
for (cmSourceFile const* it : objectSources) {
|
for (cmSourceFile const* it : objectSources) {
|
||||||
mapping[it];
|
mapping[it];
|
||||||
}
|
}
|
||||||
gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
|
gt->LocalGenerator->ComputeObjectFilenames(mapping, configName, gt);
|
||||||
std::string obj_dir = gt->ObjectDirectory;
|
std::string obj_dir = gt->ObjectDirectory;
|
||||||
std::string cmakeCommand = cmSystemTools::GetCMakeCommand();
|
std::string cmakeCommand = cmSystemTools::GetCMakeCommand();
|
||||||
std::string obj_dir_expanded = obj_dir;
|
std::string obj_dir_expanded = obj_dir;
|
||||||
|
@@ -116,7 +116,7 @@ std::string cmLocalCommonGenerator::GetTargetDirectory(
|
|||||||
|
|
||||||
void cmLocalCommonGenerator::ComputeObjectFilenames(
|
void cmLocalCommonGenerator::ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
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
|
// Determine if these object files should use a custom extension
|
||||||
char const* custom_ext = gt->GetCustomObjectExtension();
|
char const* custom_ext = gt->GetCustomObjectExtension();
|
||||||
|
@@ -45,7 +45,7 @@ public:
|
|||||||
|
|
||||||
void ComputeObjectFilenames(
|
void ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||||
cmGeneratorTarget const* gt = nullptr) override;
|
std::string const& config, cmGeneratorTarget const* gt = nullptr) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::vector<std::string> ConfigNames;
|
std::vector<std::string> ConfigNames;
|
||||||
|
@@ -60,7 +60,7 @@ cmLocalFastbuildGenerator::GetGlobalFastbuildGenerator()
|
|||||||
|
|
||||||
void cmLocalFastbuildGenerator::ComputeObjectFilenames(
|
void cmLocalFastbuildGenerator::ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||||
cmGeneratorTarget const* gt)
|
std::string const& config, cmGeneratorTarget const* gt)
|
||||||
{
|
{
|
||||||
for (auto& si : mapping) {
|
for (auto& si : mapping) {
|
||||||
cmSourceFile const* sf = si.first;
|
cmSourceFile const* sf = si.first;
|
||||||
|
@@ -26,7 +26,7 @@ public:
|
|||||||
|
|
||||||
void ComputeObjectFilenames(
|
void ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
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 const* GetGlobalFastbuildGenerator() const;
|
||||||
cmGlobalFastbuildGenerator* GetGlobalFastbuildGenerator();
|
cmGlobalFastbuildGenerator* GetGlobalFastbuildGenerator();
|
||||||
|
@@ -4157,7 +4157,7 @@ std::string& cmLocalGenerator::CreateSafeUniqueObjectFileName(
|
|||||||
|
|
||||||
void cmLocalGenerator::ComputeObjectFilenames(
|
void cmLocalGenerator::ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& /*unused*/,
|
std::map<cmSourceFile const*, cmObjectLocations>& /*unused*/,
|
||||||
cmGeneratorTarget const* /*unused*/)
|
std::string const& /*unused*/, cmGeneratorTarget const* /*unused*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -529,7 +529,7 @@ public:
|
|||||||
|
|
||||||
virtual void ComputeObjectFilenames(
|
virtual void ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||||
cmGeneratorTarget const* gt = nullptr);
|
std::string const& config, cmGeneratorTarget const* gt = nullptr);
|
||||||
|
|
||||||
bool IsWindowsShell() const;
|
bool IsWindowsShell() const;
|
||||||
bool IsWatcomWMake() const;
|
bool IsWatcomWMake() const;
|
||||||
|
@@ -50,7 +50,7 @@ void cmLocalGhsMultiGenerator::Generate()
|
|||||||
|
|
||||||
void cmLocalGhsMultiGenerator::ComputeObjectFilenames(
|
void cmLocalGhsMultiGenerator::ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||||
cmGeneratorTarget const* gt)
|
std::string const& config, cmGeneratorTarget const* gt)
|
||||||
{
|
{
|
||||||
std::string dir_max = cmStrCat(gt->GetSupportDirectory(), '/');
|
std::string dir_max = cmStrCat(gt->GetSupportDirectory(), '/');
|
||||||
|
|
||||||
|
@@ -40,5 +40,5 @@ public:
|
|||||||
|
|
||||||
void ComputeObjectFilenames(
|
void ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
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(
|
void cmLocalVisualStudioGenerator::ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||||
cmGeneratorTarget const* gt)
|
std::string const& config, cmGeneratorTarget const* gt)
|
||||||
{
|
{
|
||||||
char const* custom_ext = gt->GetCustomObjectExtension();
|
char const* custom_ext = gt->GetCustomObjectExtension();
|
||||||
std::string dir_max = this->ComputeLongestObjectDirectory(gt);
|
std::string dir_max = this->ComputeLongestObjectDirectory(gt);
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
|
|
||||||
void ComputeObjectFilenames(
|
void ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||||
cmGeneratorTarget const* = nullptr) override;
|
std::string const& config, cmGeneratorTarget const* = nullptr) override;
|
||||||
|
|
||||||
std::string GetObjectOutputRoot(
|
std::string GetObjectOutputRoot(
|
||||||
cmStateEnums::IntermediateDirKind kind =
|
cmStateEnums::IntermediateDirKind kind =
|
||||||
|
@@ -121,6 +121,7 @@ void cmLocalXCodeGenerator::AddGeneratorSpecificInstallSetup(std::ostream& os)
|
|||||||
|
|
||||||
void cmLocalXCodeGenerator::ComputeObjectFilenames(
|
void cmLocalXCodeGenerator::ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
||||||
|
std::string const& config,
|
||||||
cmGeneratorTarget const*)
|
cmGeneratorTarget const*)
|
||||||
{
|
{
|
||||||
// Count the number of object files with each name. Warn about duplicate
|
// Count the number of object files with each name. Warn about duplicate
|
||||||
|
@@ -38,7 +38,7 @@ public:
|
|||||||
void AddGeneratorSpecificInstallSetup(std::ostream& os) override;
|
void AddGeneratorSpecificInstallSetup(std::ostream& os) override;
|
||||||
void ComputeObjectFilenames(
|
void ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, cmObjectLocations>& mapping,
|
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;
|
void AddXCConfigSources(cmGeneratorTarget* target) override;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user