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">On Fri, Sep 18, 2009 at 4:12 PM, Brad King <span dir="ltr">&lt;<a href="mailto:brad.king@kitware.com">brad.king@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 class="im">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 class="im"><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 class="h5"><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>