On Wed, Feb 25, 2015 at 22:57:13 +0100, Stephen Kelly wrote: > > What I envision for the future is: > > > > add_library(objlib OBJECT ...) > > target_compile_definitions(objlib PUBLIC MYDEF) > > target_sources(objlib INTERFACE $<TARGET_OBJECTS:objlib>) > > Do you envision that as the idiomatic way to declare object libraries?
It would be nice if that's the pattern anyways. There'd probably have to be a policy to ignore using TARGET_OBJECTS within target_sources (only for itself? except INTERFACE libs? So many edge cases :/ ). > Would CMakeLists authors have to write the target_sources line > explicitly, if this future becomes possible? No, I have a commit which initializes INTERFACE_SOURCES when object libraries are created. Currently floating on its own branch. --Ben -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
