[cmake-developers] [CMake 0014186]: get_filename_component(ABSOLUTE) return wrong value for parent dir of /

Mantis Bug Tracker mantis at public.kitware.com
Sun Jun 2 01:54:27 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14186 
====================================================================== 
Reported By:                Yichao Yu
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14186
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-06-02 01:54 EDT
Last Modified:              2013-06-02 01:54 EDT
====================================================================== 
Summary:                    get_filename_component(ABSOLUTE) return wrong value
for parent dir of /
Description: 
On unix-like system the parent directory of / should be / itself. However,
get_filename_component return empty string for that case.


Steps to Reproduce: 
In (sh-compatible) command line, type:
cmake -DINPUT='/../lib' -P /dev/stdin <<EOF
get_filename_component(abspath "\${INPUT}" ABSOLUTE)
message("\${abspath}")
EOF

expected output /lib
actual output lib (which is not an absolute path at all !!)

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-06-02 01:54 Yichao Yu      New Issue                                    
======================================================================




More information about the cmake-developers mailing list