[CMake] custom command comments not showing up

Robert Dailey rcdailey.lists at gmail.com
Mon Apr 10 09:23:46 EDT 2017


Seems like the solution here is to make COMMENT work
properly/consistently across all generators. That's the point, after
all, right?

On Sat, Apr 8, 2017 at 12:33 AM, Hendrik Sattler
<post at hendrik-sattler.de> wrote:
> However, this messes up parallel make progress output.
>
> Am 7. April 2017 22:22:08 MESZ schrieb Craig Scott <craig.scott at crascit.com>:
>>Unfortunately, COMMENT is unreliable. Some generators will honour it,
>>others won't. A more robust alternative is to use CMake's command mode
>>to
>>echo the comment instead. Eg:
>>
>>add_custom_command( TARGET zApp_zip POST_BUILD
>>        COMMAND ${CMAKE_COMMAND} -E echo "test2"
>>        COMMAND ${CMAKE_COMMAND} ARGS ...snip...
>>    )
>>
>>
>>
>>On Fri, Apr 7, 2017 at 11:40 PM, Robert Dailey
>><rcdailey.lists at gmail.com>
>>wrote:
>>
>>> So I probably am not understanding how this works.
>>>
>>> I have a custom target, that I later add multiple custom commands to.
>>> Each custom command has a COMMENT set, but the target itself does
>>too:
>>>
>>>     add_custom_target(zApp_zip COMMENT "test1")
>>>
>>>     add_custom_command( TARGET zApp_zip POST_BUILD
>>>         COMMAND ${CMAKE_COMMAND} ARGS ...snip...
>>>         COMMENT "test2"
>>>     )
>>>
>>> Instead of seeing "test1" or "test2" when running, I get:
>>>
>>> $ ninja zApp_zip
>>> [1/1] Running utility command for zApp_zip
>>>
>>> Why does it say "Running utility command"? What is the behavior of
>>all
>>> the comments supposed to be? Is this a ninja-specific issue or
>>> behavior?
>>> --
>>>
>>> Powered by www.kitware.com
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Kitware offers various services to support the CMake community. For
>>more
>>> information on each offering, please visit:
>>>
>>> CMake Support: http://cmake.org/cmake/help/support.html
>>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/
>>> opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/cmake
>>>
>
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.


More information about the CMake mailing list