View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013005CMakeCMakepublic2012-02-29 13:352016-06-10 14:31
ReporterJérôme Gardou 
Assigned ToKitware Robot 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 2.8.7 
Target VersionFixed in Version 
Summary0013005: Add PRECOMPILE_RULE and POSTCOMPILE_RULE source property
DescriptionHello.

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 ReproduceThe 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>")
TagsNo tags attached.
Attached Filesdiff file icon PRE-POSTCOMPILE_RULE.diff [^] (4,280 bytes) 2012-02-29 13:35 [Show Content]

 Relationships

  Notes
(0028762)
Brad King (manager)
2012-02-29 14:57

This is an interesting feature, but it can't possibly be implemented for the Xcode and VS generators. Are you familiar with the RULE_LAUNCH_COMPILE property? It is only for Makefiles and is used by CTest to instrument compiler invocations. A better name for the proposed properties may be RULE_PRE_COMPILE and RULE_POST_COMPILE to be consistent with the other RULE_* properties.

What is your use case for which add_custom_command is not enough?
(0030370)
David Cole (manager)
2012-08-11 21:09

Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0041993)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 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
2012-02-29 14:57 Brad King Note Added: 0028762
2012-08-11 21:09 David Cole Status new => backlog
2012-08-11 21:09 David Cole Note Added: 0030370
2016-06-10 14:28 Kitware Robot Note Added: 0041993
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team