MantisBT - CMake
View Issue Details
0006854CMakeCMakepublic2008-04-21 06:252016-06-10 14:30
Petr Baloun 
Brad King 
normalminoralways
closedmoved 
CMake-2-6 
 
0006854: GET_FILENAME_COMPONENT doesn't work when file name contains multiple dots
Have following code:

SET(TESTNAME "test1.test2.test3")
GET_FILENAME_COMPONENT(FNAME ${TESTNAME} NAME_WE)
GET_FILENAME_COMPONENT(EXT ${TESTNAME} EXT)

MESSAGE(${FNAME})
MESSAGE(${EXT})

Cmake's output is:

test1
.test2.test3

There are two problems:
- cmake divides the file name and the extension by the first dot - the extension IMHO starts after the last dot

- when EXT is specified, output variable receives the extension including the dot at the beginning (which is IMHO not part of extension)
Tried with cmake 2.4.8 and cmake 2.7.20080421
No tags attached.
Issue History
2008-04-21 06:25Petr BalounNew Issue
2008-08-19 15:46Bill HoffmanStatusnew => assigned
2008-08-19 15:46Bill HoffmanAssigned To => Brad King
2012-08-13 10:37Brad KingStatusassigned => backlog
2012-08-13 10:37Brad KingNote Added: 0030541
2016-06-10 14:27Kitware RobotNote Added: 0041422
2016-06-10 14:27Kitware RobotStatusbacklog => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0030541)
Brad King   
2012-08-13 10:37   
Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0041422)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.