Skip to content

Commit

Permalink
configure: Don't emit _PRESENT macros
Browse files Browse the repository at this point in the history
Do not put macros like MBED_CONF_FILESYSTEM_PRESENT or
MBED_CONF_EVENTS_PRESENT into the applicaiton's generated
mbed_config.cmake file. We will depend on Mbed OS CMake files for each
of these components to define the _PRESENT macro in a
target_compile_definitions() block for the e.g. filesystem or events
CMake targets.
  • Loading branch information
Patater committed Sep 29, 2020
1 parent 0d676cd commit bbe966d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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.
2 changes: 1 addition & 1 deletion src/mbed_tools/build/_internal/cmake_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _render_mbed_config_cmake_template(
"""
env = jinja2.Environment(loader=jinja2.PackageLoader("mbed_tools.build", str(TEMPLATES_DIRECTORY)),)
template = env.get_template(TEMPLATE_NAME)
options = list(config.options.values())
options = [x for x in config.options.values() if not x.key.endswith(".present")]
macros = list(config.macros.values())
supported_c_libs = [x for x in target_build_attributes["supported_c_libs"][toolchain_name.lower()]]

Expand Down

0 comments on commit bbe966d

Please sign in to comment.