I don&#39;t have a sample project ready yet, but I will provide the generated xcode project files in case you guys want to take a look at them. Open them in a text editor and you&#39;ll see that the paths are weird. Relative files appear as:<div>
<br></div><div>projects/Newton/source/SpawnShadowEntityAction.cpp</div><div><br></div><div>This seems wrong. It should be:</div><div><br></div><div>source/SpawnShadowEntityAction.cpp<br clear="all"><br>---------<br>Robert Dailey<br>

<br><br><div class="gmail_quote">On Fri, Sep 18, 2009 at 4:16 PM, Robert Dailey <span dir="ltr">&lt;<a href="mailto:rcdailey@gmail.com">rcdailey@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="gmail_quote">I&#39;ll see if I can get you guys a reproducible project. However, I hope you guys have access to the version of xcode I&#39;m using. I&#39;ll also get you the version number next monday when I get back into work.</div>
<div><div></div><div class="h5">
<div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Sep 18, 2009 at 4:15 PM, Robert Dailey <span dir="ltr">&lt;<a href="mailto:rcdailey@gmail.com" target="_blank">rcdailey@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">
Yeah, that&#39;s what I&#39;m doing... basically:<div><br></div><div># Root CMakeLists.txt file:</div><div>function( func1 file )</div><div>  add_executable( foobar &quot;${CMAKE_CURRENT_SOURCE_DIR}/${file}&quot; )</div>
<div>

endfunction()</div><div><br></div><div>function( define_project file )</div><div>  func1( ${file} )</div><div>endfunction()</div><div><br></div><div># CMakeLists.txt in a lower subdirectory (Inside foobar project directory):</div>


<div>define_project()</div><div><br></div><div>The code above isn&#39;t exactly what I&#39;m running, but more of a simplified version. The goal here was to turn each source file into an absolute path by prepending the CMAKE_CURRENT_SOURCE_DIR to it. When I print the path out from the cmake script via message() it seems to be OK.</div>


<div><br clear="all"><br>---------<br><font color="#888888">Robert Dailey</font><div><div></div><div><br>
<br><br><div class="gmail_quote">On Fri, Sep 18, 2009 at 3:15 PM, David Cole <span dir="ltr">&lt;<a href="mailto:david.cole@kitware.com" target="_blank">david.cole@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">


Sounds like maybe you are using &quot;${CMAKE_CURRENT_SOURCE_DIR}&quot; in a function or macro..... (defined at the top level, but called from a lower level)...<br><br><div><br><div class="gmail_quote"><div><div></div><div>


On Fri, Sep 18, 2009 at 4:12 PM, Brad King <span dir="ltr">&lt;<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div><div>Robert Dailey wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    Where is the CMakeLists.txt file containing this line?<br>
    Perhaps &quot;/Users/imac/work/redsword/CMakeLists.txt&quot;?<br>
<br>
<br>
That&#39;s where the root one is, and this root script has all of the meat that the subdirectories call. This script is the one that has the functions that call add_executable() with the absolute paths. However, the script *calling* that function is in:<br>




<br>
/Users/imac/work/redsword/projects/foobar/CMakeLists.txt<br>
</blockquote>
<br></div>
I&#39;m having trouble reproducing this.  I have<br>
<br>
  # CMakeLists.txt<br>
  cmake_minimum_required(VERSION 2.6) # but I&#39;m running 2.7.20090918<br>
  project(FOO C)<br>
  function(my_add)<br>
    add_executable(${ARGN})<br>
  endfunction()<br>
  add_subdirectory(A)<br>
<br>
  # A/CMakeLists.txt<br>
  my_add(foo ${FOO_SOURCE_DIR}/A/<a href="http://foo.mm" target="_blank">foo.mm</a> foo.c)<br>
<br>
In Xcode, the &quot;Get Info&quot; dialog for <a href="http://foo.mm" target="_blank">foo.mm</a> says<br>
<br>
  Name: A/<a href="http://foo.mm" target="_blank">foo.mm</a><br>
  Full path: /path/to/source/tree/A/<a href="http://foo.mm" target="_blank">foo.mm</a><br>
<br>
What is the symptom you&#39;re seeing?<br>
Can you please send me a tarball with a minimal project?<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The version of xcode I&#39;m using is the one that comes with the iPhone 3.1 SDK installer. I don&#39;t know how to find out the version number of xcode on the mac. I think it is xcode 3.1 though.<br>
</blockquote>
<br></div>
Use the Xcode menu:<br>
<br>
  Xcode -&gt; About Xcode<br>
<br>
to see a version dialog.</div></div><div><div></div><div><br>
<br>
-Brad<br>
<br>
_______________________________________________<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>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br></div>