Skip to content
Commit 70a40813 authored by Martí Bolívar's avatar Martí Bolívar Committed by Anas Nashif
Browse files

cmake: add optional app_set_runner_args()



Due to a chicken-and-egg problem, it's not possible to call
board_runner_args() directly from an application CMakeLists.txt and
have it take effect:

  - if the board_runner_args() call appears before including the
    boilerplate file, then the function is undefined and an error
    occurs.

  - if the call appears after including the boilerplate file, then
    board_finalize_runner_args() has already been called by the
    relevant runner.board.cmake file, so it won't take effect.

Similarly to the way set_conf_file() works, allow applications to
declare additional runner args by checking if they have provided a
macro named app_set_runner_args(), which contains calls to
board_runner_args(). Using a macro means that we can invoke it with
the definition of board_runner_args() in scope.

Signed-off-by: default avatarMarti Bolivar <marti@opensourcefoundries.com>
parent 010fb40b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment