-
Notifications
You must be signed in to change notification settings - Fork 13
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.c
andbuffer_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
excluded
group and select: Options β Exclude from build. - While holding SHIFT, select multiple files (i.e. click on
buffer_typeB.c
followed bybuffer_typeC.c
). - Finally drag the selection and drop these files inside the
excluded
group. 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.