re3el
re3el

Reputation: 785

How to change default build directory path in Eclipse CDT when "Generate makefiles automatically" is enabled?

I am working on Eclipse Neon CDT where I have to enable "Generate Make Files Automatically" at C/C++ Build Settings for my project to compile. But, once I do that the build directory grays out and am unable to find a way to change the default build directory path. How do I solve this issue?

Attached is the screenshot showing the same. I need to change the build directory from workspace/Default to workspace/target.

enter image description here

Thanks

Upvotes: 1

Views: 2776

Answers (2)

Andy
Andy

Reputation: 1

If you follow the answer provided by HighCommander4, and use a single period as the name of the configuration, it will default to current directory. This makes sense because from the command prompt under Linux, Windows, or Apple Desktop, issuing "cd .." will traverse to the parent directory. The use of "cd ." traverses to the current directory.

Upvotes: 0

HighCommander4
HighCommander4

Reputation: 52759

I'm not sure why you can't directly edit the "Build directory" when "Generate Makefiles automatically" is checked, but here is a way to indirectly get it to be what you want:

  • Near the top of that dialog, click "Manage Configurations..."
  • Create a new configuration with the name "target" (what you want your build directory to be named). You can copy settings from the Default configuration.
  • In the dropdown next to Manage Configurations, select the newly created "target" configuration.
  • Observe the Build directory change to "target" as desired.

Upvotes: 2

Related Questions