Josef,<br><br>Here&#39;s what I do. The fooCLP.h file is generated by a custom command. <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # mark the .clp file as a header file<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${TMP_FILENAME}CLP.h PROPERTIES HEADER_FILE_ONLY TRUE)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET_SOURCE_FILES_PROPERTIES(${TMP_FILENAME}.cxx PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TMP_FILENAME}CLP.h)<br><br>Bill<br><br><div class="gmail_quote">On Dec 17, 2007 9:53 AM, Josef Karthauser &lt;
<a href="mailto:joe.karthauser@geomerics.com">joe.karthauser@geomerics.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-GB">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">So, I've created a new target to generate the header, and made
the library target depend upon it.&nbsp; How do I now make sure that the generated
header is considered in the dependency checks for the objects build from the
CPP files that #include it?</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Joe</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0cm 0cm 0cm 4pt;">

<div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> David Cole [mailto:<a href="mailto:david.cole@kitware.com" target="_blank">david.cole@kitware.com</a>] <br>
<b>Sent:</b> 14 December 2007 18:18<br>
<b>To:</b> Bill Hoffman<br>
<b>Cc:</b> Josef Karthauser; <a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a><br>
<b>Subject:</b> Re: [CMake] PRE_BUILD custom commands don&#39;t appear to be
working....</span></p>

</div>

</div>

<p>&nbsp;</p>

<p>But you should be able to put your custom command in its own
custom target and then use ADD_DEPENDENCIES to make the custom target build
*before* any build steps for the library...</p>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>Have you tried that?</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>HTH,</p>

</div>

<div>

<p>David</p>

</div>

<div>

<p style="margin-bottom: 12pt;">&nbsp;</p>

<div>

<p><span>On 12/14/07, <b>Bill Hoffman</b> &lt;<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>&gt; wrote:</span></p>

<p>Josef Karthauser wrote:<br>
&gt; I don&#39;t suppose anyone had any thought on this one did they?<br>
&gt;<br>
&gt;<br>
<a href="http://www.cmake.org/HTML/Documentation.html" target="_blank">http://www.cmake.org/HTML/Documentation.html</a><br>
<br>
ADD_CUSTOM_COMMAND: Add a custom build rule to the generated build system.<br>
....<br>
Note that the PRE_BUILD option is only supported on Visual Studio 7 or<br>
later. For all other generators PRE_BUILD will be treated as PRE_LINK. <br>
....<br>
<br>
<br>
We have tried, and this is next to impossible to do with a makefile,<br>
sorry...<br>
<br>
<br>
-Bill<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a></p>

</div>

<p><br>
&nbsp;</p>

</div>

</div>

</div>

</div>


<br>_______________________________________________<br>CMake mailing list<br><a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br><a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake
</a><br></blockquote></div><br>