Hi everyone,

It seems the FILE(STRINGS) function does not properly return a list when
there is only one item.

Example cmake file:
FILE(WRITE test "hello")
FILE(STRINGS test FOO)
message(${FOO})
LIST(GET test 0 TEST)
message(${TEST})

Returns:
:~ phb$ cmake -P test.cmake
hello
NOTFOUND

This is with cmake 2.8.4-rc2 as well as 2.8.3.
Is there a better way to write the above code? (Ie, get the first element,
no matter if it's a list or not?)

Thanks
/Johan
_______________________________________________
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to