Currently I am analysing Pastec; it uses CMake as a build system. To split them up, I wanted to analyse it using the functionality of Eclipse.
Pastec can be built using following order.
$ git clone https://github.com/Visu4link/pastec.git $ mkdir build $ cd build $ cmake ../ $ make
To build Pastec in Eclipse CDT, instead of doing “cmake ..”, following order need to be done. (Debug build)
$ cd build $ cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ..
Then, it can be imported into Eclipse:
- Import project using Menu File->Import
- Select General->Existing projects into workspace:
- Browse where your build tree is and select the root build tree directory(pastec/build). Keep “Copy projects into workspace” unchecked.
- You get a fully functional eclipse project
Reference
http://pastec.io/doc#setup
http://www.cmake.org/Wiki/Eclipse_CDT4_Generator
I got the .project and .cproject files following the steps detailed herein. The project also gets imported into eclipse successfully. However, the project is not buildable through eclipse. If I need to build, I still need to execute make from command line.
How do you make it a “fully functional” eclipse project?
LikeLike