MantisBT - CMake
View Issue Details
0011531CMakeCMakepublic2010-11-28 11:562010-12-21 10:58
Nodrev 
Brad King 
normalminoralways
closedunable to reproduce 
x586MS WindowsSeven
CMake 2.8.3 
 
0011531: CMAKE fails when registry key point to a path that use backslashs instead of slash
When a cmake find module uses registry, if the path in the registry key uses windows standard directory separators "\", they are not converted to "/", and cmakes fails to expand the directory.
In a command shell:
REG ADD HKLM\SOFTWARE\GnuWin32\Zlib /v InstallPath /d "D:\libraries\zlib" /f
REG ADD HKLM\SOFTWARE\Wow6432Node\GnuWin32\Zlib /v InstallPath /d "D:\libraries\zlib" /f

Use FindZLIB.
An error occurs telling Zlib was not found.
If the "\" are replaced by "/", Zlib is found.
registry
Issue History
2010-11-28 11:56NodrevNew Issue
2010-11-28 11:59NodrevTag Attached: registry
2010-12-17 09:28Brad KingAssigned To => Brad King
2010-12-17 09:28Brad KingStatusnew => assigned
2010-12-17 09:30Brad KingNote Added: 0024232
2010-12-21 10:58Brad KingNote Added: 0024313
2010-12-21 10:58Brad KingStatusassigned => closed
2010-12-21 10:58Brad KingResolutionopen => unable to reproduce

Notes
(0024232)
Brad King   
2010-12-17 09:30   
I cannot reproduce this. My registry entry points at

  C:\Program Files (x86)\GnuWin32

(with backslashes) and find_package(ZLIB) works. If I comment out the registry entry references in FindZLIB.cmake then it fails, so it is definitely using the registry to find zlib when it works.
(0024313)
Brad King   
2010-12-21 10:58   
Closing for now. Please re-open if necessary with more specific instructions to reproduce.