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:

# 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)


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?


Rick
-- 

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to