[CMake] creating custom make targets

Eric Noulard eric.noulard at gmail.com
Thu Feb 19 03:12:07 EST 2009


2009/2/19 Aaron Turner <synfinatic at gmail.com>:
> On Wed, Feb 18, 2009 at 3:40 PM, Matthew Woehlke
> <mw_triad at users.sourceforge.net> wrote:
>> Aaron Turner wrote:
>>>
>>> Basically, I'm looking for a way to create a new make target
>>> "test_standard" and associate create_custom_target()'s to it.
>>
>> I assume you mean add_custom_target.
>>
>>> Suggestions?
>>
>> Use add_custom_command(TARGET test_standard [...]) (and also
>> add_dependencies as needed)? What doesn't work?
>
> From the docs, it sounded like this only worked when adding commands
> to existing targets, not for creating new ones.

Yes that's right.
But you have the:

add_custom_target

macro which effectively create a target, which may be unconditionnally launched.
see:

cmake --help-command add_custom_target






-- 
Erk


More information about the CMake mailing list