Search code examples
eclipse-cdt

How to set Eclipse CDT configuration build directory programmatically?


Cpp Project PropertiesI'm developing an Eclipse plug-in to help my colleagues create C++ projects build configurations from a simple user interface. The only build configuration parameter I can't set programmatically is the project build location, surrounded with a red box in the above image.

I was looking for a function of org.eclipse.cdt.managedbuilder.core.IConfiguration to do that, but I didn't find any. Can you help me please on this? I'm using Eclipse 4.6.3 and CDT 9.2.1


Solution

  • Based on the CDT source code, that dialog's code sets the build path using IConfiguration.getEditableBuilder().setBuildPath().