Re: [CMake] Can you add sources to a target library after add_library()?
Too bad. I was hoping I could do this without having to use a list variable to collect all my sources. In my case, the use of conditionals is somewhat awkward. Best regards, Marcel Loose. On Sat, 2010-01-09 at 18:38 -0500, Philip Lowman wrote: I highly doubt it. Best practice is to just use conditionals to add the necessary source files to a list variable prior to the add_library() call. On Sat, Jan 9, 2010 at 5:48 PM, Marcel Loose lo...@astron.nl wrote: Hi all, I've been searching the manuals, but couldn't find a way to add sources to a target library *after* the add_library() command, e.g., using set_target_properties()? Is this possible at all? Best regards, Marcel Loose. ___ 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 ___ 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
Re: [CMake] Can you add sources to a target library after add_library()?
2010/1/11 Marcel Loose lo...@astron.nl: Too bad. I was hoping I could do this without having to use a list variable to collect all my sources. In my case, the use of conditionals is somewhat awkward. Personnally I sometime use several variable like: add_library(blah ${BLAH_SOURCE} ${BLAH_SOURCE_OPT1} ${BLAH_SOURCE_OPT2} ${BLAH_SOURCE_OPT3}) xxx_OPTy var may contains source or may be void and off course should be defined BEFORE add_library is called. It is mostly like conditionnally adding the same content to a list but may required less conditionnal because xxx_OPTy may defaulted to void content. Would you explain us why you need to add source AFTER add_library and may be why conditionnal is awkward? -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ 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
Re: [CMake] Can you add sources to a target library after add_library()?
I highly doubt it. Best practice is to just use conditionals to add the necessary source files to a list variable prior to the add_library() call. On Sat, Jan 9, 2010 at 5:48 PM, Marcel Loose lo...@astron.nl wrote: Hi all, I've been searching the manuals, but couldn't find a way to add sources to a target library *after* the add_library() command, e.g., using set_target_properties()? Is this possible at all? Best regards, Marcel Loose. ___ 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 -- Philip Lowman ___ 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