Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exporting Settings and Build Configurations in Eclipse

For context I am running Eclipse Kepler (version 4.3.2) for C++, though this question should apply to all other versions as well.

  • I would like to capture all settings in each build configuration of a project in a way that is conducive to backing up and restoring.
  • I would like other (junior) employees to be able to recreate my project from the source code and some settings file without manually inputting an abhorrent number of fields, flags, and commands.
  • I may be moving on to another job, so I may not be able to help them troubleshoot a build process for software they've never touched.
  • I want a way to facilitate the creation of new projects with the same build configurations

I am aware that under Project -> Properties -> C/C++ General -> Paths and Symbols, it is possible to export and import settings. However, as far as I have seen, this only affects the settings under Includes and Symbols tabs, ignoring Libraries, Library Paths, and all the rest. Basically, I need to to capture C/C++ General and Project -> Properties -> C/C++ Build in their entirety.

Because of network restrictions, this absolutely must be done without third-party tools in my case. If there are good plugins or tools that would make this easier, though, go ahead and post them for the benefit of anyone reading this in the future!

like image 508
automaton Avatar asked Oct 26 '16 15:10

automaton


1 Answers

A couple of useful findings:

The .cproject file in the Eclipse project's working directory contains all build settings for all build configurations. Replacing a project's .cproject will replace its settings. Note it's not as elegant as exporting/importing: all settings are overwritten, so it isn't a good approach if you want to import the settings into an existing project. It's useful for knowing you have the right build settings from scratch. though.

Alternatively, you can go to Project -> Build Configurations -> Manage... to manage configurations. It's possible to create a new build configuration by copying it from another project in your workspace.

Both are kind of clunky, but they may be enough to get the job done depending on the circumstance.

like image 105
automaton Avatar answered Oct 01 '22 08:10

automaton