[cmake-developers] [CMake 0013005]: Add PRECOMPILE_RULE and POSTCOMPILE_RULE source property

Mantis Bug Tracker mantis at public.kitware.com
Wed Feb 29 13:35:35 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13005 
====================================================================== 
Reported By:                Jérôme Gardou
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13005
Category:                   CMake
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-02-29 13:35 EST
Last Modified:              2012-02-29 13:35 EST
====================================================================== 
Summary:                    Add PRECOMPILE_RULE and POSTCOMPILE_RULE source
property
Description: 
Hello.

For finer control of our build process, we sometimes need to add some
supplementary commands for some specific files. Although add_custom_command is
great, it's not enough for our purpose.

The documentation says it all, and the implementation is really straightforward.
I only added this for the MakeFile generator, as we don't really support
anything else, and I'm not familiar enough with other code portions of cmake.

It also ensures that the compilation depends on those rules.

Regards.
Jérôme

Steps to Reproduce: 
The functionality can be tested with the following:
cmake_minimum_required(VERSION 2.6)

add_library(test test1.c test2.c)

set_source_files_properties(test1.c test2.c PROPERTIES PRECOMPILE_RULE "echo
<SOURCE> will be compiled there: <OBJECT>"
    POSTCOMPILE_RULE "echo <SOURCE> was compiled with flags <FLAGS> and defines
<DEFINES>")
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-02-29 13:35 Jérôme Gardou  New Issue                                    
2012-02-29 13:35 Jérôme Gardou  File Added: PRE-POSTCOMPILE_RULE.diff         
          
======================================================================




More information about the cmake-developers mailing list