1

I have several build dirs for different configurations (using an external build system from the CLI), so the executable name duplicates the desired cwd:

  • path/to/build1/executable
  • path/to/build1 (desired cwd)
  • path/to/build2/executable
  • path/to/build2 (desired cwd)

Is there a more convenient way to run the executable from the directory containing it, without typing the path twice?

The most likely solution would be with a variable like ${workspace_loc} under "Arguments -> Working directory", but I could not find a suitable variable.

Tested on Eclipse 4.6.3.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985

1 Answers1

1

If you use managed build you can get away with specifying config_name appended to workspace_loc, i.e. if you project is called "test" this should work (tested on linux)

${workspace_loc:test}/${config_name:test}

My app prints Current working dir: /home/elaskavaia/workspace/test/Debug