<div class="gmail_quote">On Mon, Jan 18, 2010 at 10:14 AM, Romain CHANU <span dir="ltr"><<a href="mailto:romainchanu@gmail.com">romainchanu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes I knew for the GENERATED option. <br><br>This solution is a good work-around but still, it would be nice if CMake could handle the situation this way:<br><br># Generate Java / XML binding files <br>add_custom_command(<br>
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/*.java<br> COMMAND ${JAVA_PATH}/xjc ${CMAKE_SOURCE_DIR}/xsd/*.xsd<br> DEPENDS ${CMAKE_SOURCE_DIR}/xsd/*.xsd<br> COMMENT "Invoking xjc to generate Java binding files")<br>
<br>The OUTPUT, DEPENDS could handle regex strings.<br><br>What do you think?<br></blockquote><div><br></div></div>I think you don't realize what you're asking for here... You're basically asking cmake to analyze a set of directories for an unknown set of files for a single custom command invocation **every time you type "make" ** -- we intentionally do not support this scenario for performance reasons.<br>
<br>We try to keep the "do nothing make" case as fast as possible and this sort of feature would have a negative impact on that performance.<br><br>File DEPENDS sets must be explicit.<br><br>