diff options
author | Brad King <brad.king@kitware.com> | 2014-03-05 16:07:58 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-03-05 16:07:58 (GMT) |
commit | 9e6e9140c2baf2afa546fbb3a72fbff31e81f69c (patch) | |
tree | 159c4e2ddc7f2dc929e6d2db0e4cf4a5bfed80b4 /Source | |
parent | 955dd1a551698aa85b404bcd96b62740caac3160 (diff) | |
parent | 7e187eeacd609c18940aa7cd700b048f72fd5568 (diff) | |
download | CMake-9e6e9140c2baf2afa546fbb3a72fbff31e81f69c.zip CMake-9e6e9140c2baf2afa546fbb3a72fbff31e81f69c.tar.gz CMake-9e6e9140c2baf2afa546fbb3a72fbff31e81f69c.tar.bz2 |
Merge topic 'fix-CMP0017-check'
7e187eea CMP0017: Fix check when including from CMake source tree
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index f248c57..556e7a4 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3337,7 +3337,8 @@ std::string cmMakefile::GetModulesFile(const char* filename) const if ((moduleInCMakeModulePath.size()>0) && (moduleInCMakeRoot.size()>0)) { const char* currentFile = this->GetDefinition("CMAKE_CURRENT_LIST_FILE"); - if (currentFile && (strstr(currentFile, cmakeRoot) == currentFile)) + std::string mods = cmakeRoot + std::string("/Modules/"); + if (currentFile && strncmp(currentFile, mods.c_str(), mods.size()) == 0) { switch (this->GetPolicyStatus(cmPolicies::CMP0017)) { |