diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-08 16:03:42 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-08 16:03:42 (GMT) |
commit | 3801463c9f99fdbf0b1a115f5a5f55d211c08de1 (patch) | |
tree | 94b6226384569e1bda269553d1f0185f966c56b6 /Source/cmCommandArgumentParserHelper.cxx | |
parent | 8b520158c3c378acde541d2e99103dc9ab834595 (diff) | |
download | CMake-3801463c9f99fdbf0b1a115f5a5f55d211c08de1.zip CMake-3801463c9f99fdbf0b1a115f5a5f55d211c08de1.tar.gz CMake-3801463c9f99fdbf0b1a115f5a5f55d211c08de1.tar.bz2 |
Use built-ins for readability and maintainability
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index c0a8127..54af13b 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -132,8 +132,9 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) { const char* srcRoot = this->Makefile->GetDefinition("CMAKE_SOURCE_DIR"); const char* binRoot = this->Makefile->GetDefinition("CMAKE_BINARY_DIR"); - if (this->CheckSystemVars || strstr(this->FileName, srcRoot) == this->FileName || - strstr(this->FileName, binRoot) == this->FileName) + if (this->CheckSystemVars || + cmSystemTools::IsSubDirectory(this->FileName, this->Makefile->GetHomeDirectory()) || + cmSystemTools::IsSubDirectory(this->FileName, this->Makefile->GetHomeOutputDirectory())) { cmOStringStream msg; msg << this->FileName << ":" << this->FileLine << ":" << |