On 2. Jun, 2010, at 17:51 , Doug Reiland wrote: > Yeah, I know I can do that. > I want to add foo3.c after the add_library() has been done. > The example is simple, but it describes what I hope to do. > > > On Wed, Jun 2, 2010 at 11:41 AM, Michael Wild <[email protected]> wrote: >> >> 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 >>
No, AFAIK there is no way to do so. Perhaps if you explained a bit more why you think you need such a feature we could help you a bit more. 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
