Merge topic 'fix-fast-special-targets'

0efe4944 cmGlobalGenerator: Add ComputeHomeRelativeOutputPath method.
bc1211fa cmLocalUnixMakefileGenerator3: Remove unused variable.
This commit is contained in:
Brad King 2015-06-15 09:45:25 -04:00 committed by CMake Topic Stage
commit f8bc48413c
4 changed files with 25 additions and 14 deletions

View File

@ -1273,6 +1273,11 @@ void cmGlobalGenerator::Generate()
// it builds by default.
this->FillLocalGeneratorToTargetMap();
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
this->LocalGenerators[i]->ComputeHomeRelativeOutputPath();
}
// Generate project files
for (i = 0; i < this->LocalGenerators.size(); ++i)
{

View File

@ -47,6 +47,8 @@ public:
*/
virtual void Generate() {}
virtual void ComputeHomeRelativeOutputPath() {}
/**
* Calls TraceVSDependencies() on all targets of this generator.
*/

View File

@ -100,19 +100,6 @@ cmLocalUnixMakefileGenerator3::~cmLocalUnixMakefileGenerator3()
//----------------------------------------------------------------------------
void cmLocalUnixMakefileGenerator3::Generate()
{
// Compute the path to use when referencing the current output
// directory from the top output directory.
this->HomeRelativeOutputPath =
this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT);
if(this->HomeRelativeOutputPath == ".")
{
this->HomeRelativeOutputPath = "";
}
if(!this->HomeRelativeOutputPath.empty())
{
this->HomeRelativeOutputPath += "/";
}
// Store the configuration name that will be generated.
if(const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"))
{
@ -164,6 +151,22 @@ void cmLocalUnixMakefileGenerator3::Generate()
this->WriteDirectoryInformationFile();
}
void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath()
{
// Compute the path to use when referencing the current output
// directory from the top output directory.
this->HomeRelativeOutputPath =
this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT);
if(this->HomeRelativeOutputPath == ".")
{
this->HomeRelativeOutputPath = "";
}
if(!this->HomeRelativeOutputPath.empty())
{
this->HomeRelativeOutputPath += "/";
}
}
//----------------------------------------------------------------------------
void cmLocalUnixMakefileGenerator3::ComputeObjectFilenames(
std::map<cmSourceFile const*, std::string>& mapping,
@ -1840,7 +1843,6 @@ void cmLocalUnixMakefileGenerator3
std::vector<std::string> commands;
// Write the all rule.
std::string dir;
std::string recursiveTarget = this->Makefile->GetCurrentBinaryDirectory();
recursiveTarget += "/all";

View File

@ -39,6 +39,8 @@ public:
cmState::Snapshot snapshot);
virtual ~cmLocalUnixMakefileGenerator3();
virtual void ComputeHomeRelativeOutputPath();
/**
* Generate the makefile for this directory.
*/