[CMake] custom target like add_executable

Bill Newcomb bnewcomb at nvidia.com
Wed Feb 4 16:36:50 EST 2015


When I specify add_executable(foo foo.c), I get both a top-level target 
(which defaults to ALL but can be set not to be) and an actual file that 
gets built that are named the same (Unix Makefiles).

add_custom_target can get me the first of those for non-executable 
things, and add_custom_command can do the second.  However, I can't use 
the same thing for the first arg to add_custom_target and the OUTPUT of 
add_custom_command.

Ideally what I'd like is a way to specify that a particular 
add_custom_command is also a top-level target (with ALL being settable 
on it).  Are there technical reasons this wouldn't be possible?

Thanks,
B.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the CMake mailing list