[cmake-developers] [CMake 0012065]: file(RELATIVE_PATH ...) gives wrong results with extra "./"

Mantis Bug Tracker mantis at public.kitware.com
Sat Apr 9 17:59:13 EDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12065 
====================================================================== 
Reported By:                Clinton Stimpson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12065
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-04-09 17:59 EDT
Last Modified:              2011-04-09 17:59 EDT
====================================================================== 
Summary:                    file(RELATIVE_PATH ...) gives wrong results with
extra "./"
Description: 

set(fil /path/to/one)

set(dir /path/to/.)
file(RELATIVE_PATH rel ${dir} ${fil})
message(STATUS "rel=${rel}")
# output is "rel=../one"  -- wrong

set(dir /path/to/././././.)
# with get_filename_component it gives the "rel=one" instead of 
# rel=../../../../../one
get_filename_component(dir /path/to/././././. ABSOLUTE)
file(RELATIVE_PATH rel ${dir} ${fil})
message(STATUS "rel=${rel}")

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-04-09 17:59 Clinton StimpsonNew Issue                                    
======================================================================




More information about the cmake-developers mailing list