Re: [CMake] get_file_name_component - how to return true extension

2010-02-17 Thread Martin Guillon
, 2009 9:24 PM To: cmake@cmake.org Subject: [CMake] get_file_name_component - how to return true extension 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

Re: [CMake] get_file_name_component - how to return true extension

2009-11-25 Thread Brian Davis
Yes so I did find the string regexp functions and the following seems to be working for me. For example (in case anyone else sees this thread and finds it helpful) SET( FILE_NAME openssl-0.9.8a.tar.gz ) STRING( REGEX REPLACE [.]gz FILE_NAME_NO_EXT ${FILE_NAME} ) STRING( REGEX REPLACE [.]tar