MantisBT - CMake
View Issue Details
0001368CMakepublic2004-11-19 10:192005-01-28 13:28
Troels Frimor 
System Admin 
lowmajoralways
closedno change required 
 
 
0001368: GET_FILENAME_COMPONENT with cache has no value
The command:
GET_FILENAME_COMPONENT(var_1 file_1 PATH CACHE)
does not put any value in the var_1(it is empty). Even though the file do exist.

The command without CACHE works fine:
GET_FILENAME_COMPONENT(var_1 file_1 PATH)
No tags attached.
Issue History

Notes
(0001997)
System Admin   
2005-01-28 13:28   
I tested this on CMake 2.0.5 and it works fine. Here is my code:

SET(file "/usr/local/bin/mencoder")

GET_FILENAME_COMPONENT(var_1 ${file} PATH CACHE)
GET_FILENAME_COMPONENT(var_2 ${file} PATH)

MESSAGE("[${var_1}] [${var_2}]")