Hi, CMake adds order-only dependencies in build.ninja between libraries and subsequent object-files, and I cannot see why this is needed. Consider the following CMakeLists.txt:
project( program ) add_library( A SHARED a.cc ) add_library( B SHARED b.cc ) target_link_libraries( B A ) add_executable( prog program.cc ) target_link_libraries( prog B ) There are a couple of targets generated: a.cc.o, b.cc.o, libA.so, libB.so, prog.cc.o and prog. The ninja-file will make these targets be built in the following steps: 1. a.cc.o 2. libA.so 3. b.cc.o 4. libB.so 5. prog.cc.o 6. prog My point is that there is no reason to wait building b.cc.o and prog.cc.o; they can be built at the same time as a.cc.o . Hence I wonder why libA.so is added as a order-only dependency to b.cc.o when CMake processes this? If there is no good reason, can I avoid it by changing the CMakeLists.txt (perhaps with a variable)? If that is not possible, would the cmake-team be interested if I dive into it and make a patch? Any thought is welcome! Cheers, Kristofer
-- 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
