[cmake-developers] [CMake 0012309]: Support raw replacements in IMPLICIT_DEPENDS_INCLUDE_TRANSFORM

Mantis Bug Tracker mantis at public.kitware.com
Tue Jun 28 13:51:30 EDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=12309 
====================================================================== 
Reported By:                Jérôme Gardou
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12309
Category:                   (No Category)
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-06-28 13:51 EDT
Last Modified:              2011-06-28 13:51 EDT
====================================================================== 
Summary:                    Support raw replacements in
IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
Description: 
The IMPLICIT_DEPENDS_INCLUDE_TRANSFORM is very practical, but is currently
limited to macro. Perforaming quick and dirty replacements should be allowed for
maximum flexibility.

I see 2 use cases for this :

1) Adding a custom command to generate the header with IMPLICIT_DEPENDS, and use
OBJECT_DEPENDS to make object files dependant on it. Setting
IMPLICIT_DEPENDS_INCLUDE_TRANSFORM to "header.h=" would allow to skip files on
which the objects already depend on. With this technique, you can drastically
reduce dependency checking performance.

Or some #define __HEADER__ "header.h" and then #include __HEADER__

Ps : I hope this patch will apply cleanly this time. If not, just let me know.

Steps to Reproduce: 
Use test project attached, try to generate (it will obviously fail) and then
look at depends.internal in CMakeFiles/test.dir

Try commenting/uncommenting the two lines of test1.c to see the results.

Additional Information: 
I noticed that if result_test.h doesn't contain any #include statement, it won't
be added to the dependency list. Not sure if it's a feature or a bug, but I'd
consider it's the latter.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-06-28 13:51 Jérôme Gardou  New Issue                                    
2011-06-28 13:51 Jérôme Gardou  File Added:
0001-Implements-raw-replacement-for-IMPLICIT_DEPENDS_INCL.patch                 
  
======================================================================




More information about the cmake-developers mailing list