Skip to content
Commit 2bf26ecf authored by Torsten Rasmussen's avatar Torsten Rasmussen Committed by Anas Nashif
Browse files

cmake: modules: remove Zephyr module duplicates from ZEPHYR_MODULE_NAMES



This allows users to overrule a module from command line.
As example, the Zephyr build system loads the module FOO from
`modules/FOO`, but user has a custom FOO locally at `custom/FOO` and
would like to use this module instead of manifest specified.

If user does `-DZEPHYR_EXTRA_MODULES=custom/FOO` the following error
will be seen:
```
The binary directory

  build/modules/FOO

is already used to build a source directory.  It cannot be used to build
source directory

  custom/FOO

Specify a unique binary directory name.
```

Removing duplicates from the list allows a user to use
`-DZEPHYR_EXTRA_MODULES=custom/FOO` and thus replace `modules/FOO` for
the current build.

Signed-off-by: default avatarTorsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
parent 46f2f8cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment