<div dir="ltr">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:<div><br></div><div><span style="font-size:12.800000190734863px">add_custom_command( TARGET zApp_zip POST_BUILD</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">        COMMAND ${CMAKE_COMMAND} -E echo "test2"</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">        COMMAND ${CMAKE_COMMAND} ARGS ...snip...</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">    )</span><br></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 7, 2017 at 11:40 PM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey.lists@gmail.com" target="_blank">rcdailey.lists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So I probably am not understanding how this works.<br>
<br>
I have a custom target, that I later add multiple custom commands to.<br>
Each custom command has a COMMENT set, but the target itself does too:<br>
<br>
    add_custom_target(zApp_zip COMMENT "test1")<br>
<br>
    add_custom_command( TARGET zApp_zip POST_BUILD<br>
        COMMAND ${CMAKE_COMMAND} ARGS ...snip...<br>
        COMMENT "test2"<br>
    )<br>
<br>
Instead of seeing "test1" or "test2" when running, I get:<br>
<br>
$ ninja zApp_zip<br>
[1/1] Running utility command for zApp_zip<br>
<br>
Why does it say "Running utility command"? What is the behavior of all<br>
the comments supposed to be? Is this a ninja-specific issue or<br>
behavior?<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</div>