Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse cdt - how to set the active build configuration from the command line

In eclipse CDT from the command line I can create workspaces, import and build projects, etc. This works.

I'm trying to change the 'active configuration' of a project from (X) to (Y) In the GUI, I can do this: Right click on the project name, go down to "Build Configurations" -> "Set Active"

I want to do this from the command line, I'm no java developer otherwise I would set a breakpoint and step through the java code and figure this out {I don't have a java build environment setup either, simply to complex for my needs right now}

Option 1 - the setting is stored in a file.

Somewhere - in a saved file - Eclipse has to have some setting that marks a project as "the active configuration" but I can't seem to find this.

Option 2 - something from the command line ... that will let me do this

Any suggestions?

like image 606
user3696153 Avatar asked Nov 28 '25 15:11

user3696153


2 Answers

For Option 2, you can select which configuration to use while building from the command line with this

eclipse -nosplash -data . -application org.eclipse.cdt.managedbuilder.core.headlessbuild -build <project name>/<configuration>

See this bug report for more details: https://bugs.eclipse.org/bugs/show_bug.cgi?id=281397

like image 111
emanuelpf Avatar answered Dec 01 '25 05:12

emanuelpf


I was also looking for option 2, until I realized there is a fast way to set the active configuration for all of my projects.

I just need to select all of my projects, then:

Build Configuration > Set Ative > My_Config

like image 37
Michael Fayad Avatar answered Dec 01 '25 05:12

Michael Fayad