[cmake-developers] Ninja order-only dependency makes inefficient ninja DAG
Brad King
brad.king at kitware.com
Tue Jun 24 08:44:38 EDT 2014
On 06/24/2014 07:11 AM, Kristofer Tingdahl wrote:
> CMake adds order-only dependencies in build.ninja between
> libraries and subsequent object-files, and I cannot see why
> this is needed.
The object files of consuming targets might use headers generated
by custom commands in earlier targets. The order-only dependencies
ensure a safe build for such cases. They are not always needed,
and the extra dependencies could be removed with sufficient work
on the generator.
See these issues:
Optionally disable build order dependency target_link_libraries
http://www.cmake.org/Bug/view.php?id=13799
target_link_libraries may have option not to add dependencies, for archive target
http://www.cmake.org/Bug/view.php?id=14726
Generalize LINK_ONLY
http://www.cmake.org/Bug/view.php?id=14751
and a workaround mentioned here:
http://www.cmake.org/Bug/view.php?id=14726#c35023
-Brad
More information about the cmake-developers
mailing list