The example I gave is only just an example for illustrating my question about Xcode and the true source files.   The actual code does have unique names for tmpfile so it will work correctly in a parallel build.<br><br><div class="gmail_quote">
On Thu, Mar 5, 2009 at 6:28 AM, Mathieu Malaterre <span dir="ltr">&lt;<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Mar 3, 2009 at 9:06 PM, Steven Wilson<br>
&lt;<a href="mailto:steven.wesley.wilson@gmail.com">steven.wesley.wilson@gmail.com</a>&gt; wrote:<br>
</div><div class="im">&gt; As a new member of the list, I just wanted to say thanks for providing this<br>
&gt; forum as a place to get answers about cmake!<br>
&gt; First, the problem:   I have a software system composed of a number of<br>
&gt; source files in C.   These files have an alternate file extension .bc.   In<br>
&gt; order to compile these files, the build system first needs to pass them<br>
&gt; through two preprocessors; 1. The C preprocessor and 2. a homegrown<br>
&gt; preprocessor that handles a private C language extension and converts<br>
&gt; occurrences of that language extension to standard C.   Finally the<br>
&gt; preprocessed source is handed to the C compiler.    My initial port of this<br>
&gt; build system used the following kind of construct:<br>
&gt; macro(process_bc_files INPUT_FILE)<br>
&gt;<br>
&gt; add_custom_command(OUTPUT ${INPUT_FILE}.c<br>
&gt;<br>
&gt; COMMAND preprocessor1 ${INPUT_FILE} &gt; tmpfile<br>
&gt; COMMAND preprocessor2 tmpfile &gt; ${INPUT_FILE}.c<br>
&gt;<br>
&gt; )<br>
&gt;<br>
&gt; endmacro(process_bc_files)<br>
<br>
</div>Just out of curiosity, does this work in parallel build (make -j4) ? I<br>
am seeing a single &#39;tmpfile&#39; for all your input files ...<br>
<br>
--<br>
<font color="#888888">Mathieu<br>
</font></blockquote></div><br>