summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-20 10:42:57 -0500
committerCMake Topic Stage <kwrobot@kitware.com>2017-02-20 10:42:57 -0500
commit53a1ec631ddd59f4f4eaaf1633a784045e455342 (patch)
tree701d61d0e97bca2f5c723eaeaaadd328f3b7668e /Source/cmMakefile.cxx
parentd36016a8ff67fe72e9a388467f3fce456225c3ec (diff)
parente2d78f7535951adc505014d3afde59b52caf35f1 (diff)
downloadcmake-53a1ec631ddd59f4f4eaaf1633a784045e455342.tar.gz
Merge topic 'fix-CMP0017-path-case'
e2d78f75 Windows: Fix inconsistent behavior on changes to case of path to cmake
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index bdaca9713a..b3d7a04301 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3354,7 +3354,7 @@ std::string cmMakefile::GetModulesFile(const char* filename) const
if (!moduleInCMakeModulePath.empty() && !moduleInCMakeRoot.empty()) {
const char* currentFile = this->GetDefinition("CMAKE_CURRENT_LIST_FILE");
std::string mods = cmSystemTools::GetCMakeRoot() + "/Modules/";
- if (currentFile && strncmp(currentFile, mods.c_str(), mods.size()) == 0) {
+ if (currentFile && cmSystemTools::IsSubDirectory(currentFile, mods)) {
switch (this->GetPolicyStatus(cmPolicies::CMP0017)) {
case cmPolicies::WARN: {
std::ostringstream e;