summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-03-09 13:25:16 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-09 17:36:46 (GMT)
commita6b09085715d0d7f299e9ca76a4835ce5f5acfaf (patch)
tree6eef8fba5d1deed9b3b0ec13e66874a7851520fb /Source/cmLocalNinjaGenerator.cxx
parent99575c9ac114e6f5d388e1ee7b9a3f788d773c9e (diff)
downloadCMake-a6b09085715d0d7f299e9ca76a4835ce5f5acfaf.zip
CMake-a6b09085715d0d7f299e9ca76a4835ce5f5acfaf.tar.gz
CMake-a6b09085715d0d7f299e9ca76a4835ce5f5acfaf.tar.bz2
Ninja: Improve internal check for generating at the top-level (#15436)
Simply check for whether the local generator has a parent instead of depending on a string comparison of directory names.
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 413dc0f..640c1b3 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -182,8 +182,7 @@ cmake* cmLocalNinjaGenerator::GetCMakeInstance()
bool cmLocalNinjaGenerator::isRootMakefile() const
{
- return (strcmp(this->Makefile->GetCurrentDirectory(),
- this->GetCMakeInstance()->GetHomeDirectory()) == 0);
+ return !this->GetParent();
}
void cmLocalNinjaGenerator::WriteBuildFileTop()