<div dir="ltr">There's something I'm not understanding about custom commands.  I have need to run a couple of custom commands during our build that generated some output files.  They are specified like this: <div><br>
</div><div><div style="font-family:'Bitstream Vera Sans Mono';font-size:11pt;color:rgb(0,0,0)">
<pre># Build the rexx.img file
add_custom_command(OUTPUT rexx.img
           COMMAND ./rexximage
           DEPENDS rexximage rxapi rexxutil ${image_class_files} ${platform_rexx_img_depends}
           WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
add_custom_target(rexx_img ALL DEPENDS rexx.img)
</pre><pre><br></pre><pre>It produces one output file that other targets have a dependency on and it has dependencies on several files and several other targets.  This is working fine with everything occurring in the proper order, but I'm a bit surprised to see this command getting run unconditionally even if none of the command dependencies have changed.  Not a big issue, but the fact the output file gets updated means all of the subsequent build stages that have a dependency on the rexx.img file also get activated.  Why is this happening and is there anything I can do to stop this from being generated unconditionally?</pre>
<pre><br></pre><pre>Rick</pre></div></div></div>