Clarification: I was referring to intermediate build product files, not final libraries and executables. For the most part, nobody should care where their intermediate files are as long as everything works.<br><br><div>Sorry for the mis-communication.</div>
<div><br></div><div><br><div class="gmail_quote">On Tue, Jan 18, 2011 at 8:30 AM, Bill Hoffman <span dir="ltr">&lt;<a href="mailto:bill.hoffman@kitware.com">bill.hoffman@kitware.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><div></div><div class="h5">&gt;&gt; I have changes that cause cmake to produce an Xcode project in which the<br>
&gt;&gt; targets do not have the extra phases, and the dependencies are set up such<br>
&gt;&gt; that incremental builds work efficiently!<br>
&gt;&gt;<br>
&gt;&gt; But I&#39;m having some impedance mismatches between where Xcode want the<br>
&gt;&gt; build results to be and where cmake wants them.  Xcode (like many makefiles)<br>
&gt;&gt; has the concept of a normal build and an &quot;install&quot; build.  But when cmake<br>
&gt;&gt; runs it builds some test programs using the xcodebuild command line, but<br>
&gt;&gt; does not specify the &quot;install&quot; action but then expects to find the resulting<br>
&gt;&gt; executable in the install location.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m sure I could change TryCompileCode() to add &quot;install&quot; to the<br>
&gt;&gt; xcodebuild line, but it seems like lots of other cmake scripts will have the<br>
&gt;&gt; same expectations.  I playing with trying to get Xcode to always do an<br>
&gt;&gt; &quot;install&quot;.  I tried creating xcode projects with the initial (not install)<br>
&gt;&gt; locations being where cmake wants them, but xcode seems to not do the<br>
&gt;&gt; internal dependency analysis properly when the intermediate results are not<br>
&gt;&gt; within BUILD_PRODUCTS_DIR.<br>
&gt;&gt;<br>
&gt;&gt; What is the cmake model for where the results of a build go?<br>
&gt;<br>
&gt; Putting the results where the native tool expects them is fine. CMake makes<br>
&gt; no guarantees about where build products go. If a native tool has no<br>
&gt; expectations, we try to hide build results underneath the &quot;CMakeFiles/&quot;<br>
&gt; directories in the build tree to avoid cluttering a developer&#39;s view of the<br>
&gt; build tree with stuff they mostly don&#39;t need to see...<br>
&gt; I don&#39;t think there are any hard requirements w.r.t. build products<br>
&gt; locations. Although where libraries and executables end up is important for<br>
&gt; the CMake generated install rules to work.<br>
&gt; Feel free to change things around experimentally if that makes it easy to<br>
&gt; work with newer Xcode versions. The test suite will very likely tell us if<br>
&gt; things have gone awry.<br>
&gt;<br>
<br>
</div></div>That is not entirely true....<br>
<br>
Things like EXECUTABLE_OUTPUT_PATH and target location properties have<br>
to work without an extra install step. What do you mean CMake expects<br>
to find things in install locations?  CMake does need to be able to<br>
find executables after the build is run.  It also needs to be able to<br>
place them via location properties.<br>
<font color="#888888"><br>
-Bill<br>
</font></blockquote></div><br></div>