[CMake] Question regarding out-of-tree builds and Eclipse CDT4 project generation

Philip Lowman philip at yhbt.com
Mon Apr 20 21:40:39 EDT 2009


On Mon, Apr 20, 2009 at 6:18 PM, Allen Gooch <allen.gooch at gmail.com> wrote:

> I am trying to get an out-of-tree build Eclipse CDT4 project setup in a
> Linux host environment using CMake-2.7 prerelease built from CVS a couple of
> weeks ago.  Following the instructions at
> http://www.vtk.org/Wiki/Eclipse_CDT4_Generator I do the following:
>
> $ pwd
> /home/agooch/dev
> $ ls
> src/
> $ mkdir cdt4-build
> $ cd cdt4-build
> $ cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../src
> -- processing CMakeLists.txt
> -- <other processing output elided>
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/agooch/dev/src
> $ ls
> total 0
> $
>
> The way the documentation reads ("You will now find two Eclipse files in
> your build tree") I would expect the .project and .cproject files to be
> written to /home/agooch/dev/cdt4-build, however as the output indicates
> those files have been written at the top-level of the src tree.
>
> How can I get the generated files to be built into the build tree?


I think you may need to have your source directory completely outside of
your build directory.  In other words:

  src/
  cd4-build/

Could you try that? Also make sure that you don't have a CMakeCache.txt or
.project/.cproject in src/MySourceTree before you configure.

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090420/0431a842/attachment.htm>


More information about the CMake mailing list