MantisBT - CMake
View Issue Details
0014462CMakeCMakepublic2013-10-08 03:102015-03-02 08:57
Ronan Collobert 
Clinton Stimpson 
normalminoralways
closedfixed 
Apple MacOS X10.4.10
CMake 2.8.11.2 
 
0014462: RELATIVE_PATH does not return a relative path when there is a double slash in the original path
Assuming:

SET(PATH1 "/foo/bar")
SET(PATH2 "/foo/bar//aaa/bbb")

FILE(RELATIVE_PATH RELPATH12 "${PATH1}" "${PATH2}")

MESSAGE("RELATIVE PATH: ${RELPATH12}")

This will print:
RELATIVE PATH: /aaa/bbb

Which is *not* a relative path in any ways (it should have been "aaa/bbb"). It is common that there are extra / in paths (often occurring when two paths are concatenated), and CMake should not take in account those ones.
No tags attached.
related to 0012065closed Clinton Stimpson file(RELATIVE_PATH ...) gives wrong results with extra "./" 
Issue History
2013-10-08 03:10Ronan CollobertNew Issue
2014-02-19 15:58Brad KingRelationship addedrelated to 0012065
2014-09-09 10:33Clinton StimpsonAssigned To => Clinton Stimpson
2014-09-09 10:33Clinton StimpsonStatusnew => assigned
2014-09-09 10:33Clinton StimpsonNote Added: 0036757
2014-09-09 10:33Clinton StimpsonStatusassigned => resolved
2014-09-09 10:33Clinton StimpsonResolutionopen => fixed
2015-03-02 08:57Robert MaynardNote Added: 0038108
2015-03-02 08:57Robert MaynardStatusresolved => closed

Notes
(0036757)
Clinton Stimpson   
2014-09-09 10:33   
Fixed.
http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=92b582a [^]
(0038108)
Robert Maynard   
2015-03-02 08:57   
Closing resolved issues that have not been updated in more than 4 months.