Am Dienstag, 2. Dezember 2008 schrieb Robert Dailey: > 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?
list takes a list-name, so list( LENGTH "foo;bar" listlen ) looks for a list named "foo;bar", doesn't find it and sets listlen to 0. Try set(mylist "foo;bar") list(LENGTH mylist listlen) message(${listlen}) _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake