Thanks.<br><br>If I have a two or three step process as in the automap example which is the better idiom:<br>- I have one custom command do each of the steps.<br>- I wrap the steps a script kept in a centralized place and have the custom command call it.
<br><br><span style="font-weight: bold; text-decoration: underline;">Example: automake:</span><br>
.xml.h:<br> cat base.xml $< > $.hprep<br> transmogrify $*.hprep<br><br><br>build/tools/transmogrify.py<br> import os<br> os.system('cat %s %s.xml > %s.hprep' % (sys.argv[0], sys.argv[1], sys.argv[1]))<br>
os.system('transmogrify %s.hprep' % sys.argv[1])<br><br> # Convert<br> ADD_CUSTOM_COMMAND(<br> OUTPUT tmpFile<br> COMMAND ${TOOLSDIR}/transmogrify.py<br> ARGS ${BASEFILE_PATH} ${TMP_MCFILE_NAME}
<br> )<br><br><br><div><span class="gmail_quote">On 10/3/06, <b class="gmail_sendername">Brad King</b> <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Just list the output source files in a target:<br><br><a href="http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F">http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F
</a><br><br>In your code these lines:<br><br> # Convert<br> ADD_CUSTOM_COMMAND(<br> OUTPUT tmpFile<br> COMMAND transmogrify<br> ARGS ${TMP_MCFILE}<br> )<br><br>do not make sense because it creates an output called "tmpFile" over and
<br>over again in that FOREACH loop. Each rule should have its own output,<br>and all outputs you want to generate should be listed in a target.<br><br>-Brad<br></blockquote></div><br><br clear="all"><br>-- <br>Peter Kahn
<br><a href="mailto:citizenkahn@gmail.com">citizenkahn@gmail.com</a><br><br>