[CMake] Performance difference between SET and LIST ?

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jul 8 17:18:14 EDT 2009


On Wednesday 08 July 2009, Alexandre.Feblot at thomsonreuters.com wrote:
> Hi,
>
> with a very long list, is there a performance difference between using
> SET and LIST to just declare a variable ?
>
> SET (var
> val1
> val2
> ...
> val2000)
>
> or
>
> SET(var)
> LIST(APPEND var
> val1
> val2
> ...
> val2000)

In this case there should be now performance difference.
If you would instead 2000 times append only one item each time, LIST(APPEND) 
is much faster.

Alex


More information about the CMake mailing list