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

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Tue Apr 21 10:41:45 EDT 2009


On Mon, Apr 20, 2009 at 6:18 PM, Allen Gooch 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?

This seems like a regression... you should not get any files generated
in your source tree. Did you start with a clean directory in
/home/agooch/dev/cdt4-build (as the snippet above suggests)? Could you
reproduce this with the simplest CMakeLists.txt possible and attach it
to a bug report?

Thanks,
--Miguel


More information about the CMake mailing list