[CMake] Eclipse project question.

gerry s bluevault at gmail.com
Mon Jun 9 11:55:23 EDT 2014


Hello All,

I have a source folder(Src) as below:
Src/Application/
Src/Middleware/
Src/Etc/

I create a build folder above Src/
mkdir build
cd build
cmake ../

This makes the binary under build/ with CMakeLists.txt under Src/, so I have
Src/
build/


However, when I need to browse/debug code using eclipse:
mkdir build
cd build
cmake ../ -G"Eclipse CDT4 - Unix Makefiles"

causes the .project file to be created in ../build, which is ok... but
the import into eclipse causes the file layout structure to show the build
directory, rather than the source.

Is there a way I could I have the .project files reference the Src/
directory files.

I can think of one workaround.
When debugging run cmake from the source dir:
cmake -G"Eclipse CDT4 - Unix Makefiles"
In this case I get a good view of the source folders. However, now I have
two different build steps... one for building and one for debugging.

Thanks!
-Gerard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140609/82c35ec6/attachment.html>


More information about the CMake mailing list