[CMake] list( LENGTH ) problem
Alexander Neundorf
a.neundorf-work at gmx.net
Tue Dec 2 16:00:50 EST 2008
On Tuesday 02 December 2008, Robert Dailey wrote:
> Hi,
>
> I execute the following CMake code:
>
> list( LENGTH "foo;bar" listlen )
> message( ${listlen} )
>
> However, this results in the value "0" to be printed. I expect this to
> print "2". What am I doing wrong?
It expects a variable which holds a list:
set(myList foo bar)
list( LENGTH myList listlen )
message( ${listlen} )
(didn't test or check docs, but I think that should be it)
Alex
More information about the CMake
mailing list