Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Adding an argument to the build

Yeah, I'm not even sure changing the command in the .project file would work. Env var would be the easiest to add to all configs. CDT's env var manager doesn't seem to have an API though. You'd have to look at how the preference page inserts the env vars.

On Mon, May 9, 2016 at 10:45 AM, Marc-André Laperle <marc-andre.laperle@xxxxxxxxxxxx> wrote:
Perhaps setting an environment variable achieve the same thing? That should be easier to programmatically add.


From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Memory, Richard [Richard_Memory@xxxxxxxxxx]
Sent: Monday, 09 May 2016 10:43 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Adding an argument to the build

Hi all,

I am trying to figure out to programmatically add an argument to each build (independent of the build target).

For example,

make all myarg=foobar

One possible way that comes to mind is to obtain the org.eclipse.core.resources.IProjectDescription from the IProject, create a newCommand, and modify the buidSpec. However, I am not sure this a valid or best way of doing things.

Any suggestions and/or code examples are most welcome.


cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top