[cmake-developers] [CMake 0013963]: get_filename_component returns blank

Mantis Bug Tracker mantis at public.kitware.com
Thu Feb 28 04:13:54 EST 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13963 
====================================================================== 
Reported By:                Albert Solernou
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13963
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-02-28 04:13 EST
Last Modified:              2013-02-28 04:13 EST
====================================================================== 
Summary:                    get_filename_component returns blank
Description: 
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)


Steps to Reproduce: 
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}")

Additional Information: 
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.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-02-28 04:13 Albert SolernouNew Issue                                    
======================================================================




More information about the cmake-developers mailing list