mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-05 22:28:35 -06:00
generators: use GetObjectOutputRoot to compute target directories
In a coming change to shorten directory paths, this allows one place to decide how to compute the target path root.
This commit is contained in:
@@ -972,8 +972,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
|||||||
xml, "Build", make, buildArgs, virtDir, "", targetName.c_str());
|
xml, "Build", make, buildArgs, virtDir, "", targetName.c_str());
|
||||||
|
|
||||||
std::string cleanArgs =
|
std::string cleanArgs =
|
||||||
cmStrCat("-E chdir \"", lgen->GetCurrentBinaryDirectory(),
|
cmStrCat("-E chdir \"", lgen->GetObjectOutputRoot(), "\" \"",
|
||||||
"\" \"", cmSystemTools::GetCMakeCommand(), "\" -P \"");
|
cmSystemTools::GetCMakeCommand(), "\" -P \"");
|
||||||
cleanArgs += lgen->GetTargetDirectory(target.get());
|
cleanArgs += lgen->GetTargetDirectory(target.get());
|
||||||
cleanArgs += "/cmake_clean.cmake\"";
|
cleanArgs += "/cmake_clean.cmake\"";
|
||||||
cmExtraEclipseCDT4Generator::AppendTarget(
|
cmExtraEclipseCDT4Generator::AppendTarget(
|
||||||
|
|||||||
@@ -5218,7 +5218,7 @@ bool cmGeneratorTarget::NeedImportLibraryName(std::string const& config) const
|
|||||||
std::string cmGeneratorTarget::GetSupportDirectory() const
|
std::string cmGeneratorTarget::GetSupportDirectory() const
|
||||||
{
|
{
|
||||||
cmLocalGenerator* lg = this->GetLocalGenerator();
|
cmLocalGenerator* lg = this->GetLocalGenerator();
|
||||||
return cmStrCat(lg->GetCurrentBinaryDirectory(), '/',
|
return cmStrCat(lg->GetObjectOutputRoot(), '/',
|
||||||
lg->GetTargetDirectory(this));
|
lg->GetTargetDirectory(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ void cmLocalNinjaGenerator::Generate()
|
|||||||
// Compute the path to use when referencing the current output
|
// Compute the path to use when referencing the current output
|
||||||
// directory from the top output directory.
|
// directory from the top output directory.
|
||||||
this->HomeRelativeOutputPath =
|
this->HomeRelativeOutputPath =
|
||||||
this->MaybeRelativeToTopBinDir(this->GetCurrentBinaryDirectory());
|
this->MaybeRelativeToTopBinDir(this->GetObjectOutputRoot());
|
||||||
if (this->HomeRelativeOutputPath == ".") {
|
if (this->HomeRelativeOutputPath == ".") {
|
||||||
this->HomeRelativeOutputPath.clear();
|
this->HomeRelativeOutputPath.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user