Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure: Don't emit _PRESENT macros #78

Merged
merged 1 commit into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions news/20200929160957.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't emit _PRESENT macros. Depend on Mbed OS to define these from CMake.
8 changes: 8 additions & 0 deletions src/mbed_tools/build/_internal/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ def from_sources(cls, sources: Iterable[Source]) -> "Config":
config = Config()
for source in sources:
for key, value in source.config.items():
# If the config item is about a certain component or feature
# being present, avoid adding it to the mbed_config.cmake
# configuration file. Instead, applications should depend on
# the feature or component with target_link_libraries() and the
# component's CMake flle (in the Mbed OS repo) will create
# any necessary macros or definitions.
if key.endswith(".present"):
continue
_create_config_option(config, key, value, source)
for key, value in source.overrides.items():
if key in IGNORED_OVERRIDE_KEYS_IN_SOURCE:
Expand Down