From d5911ef014fcffd14d397759ca638519733a48ad Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 4 Oct 2016 22:56:30 +0200 Subject: 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. --- Source/cmGlobalUnixMakefileGenerator3.cxx | 6 +----- 1 file changed, 1 insertion(+), 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(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::const_iterator i = lfiles.begin(); i != lfiles.end(); ++i) { cmakefileStream << " \"" << lg->ConvertToRelativePath(currentBinDir, *i) -- cgit v0.12