Search code examples
eclipseprojecteclipse-cdtsubdirectory

Eclipse (CDT): include a subdirectory, exclude it from any build


What is the proper way to include a newly created subdirectory into the project, but exclude its content from building?


Solution

  • If folder you created is inside your project tree than, click on your project in ProjectExplorer view and than simple F5 will refresh yor project content.

    If folder you created is outside your project tree, than right-click on your project in ProjectExplorer view and than NewFolderAdvancedLink to Alternate Location→ browse for your folder.

    To exclude folder from build right-click on your new folder in ProjectExplorer view and than you can find the option under Recource ConfigurationExclude from Build....

    Folder should go gray after excluding.