https://github.com/Kitware/CMake
Revision e2d78f7535951adc505014d3afde59b52caf35f1 authored by Brad King on 17 February 2017, 15:15:21 UTC, committed by Brad King on 17 February 2017, 16:10:45 UTC
In commit v3.4.0-rc1~333^2 (Merge branch 'upstream-kwsys' into
update-kwsys, 2015-07-15) we brought in upstream KWSys commit 86a24794
(SystemTools: Fix GetActualCaseForPath drive letter case handling,
2015-07-09).  This caused our path processing to convert drive letters
to upper-case and exposed an existing bug in our implementation of
CMP0017.

Policy CMP0017 is responsible for ensuring that modules included from a
builtin module only load other builtin modules and cannot be overridden
by a file in `CMAKE_MODULE_PATH`.  If there is a case difference in the
drive letter (or other path components) then the path to the including
module may not match our builtin module directory in a simple string
comparison.  This means builtin modules may not be recognized as such,
and they may not reliably include their builtin dependencies.  For
example, if a project provides a `Platform/Windows` module in
`CMAKE_MODULE_PATH` it can break inclusion of our builtin
`Platform/Windows` module, leading to strange behavior.

Fix this by comparing the path to the including module to our builtin
module directory using a function that is aware of case-insensitivity of
paths on Windows.

Fixes: #16648, #16622
1 parent 6cbad49
History
Tip revision: e2d78f7535951adc505014d3afde59b52caf35f1 authored by Brad King on 17 February 2017, 15:15:21 UTC
Windows: Fix inconsistent behavior on changes to case of path to cmake
Tip revision: e2d78f7
File Mode Size
Auxiliary
Help
Licenses
Modules
Packaging
Source
Templates
Tests
Utilities
.clang-format -rw-r--r-- 217 bytes
.gitattributes -rw-r--r-- 658 bytes
.gitignore -rw-r--r-- 64 bytes
.hooks-config -rw-r--r-- 418 bytes
CMakeCPack.cmake -rw-r--r-- 9.5 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 12.6 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 30.1 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 1.7 KB
CTestConfig.cmake -rw-r--r-- 440 bytes
CTestCustom.cmake.in -rw-r--r-- 6.1 KB
CompileFlags.cmake -rw-r--r-- 2.9 KB
Copyright.txt -rw-r--r-- 4.9 KB
DartConfig.cmake -rw-r--r-- 374 bytes
README.rst -rw-r--r-- 2.9 KB
bootstrap -rwxr-xr-x 48.3 KB
cmake_uninstall.cmake.in -rw-r--r-- 790 bytes
configure -rwxr-xr-x 99 bytes
doxygen.config -rw-r--r-- 27.4 KB

README.rst

back to top