On Mon, Sep 21, 2009 at 2:48 PM, Robert Dailey <rcdai...@gmail.com> wrote:
> On Mon, Sep 21, 2009 at 1:43 PM, Brad King <brad.k...@kitware.com> wrote: > >> Robert Dailey wrote: >> >>> My paths are correct. I'm passing in the correct absolute paths into >>> add_executable. I think that cmake is using the current cmake file instead >>> of using the one that the function call originated from. For example, I have >>> two CMake scripts: >>> >>> /Users/imac/work/redsword/CMakeLists.txt >>> /Users/imac/work/redsword/projects/Newton/CMakeLists.txt >>> >>> The former script is the one that has the function: >>> >>> function( define_project ) >>> add_executable( .... ) >>> endfunction() >>> >>> And the latter script calls the define_project() function. Can anyone >>> peek at the CMake source to see if this is indeed the case? Again, I'll try >>> to find time to provide a reproducible test project. >>> >> >> By the time the Xcode generator writes the path, there is no >> distinction between add_executable being called from the >> CMakeLists.txt directly or through the function. If you >> message() out the path inside your function just before >> or after add_executable, that is the path the generator will >> see. I expect it is correct, and the generator or Xcode >> does something funny....especially since it works in VS. > > > I've attached a test project that reproduces this issue. At the root "test" > directory, create a new directory called 'build'. So you will have > "test/build". > > cd into test/build and run: > > cmake -G "Xcode" .. > > This will generate an xcode project for you. Open that, and right click on > main.cpp (which should be colored red because it is an invalid path) and > click "Get Info". Look at the path. It's totally wrong. > Oh yeah, and I'm using Xcode v3.1.4
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake