MantisBT - CMake
View Issue Details
0010360CMakeCMakepublic2010-03-03 11:182016-06-10 14:31
David Weese 
Bill Hoffman 
normalminoralways
closedmoved 
CMake-2-6 
 
0010360: add_custom_target doesn't ignore SOURCES for Makefile generators
Hi there,

add_custom_target(mytarget SOURCES myfile.h) perfectly creates a target that consists of 1 source file under Visual Studio, XCode, Eclipse, ... but for Unix Makefiles or MinGW Makefiles it doesn't recognize/ignore SOURCES and the following as a reserved word but interprets SOURCES and myfile.h as files it depends on. This breaks the build process for Makefiles, because they won't find the file SOURCES. We currently circumvent this bug with Generator dependent behaviour but I think cmake would be more platform independent if it would ignore SOURCES and the files behind.

Cheers,
Dave
No tags attached.
Issue History
2010-03-03 11:18David WeeseNew Issue
2010-03-03 11:54Bill HoffmanNote Added: 0019694
2010-03-03 11:54Bill HoffmanStatusnew => assigned
2010-03-03 11:54Bill HoffmanAssigned To => Bill Hoffman
2016-06-10 14:27Kitware RobotNote Added: 0041663
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0019694)
Bill Hoffman   
2010-03-03 11:54   
Can you attach a full example of this problem in a tar file to this bug? add_custom_command SOURCES is evaluated before the generator is even picked...??
(0041663)
Kitware Robot   
2016-06-10 14:27   
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.