The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=14503 ====================================================================== Reported By: icando Assigned To: ====================================================================== Project: CMake Issue ID: 14503 Category: CMake Reproducibility: always Severity: feature Priority: high Status: new ====================================================================== Date Submitted: 2013-10-22 05:16 EDT Last Modified: 2013-10-22 05:16 EDT ====================================================================== Summary: Make a library can ``link to'' a objlib Description: Objlib is useful implementing self-registration factories, where we rely on global/static variables' constructor to register itself in a factory. The major issue is linker will remove those symbols that are not referenced, and we can use objlib to force linking these symbols.
Currently the caveat is we need to specify all objlib at add_executable, which makes it painful. It would be great if a library can specify objlib in target_link_libraries or some other new command, and it will pass those objlib all the way up to the executable, and executable will automatically include those objlibs as its source. In this way, we can maintain the alwayslink requirement where the library is defined, not at top-level. Thanks. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2013-10-22 05:16 icando New Issue ====================================================================== -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
