mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-28 11:48:36 -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());
|
||||
|
||||
std::string cleanArgs =
|
||||
cmStrCat("-E chdir \"", lgen->GetCurrentBinaryDirectory(),
|
||||
"\" \"", cmSystemTools::GetCMakeCommand(), "\" -P \"");
|
||||
cmStrCat("-E chdir \"", lgen->GetObjectOutputRoot(), "\" \"",
|
||||
cmSystemTools::GetCMakeCommand(), "\" -P \"");
|
||||
cleanArgs += lgen->GetTargetDirectory(target.get());
|
||||
cleanArgs += "/cmake_clean.cmake\"";
|
||||
cmExtraEclipseCDT4Generator::AppendTarget(
|
||||
|
||||
@@ -5218,7 +5218,7 @@ bool cmGeneratorTarget::NeedImportLibraryName(std::string const& config) const
|
||||
std::string cmGeneratorTarget::GetSupportDirectory() const
|
||||
{
|
||||
cmLocalGenerator* lg = this->GetLocalGenerator();
|
||||
return cmStrCat(lg->GetCurrentBinaryDirectory(), '/',
|
||||
return cmStrCat(lg->GetObjectOutputRoot(), '/',
|
||||
lg->GetTargetDirectory(this));
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ void cmLocalNinjaGenerator::Generate()
|
||||
// Compute the path to use when referencing the current output
|
||||
// directory from the top output directory.
|
||||
this->HomeRelativeOutputPath =
|
||||
this->MaybeRelativeToTopBinDir(this->GetCurrentBinaryDirectory());
|
||||
this->MaybeRelativeToTopBinDir(this->GetObjectOutputRoot());
|
||||
if (this->HomeRelativeOutputPath == ".") {
|
||||
this->HomeRelativeOutputPath.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user