[CMake] ctest-2.6.4 and ctest 2.8.0 - LIST(FIND ...) always returns -1

Clemens Arth clemens.arth at gmx.at
Fri Dec 11 06:10:27 EST 2009


Sorry for the typos,

I tested it with 2.6.4 and 2.8.0;
The return value is (separated by ; not ,)

"Index of "foo" in list "foo;bar" is -1"

Regards



Am 11.12.2009 12:06, schrieb Clemens Arth:
> Hi, 
>
> probably I did something wrong, but with both ctest 2.6.4 and 2.8.0 the following is not working:
>
> SET(MYLIST foo bar)
>
> SET(ITEM2FIND foo)
>
> LIST(FIND "${MYLIST}" "${ITEM2FIND}" INDEX)
>
> MESSAGE(FATAL_ERROR "Index of \"${ITEM2FIND}\" in list \"${MYLIST}\" is ${INDEX}")
>
> always returns 
>
> "Index of "foo" in list "foo,bar" is -1"
>
> Can someone reproduce this error (or tell me what I'm doing wrong?)
>
> Regards...
>
> Clemens
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
>   



More information about the CMake mailing list