[CMake] get_file_name_component - how to return true extension

Brian Davis bitminer at gmail.com
Wed Nov 25 15:24:29 EST 2009


for a given file of the form:

openssl-0.9.8a.tar.gz

I call as an example:

 get_filename_component( TAR_EXT openssl-0.9.8a.tar.gz EXT )

and I get for TAR_EXT

.9.1.tar.gz

Which is not quite what I was expecting.

I was expecting .gz and with successive calls I would get  .tar

Is there a mechanism in CMake for getting the trailing extension?

-- 
Brian J. Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091125/1d17260e/attachment.htm>


More information about the CMake mailing list