[cmake-developers] [CMake 0014963]: Add explicit specification of custom command side effect outputs

Mantis Bug Tracker mantis at public.kitware.com
Mon Jun 9 09:17:59 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14963 
====================================================================== 
Reported By:                Brad King
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14963
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-06-09 09:17 EDT
Last Modified:              2014-06-09 09:17 EDT
====================================================================== 
Summary:                    Add explicit specification of custom command side
effect outputs
Description: 
A common idiom in CMake-based build systems is to use order-only dependencies on
high-level targets to implicitly ensure their side effects are up to date, and
then to have other build rules depend on those side effects explicitly.

This works well in the VS, Xcode, and Makefile generators because the underlying
build systems all evaluate rules at the granularity of the high-level targets so
dependencies are not stat-ed from the filesystem until after the order-only
dependencies are satisified.  It does not work well in the Ninja generator
because ninja does not re-stat dependencies of a rule after its order-only
dependencies have been satisfied:

 https://github.com/martine/ninja/issues/760

This behavior is not necessarily wrong because nothing in the generated ninja
build system tells ninja what build rules generate the side effects.

With a bit more information from the CMakeLists.txt code we can generate a ninja
build system that works correctly for such cases.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-06-09 09:17 Brad King      New Issue                                    
======================================================================



More information about the cmake-developers mailing list