<div dir="ltr"><div><div>See following example:<br><br> $ cmake --version<br> cmake version 2.8.11.2<br> $ cat CMakeLists.txt<br> cmake_minimum_required(VERSION 2.8)<br><br> FUNCTION(foo)<br> list(LENGTH ARGV argc)<br>
message("ARGC=${ARGC} list(LENGTH ARGV)=${argc}")<br><br> list(GET ARGV 0 argv0)<br> message("ARGV0=${ARGV0} list(GET ARGV 0)=${argv0}")<br> ENDFUNCTION()<br><br> foo("a;b;c")<br>
$ cmake .<br> ARGC=1 list(LENGTH ARGV)=3<br> ARGV0=a;b;c list(GET ARGV 0)=a<br> -- Configuring done<br> -- Generating done<br> -- Build files have been written to: /root/tmp<br> $<br><br></div>I know ';' is special in cmake but it's counter-intuitive that ARGC != list(LENGTH ARGV). Is this a bug?<br>
<br></div>-Clark<br></div>