[cmake-developers] Bug in FILE(STRINGS)?

Brad King brad.king at kitware.com
Fri Feb 4 13:51:10 EST 2011


On 02/04/2011 01:44 PM, David Cole wrote:
> Don't you mean:
> LIST(GET FOO 0 TEST)
> 
> FOO is the file(STRINGS result. "test" is the filename...
> 
> 
> On Fri, Feb 4, 2011 at 1:03 PM, Johan Björk wrote:
>     Is there a better way to write the above code? (Ie, get the first
>     element, no matter if it's a list or not?)

Also, if you really only want to read the first string then use
the LIMIT_COUNT option to file(STRINGS).

-Brad



More information about the cmake-developers mailing list