summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-04 20:56:30 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-06 18:02:07 (GMT)
commitd5911ef014fcffd14d397759ca638519733a48ad (patch)
tree7fe6f237ef963095c82f9a61d9dc1466a726035b /Source/cmGlobalUnixMakefileGenerator3.cxx
parentc3264f48c2960325b9141d3ec58c6b49afe120c9 (diff)
downloadCMake-d5911ef014fcffd14d397759ca638519733a48ad.zip
CMake-d5911ef014fcffd14d397759ca638519733a48ad.tar.gz
CMake-d5911ef014fcffd14d397759ca638519733a48ad.tar.bz2
Makefiles: Hardcode the relative location of the CMakeCache file
In this context, currentBinDir refers to the CMAKE_BINARY_DIR because it comes from the first local generator. GetHomeOutputDirectory is the same as CMAKE_BINARY_DIR, so the computation here is unnecessary.
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 4a5cc77..95f6ea8 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -306,16 +306,12 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
// reset lg to the first makefile
lg = static_cast<cmLocalUnixMakefileGenerator3*>(this->LocalGenerators[0]);
- // Build the path to the cache file.
- std::string cache = this->GetCMakeInstance()->GetHomeOutputDirectory();
- cache += "/CMakeCache.txt";
-
std::string currentBinDir = lg->GetCurrentBinaryDirectory();
// Save the list to the cmake file.
cmakefileStream
<< "# The top level Makefile was generated from the following files:\n"
<< "set(CMAKE_MAKEFILE_DEPENDS\n"
- << " \"" << lg->ConvertToRelativePath(currentBinDir, cache) << "\"\n";
+ << " \"CMakeCache.txt\"\n";
for (std::vector<std::string>::const_iterator i = lfiles.begin();
i != lfiles.end(); ++i) {
cmakefileStream << " \"" << lg->ConvertToRelativePath(currentBinDir, *i)