On 2. Jun, 2010, at 16:34 , Doug Reiland wrote:
> Is there anything to "add to" a target after it is declared?
>
> For example,
>
> add_library(foo STATIC foo1.c foo2.c)
>
> ....
>
> add_some_more(foo foo3.c)
> or
> add_some_more(foo foo3.o)
>
> If not, feasibility on how it could be implemented?
>
> Thanks,
> Doug
set(SRCS foo1.c foo2.c)
if(SOME_CONDITION)
list(APPEND SRCS foo3.c)
endif()
add_library(foo STATIC ${SRCS})
Hope this helps
Michael
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake