MantisBT - CMake
View Issue Details
0013963CMakeCMakepublic2013-02-28 04:132013-07-01 09:39
Albert Solernou 
 
normaltrivialalways
closedno change required 
Linuxat least ubuntu and RHEL
CMake 2.8.9 
 
0013963: get_filename_component returns blank
Command get_filename_component fails to return the name of the file if its input string is not simple. This works:
get_filename_component(EDB "${CMAKE_INSTALL_PREFIX}/etc/emppack.db" NAME)

but the following fails
set(EMP_DB_FILE "${CMAKE_INSTALL_PREFIX}/etc/emppack.db" CACHE FILEPATH "name of the Emppack data base file. Full path must be included")
get_filename_component(EDB "${EDB_DB_FILE}" NAME)
set(EMP_DB_FILE "${CMAKE_INSTALL_PREFIX}/etc/emppack.db" CACHE FILEPATH "name of the Emppack data base file. Full path must be included")
get_filename_component(EDB "${EDB_DB_FILE} " NAME)
message(" this is the dbfile: ${EDB}")
I could reproduce the error using cmake 2.8.7 and 2.8.9 on an updated Ubuntu 12.04 and on a RHEL 6.3.
No tags attached.
Issue History
2013-02-28 04:13Albert SolernouNew Issue
2013-02-28 04:17Albert SolernouNote Added: 0032405
2013-02-28 04:59Rolf Eike BeerNote Added: 0032406
2013-02-28 04:59Rolf Eike BeerSeveritymajor => trivial
2013-02-28 04:59Rolf Eike BeerStatusnew => resolved
2013-02-28 04:59Rolf Eike BeerResolutionopen => no change required
2013-07-01 09:39Robert MaynardNote Added: 0033437
2013-07-01 09:39Robert MaynardStatusresolved => closed

Notes
(0032405)
Albert Solernou   
2013-02-28 04:17   
I could reproduce it using v. 2.8.10.2
(0032406)
Rolf Eike Beer   
2013-02-28 04:59   
Guys, seriously. What about using the same variable in both places?

 this is the dbfile: emppack.db
(0033437)
Robert Maynard   
2013-07-01 09:39   
Closing resolved issues that have not been updated in more than 4 months.