[Cmake] Letting SOURCE_GROUP get a list of file names from a variable

Brad King brad . king at kitware . com
Wed, 23 Jul 2003 13:58:19 -0400 (EDT)


David,

>   SET(var FILES alpha.cpp bravo.cpp)
>   SOURCE_GROUP("Some Files" FILES alpha.cpp bravo.cpp)
>
> but I do NOT want to have to write the same explicit list of files in
> both places.
[snip]
>   SET(var FILES alpha.cpp bravo.cpp)
>   SOURCE_GROUP("Some Files" FILES ${var})

This should already work.  All commands have ExpandListArguments invoked
automatically for non-quoted arguments.  Don't forget about the bug you
reported earlier.  Try this with an umodified 1.6.7:

SET(var FILES alpha.cpp bravo.cpp)
SOURCE_GROUP("Some Files" FILES . ${var})

-Brad