MantisBT - CMake
View Issue Details
0013141CMakeCMakepublic2012-04-17 16:592013-01-09 10:55
Erik Jensen 
Brad King 
normaltweakN/A
closedfixed 
Visual Studio 2010Windows7 x64
CMake 2.8.7 
CMake 2.8.9CMake 2.8.9 
0013141: Segregate .rule files in Visual Studio 2010 build tree
One of the targets in my project involved copying a bunch of files into a directory and then package up the directory. To copy the files on an if-changed basis, I am using add_custom_command.

Because Visual Studio 2010 requires custom commands to have files to hang on, CMake creates a number of .rule files for this purpose. Unfortunately, CMake creates these files in the output directory (they are given the same location and name as the command's output, with '.rule' appended), causing them to end up in the resulting package.

My proposal would be to put all .rule files inside CMakeFiles (the .rule files for custom targets already go there, just not for custom commands).
No tags attached.
Issue History
2012-04-17 16:59Erik JensenNew Issue
2012-04-18 09:24Brad KingNote Added: 0029208
2012-04-19 07:51Brad KingNote Added: 0029229
2012-04-19 07:51Brad KingStatusnew => resolved
2012-04-19 07:51Brad KingResolutionopen => fixed
2012-04-19 07:51Brad KingAssigned To => Brad King
2012-08-09 17:00David ColeFixed in Version => CMake 2.8.9
2012-08-09 17:00David ColeTarget Version => CMake 2.8.9
2013-01-09 10:55Robert MaynardNote Added: 0032022
2013-01-09 10:55Robert MaynardStatusresolved => closed

Notes
(0029208)
Brad King   
2012-04-18 09:24   
Hiding .rule files sounds good.

Meanwhile one may work around this problem by using the MAIN_DEPENDENCY option to specify a different place to attach the rule instead of generating a .rule file.
(0029229)
Brad King   
2012-04-19 07:51   
This issue prompted some cleanup work needed w.r.t. the .rule files anyway. After two cleanup commits here is a fix for this issue:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72333a46 [^]
(0032022)
Robert Maynard   
2013-01-09 10:55   
Closing resolved issues that have not been updated in more than 4 months.