MantisBT - CMake
View Issue Details
0014283CMakeCMakepublic2013-07-09 10:502013-12-02 08:51
Renaud Barate 
Brad King 
normalminoralways
closedfixed 
Linux
CMake 2.8.11.2 
CMake 2.8.12CMake 2.8.12 
0014283: Infinite loop when using CMAKE_FIND_ROOT_PATH variable
When the variable CMAKE_FIND_ROOT_PATH is set to "/" and the macro FIND_PROGRAM is called with Windows-style paths in the PATHS parameter, cmake goes in an infinite loop.

The attached file reproduces this problem.
No tags attached.
txt CMakeLists.txt (201) 2013-07-09 10:50
https://public.kitware.com/Bug/file/4815/CMakeLists.txt
Issue History
2013-07-09 10:50Renaud BarateNew Issue
2013-07-09 10:50Renaud BarateFile Added: CMakeLists.txt
2013-07-09 15:55Brad KingNote Added: 0033523
2013-07-10 08:30Brad KingAssigned To => Brad King
2013-07-10 08:30Brad KingStatusnew => assigned
2013-07-10 08:30Brad KingTarget Version => CMake 2.8.12
2013-07-11 09:09Brad KingNote Added: 0033525
2013-07-11 09:09Brad KingStatusassigned => resolved
2013-07-11 09:09Brad KingResolutionopen => fixed
2013-07-11 09:09Brad KingFixed in Version => CMake 2.8.12
2013-12-02 08:51Robert MaynardNote Added: 0034642
2013-12-02 08:51Robert MaynardStatusresolved => closed

Notes
(0033523)
Brad King   
2013-07-09 15:55   
This appears to have been introduced way back in 2004:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b221d046 [^]

The "while ( path.size() > dir.size() );" code assumes that eventually the parent directory will be shorter, but "C:/" is never shorter than "/".
(0033525)
Brad King   
2013-07-11 09:09   
Fixed in upstream KWSys here:

 http://public.kitware.com/gitweb?p=KWSys.git;a=commitdiff;h=beef6819 [^]

and integrated into CMake here:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a44fa4c [^]
(0034642)
Robert Maynard   
2013-12-02 08:51   
Closing resolved issues that have not been updated in more than 4 months.