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.cr...@saabsensis.com<mailto:nicholas.cr...@saabsensis.com>

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


On Fri, Jul 31, 2015 at 6:13 AM, Crast, Nicholas 
<nicholas.cr...@saabsensis.com<mailto:nicholas.cr...@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.cr...@saabsensis.com<mailto:nicholas.cr...@saabsensis.com>
-----Original Message-----
From: David Cole [mailto:dlrd...@aol.com<mailto:dlrd...@aol.com>]
Sent: Thursday, July 30, 2015 4:39 PM
To: Crast, Nicholas
Cc: cmake@cmake.org<mailto:cmake@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.cr...@saabsensis.com<mailto:nicholas.cr...@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.cr...@saabsensis.com<mailto:nicholas.cr...@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

-- 

Powered by 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

Reply via email to