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

妖精的绣舞 提交于 2019-12-12 05:49:56

问题


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.

Thanks


回答1:


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.


来源:https://stackoverflow.com/questions/42181478/how-to-change-default-build-directory-path-in-eclipse-cdt-when-generate-makefil

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!