MantisBT - CMake
View Issue Details
0008815CMakeDocumentationpublic2009-03-30 01:462009-03-30 08:28
James Bigler 
Brad King 
normalminoralways
closedfixed 
CMake-2-6 
 
0008815: add_custom_command needs documention to state scope of command
According to this thread, the OUTPUTS of add_custom_command can only be referenced as a build rule in the directory they were declared in.
http://www.cmake.org/pipermail/cmake/2009-February/027323.html [^]

This prevents calling add_custom_command in a subdirectory, using the OUTPUTS in a target in the parent directory, and having the add_custom_command being run as a dependency for that target.

This is somewhat unintuitive and should be documented, since add_custom_command could be seen as behaving as a target does and have global scope.

No tags attached.
Issue History
2009-03-30 01:46James BiglerNew Issue
2009-03-30 08:01Brad KingStatusnew => assigned
2009-03-30 08:01Brad KingAssigned To => Brad King
2009-03-30 08:28Brad KingNote Added: 0015847
2009-03-30 08:28Brad KingStatusassigned => closed
2009-03-30 08:28Brad KingResolutionopen => fixed

Notes
(0015847)
Brad King   
2009-03-30 08:28   
ENH: Document scope of add_custom_command outputs
/cvsroot/CMake/CMake/Source/cmAddCustomCommandCommand.h,v <-- Source/cmAddCustomCommandCommand.h
new revision: 1.36; previous revision: 1.35
/cvsroot/CMake/CMake/Source/cmAddCustomTargetCommand.h,v <-- Source/cmAddCustomTargetCommand.h
new revision: 1.24; previous revision: 1.23