Thanks for both of your suggestions. It looks the like the right approach is to manage the directory creation myself.<br><br>Thanks,<br>James<br><br><div class="gmail_quote">On Fri, Sep 4, 2009 at 12:07 PM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.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;">It should be fairly easy to add a 2nd custom command that creates the directory and writes out a stamp file and then make your 1st custom command depend on the stamp file.<div>
<br></div><div>I would go with that approach and put stuff where you want it rather than trying to figure out where all the varied generators put things...<br>
<br><div><br><div class="gmail_quote"><div><div></div><div class="h5">On Fri, Sep 4, 2009 at 12:10 AM, James Bigler <span dir="ltr"><<a href="mailto:jamesbigler@gmail.com" target="_blank">jamesbigler@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
So when I compile a regular C file, XCode puts the resulting object file here:<br><br>/code/myproj/src/MyProj.build/Debug/mytarget.build/Objects-normal/i386/main.o<br><br>When I try to compile something else to an object file using an add_custom_command and CMAKE_CFG_INTDIR I get this path:<br>
<br>${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/myfile.o -><br>/code/myproj/src/Debug/myfile.o<br><br>The I run into problem of the directory /code/myproj/src/Debug/ not existing.<br><br>So I have two choices.<br>
<br>
1. Add the directory creation to the custom command.<br>2. Figure out how to get a path that actually exists.<br><br>What is the preferred method, and does anyone have hints of how to get an actual build path for XCode?<br>
<br>It's too bad that add_custom_command doesn't detect that the path to the output file doesn't exist and make it for me. ;)<br><br>Thanks,<br><font color="#888888">James<br>
</font><br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div></div>
</blockquote></div><br>