summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-15 13:45:25 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-06-15 13:45:25 (GMT)
commitf8bc48413cc360f9dea377761ea833f3244bc74a (patch)
tree227740fe049aa9c7428e3ac7501d3643d8e425b6 /Source
parent9cbb9ed4c946b957df1a99910d5b60cdb269bb89 (diff)
parent0efe4944e1ae18b9204209b3ddf5811905e22357 (diff)
downloadCMake-f8bc48413cc360f9dea377761ea833f3244bc74a.zip
CMake-f8bc48413cc360f9dea377761ea833f3244bc74a.tar.gz
CMake-f8bc48413cc360f9dea377761ea833f3244bc74a.tar.bz2
Merge topic 'fix-fast-special-targets'
0efe4944 cmGlobalGenerator: Add ComputeHomeRelativeOutputPath method. bc1211fa cmLocalUnixMakefileGenerator3: Remove unused variable.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx5
-rw-r--r--Source/cmLocalGenerator.h2
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx30
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h2
4 files changed, 25 insertions, 14 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 9b02cbb..a462113 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -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)
{
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 42df2b8..6a8c5aa 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -47,6 +47,8 @@ public:
*/
virtual void Generate() {}
+ virtual void ComputeHomeRelativeOutputPath() {}
+
/**
* Calls TraceVSDependencies() on all targets of this generator.
*/
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index f1fd806..e292ba7 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -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";
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index dcb3016..4e4d146 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -39,6 +39,8 @@ public:
cmState::Snapshot snapshot);
virtual ~cmLocalUnixMakefileGenerator3();
+ virtual void ComputeHomeRelativeOutputPath();
+
/**
* Generate the makefile for this directory.
*/