[CMake] List of files not containing string

Crast, Nicholas Nicholas.Crast at saabsensis.com
Fri Jul 31 13:07:31 EDT 2015


Understood. I am doing it this way, I was just thinking maybe there was some more sophisticated pattern matching that I could do (get all files matching this regular expression) without looping through the whole list.

Thanks
-Nick

----------------------------------------
Nick Crast
Software Engineer
Saab Sensis Corporation
Phone: 315-445-5703
Email: Nicholas.Crast at saabsensis.com<mailto:Nicholas.Crast at saabsensis.com>

From: J Decker [mailto:d3ck0r at gmail.com]
Sent: Friday, July 31, 2015 9:33 AM
To: Crast, Nicholas
Cc: David Cole; cmake at cmake.org
Subject: Re: [CMake] List of files not containing string


On Fri, Jul 31, 2015 at 6:13 AM, Crast, Nicholas <Nicholas.Crast at saabsensis.com<mailto:Nicholas.Crast at saabsensis.com>> wrote:
Well that's a way to do it, but there's not a way to do all of that in one shot?

make a macro to do it?

it's not like that's all that much to do...

files( glob file_list *)
foreach( file ${file_list} )
if( NOT file MATCHES "[whatever]" )
   set( real_list ${real_list} ${file} )
endif()
endforeach()

?

----------------------------------------
Nick Crast
Software Engineer
Saab Sensis Corporation
Phone: 315-445-5703<tel:315-445-5703>
Email: Nicholas.Crast at saabsensis.com<mailto:Nicholas.Crast at saabsensis.com>
-----Original Message-----
From: David Cole [mailto:DLRdave at aol.com<mailto:DLRdave at aol.com>]
Sent: Thursday, July 30, 2015 4:39 PM
To: Crast, Nicholas
Cc: cmake at cmake.org<mailto:cmake at cmake.org>
Subject: Re: [CMake] List of files not containing string

Get the list of all files, loop over them, and filter out the ones that DO have the string in the name ...?



On Thu, Jul 30, 2015 at 4:05 PM, Crast, Nicholas <Nicholas.Crast at saabsensis.com<mailto:Nicholas.Crast at saabsensis.com>> wrote:
> All,
>
>
>
> This seems like a pretty simple task, but I cannot figure out a good
> way to do it. I want to get a list of all files in a directory that do
> not have a certain string in the filename.
>
>
>
> Can someone help?
>
>
>
> -Nick
>
>
>
> ----------------------------------------
>
> Nick Crast
>
> Software Engineer
>
> Saab Sensis Corporation
>
> Phone: 315-445-5703<tel:315-445-5703>
>
> Email: Nicholas.Crast at saabsensis.com<mailto:Nicholas.Crast at saabsensis.com>
>
>
>
>
> --
>
> Powered by www.kitware.com<http://www.kitware.com>
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For
> more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
--

Powered by www.kitware.com<http://www.kitware.com>

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150731/713ac881/attachment-0001.html>


More information about the CMake mailing list