Commit Graph

6 Commits (86d04711361de2a8db897a35fa175ebe038e92ed)

Author SHA1 Message Date
Martin Kojtal b6a90c4ae1 CMake: fix for CMAKE_CURRENT_LIST_DIR in functions
CMAKE_CURRENT_LIST_DIR behaves differently in functions. We store it in the CMakeLists itself, so anyone
calling a function would get the actual list dir where the scripts are.

To illustrate: if I call a function from src/CMakelists.txt, function located in src/scripts, `CMAKE_CURRENT_LIST_DIR` in the function would point
to the src/ folder but not to src/scripts.
2021-04-14 13:09:27 +01:00
Martin Kojtal dfc4010e24 CMake targets: remove MBED_PATH, use stadard variables
- list files included via module path
- <project-name>_SOURCE_DIR for sources that are out of the current processed CMake
- CMAKE_CURRENT_LIST_DIR for listfiles
2021-04-14 13:09:26 +01:00
Lingkai Dong 848341112e NXP: Query precise application names in post build
This removes the need to use "glob" a file extension, and uses
precise application names.
2021-03-04 10:28:22 +00:00
Hugues Kamba 03914d1875 CMake: Remove references of APP_TARGET
This needs to be removed as there should not be a
name requirement for application CMake variable name.
Furthermore, in certain uses cases it prevents
successful builds for some Mbed targets. For instance
when building Greentea test applications for Mbed
targets that require post build operations as they do
not define APP_TARGET.
2021-02-23 17:24:31 +00:00
Hugues Kamba 68b6e6ff96 Fix post build mechanism with unique CMake custom targets
The CMake custom target must be unique to avoid more than one
Mbed target adding the same. Only the CMake custom command added for the
Mbed target being built is run as the custom CMake target now includes
the Mbed target name.
2021-02-15 17:39:27 +00:00
Hugues Kamba deeaa7970f CMake: Add post build operation support
A CMake custom target, mbed-post-build, is added as a dependency of the
application CMake target if a Mbed target adds a CMake custom target
named mbed-post-build-bin. mbed-post-build-bin is added as a dependency
of mbed-post-build. mbed-post-build-bin depends on the application binary.
This is done so a CMake custom command that executes post-build can be added.

The Python scripts that implement the operations have been modified to add
CLI entry points so they can be called from CMake. Dependency on the old
tool has been removed on those scripts by passing them exactly what they
require instead of passing old tool Python objects. A consequence of that
was to slightly amend how the old tool calls some of those Python modules.

Support has only been added for Mbed targets that currently have a requirement
for post build operations. This includes: LPC1114, LPC1768, ARCH_PRO, LPC54114,
LPC546XX, FF_LPC546XX, CY8CKIT064B0S2_4343W, CYTFM_064B0S2_4343W, CYSBSYSKIT_01

The following targets are not supported as TFM support is not yet included:
ARM_MUSCA_B1, ARM_MUSCA_B1_NS, ARM_MUSCA_S1, ARM_MUSCA_S1_NS.
2021-02-11 17:04:41 +00:00