-
Notifications
You must be signed in to change notification settings - Fork 17
Excluding sources from the active build configuration
Consider the following project:
┏ 📂 Project
┃ ┣ 📂 3rd-party-components
┃ ┃ ┣ 📂 array
┃ ┃ ┣ 📂 buffer
┃ ┃ ┃ ┣ 📄 buffer_typeA.c
┃ ┃ ┃ ┣ 📄 buffer_typeB.c
┃ ┃ ┃ ┗ 📄 buffer_typeC.c
┃ ┃ ┗ 📄 ring.c
┃ ┣ 📂 debug
...For this fictitious example, the buffer component is supplied with 3 different implementations (buffer_type?.c) with different trade-offs whereas only one should be chosen at a time.
Let's say that you decide that the project needs buffer_typeA.c. Being so, buffer_typeB.c and buffer_typeC.c must be excluded from the current build configuration.
There are at least a couple of ways of accomplish this in the Workspace window:
-
Remove the undesired files from the project layout:
- Highlight each of the undesired file nodes (
buffer_typeB.candbuffer_typeC.c). - Remove them from the project layout by pressing the DEL key. or...
- Highlight each of the undesired file nodes (
-
Exclude the undesired files from the build:
- For each of the undesired file nodes: right-click and select: Options → Exclude from build. or...
-
Create an "excluded" group:
- Create a new group (i.e.
excluded) inside the desired group. - Right-click on the
excludedgroup and select: Options → Exclude from build. - While holding SHIFT, select multiple files (i.e. click on
buffer_typeB.cfollowed bybuffer_typeC.c). - Finally drag the selection and drop these files inside the
excludedgroup. By consequence, they will be excluded from the current build configuration (the example depicts "Debug").
- Create a new group (i.e.
⚠️ Notice that when a group or a file is excluded from build, its icon becomes grayed.
⚠️ Excluding sources from the current build configuration does not propagate to other build configurations.💡 Once the layout was customized, save the project by choosing File → Save All. Alternatively, click the Save All icon in the Main toolbar.
This is the IAR EWPtool wiki. Back to Home.

