-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
samples: use ZEPHYR_EXTRA_MODULES instead of ZEPHYR_MODULES
ZEPHYR_EXTRA_MODULES should be used when the intention is to add an extra module to those already found by west. The QEMU targets didn't require additional modules, so this was not apparent. Fixes #17
- Loading branch information
1 parent
aefaae8
commit 78b433a
Showing
6 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
|
||
# For this example, add ZEPHYR_RUST as a zephyr module. Not needed if added in | ||
# your environment or managed by west. | ||
get_filename_component(ZEPHYR_RUST ${CMAKE_CURRENT_SOURCE_DIR}/../.. ABSOLUTE) | ||
list(APPEND ZEPHYR_MODULES ${ZEPHYR_RUST}) | ||
list(APPEND ZEPHYR_EXTRA_MODULES ${ZEPHYR_RUST}) | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(rust) | ||
target_sources(app PRIVATE ./src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
|
||
# For this example, add ZEPHYR_RUST as a zephyr module. Not needed if added in | ||
# your environment or managed by west. | ||
get_filename_component(ZEPHYR_RUST ${CMAKE_CURRENT_SOURCE_DIR}/../.. ABSOLUTE) | ||
list(APPEND ZEPHYR_MODULES ${ZEPHYR_RUST}) | ||
list(APPEND ZEPHYR_EXTRA_MODULES ${ZEPHYR_RUST}) | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(hello_world) | ||
target_sources(app PRIVATE ./src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
|
||
# For this example, add ZEPHYR_RUST as a zephyr module. Not needed if added in | ||
# your environment or managed by west. | ||
get_filename_component(ZEPHYR_RUST ${CMAKE_CURRENT_SOURCE_DIR}/../.. ABSOLUTE) | ||
list(APPEND ZEPHYR_MODULES ${ZEPHYR_RUST}) | ||
list(APPEND ZEPHYR_EXTRA_MODULES ${ZEPHYR_RUST}) | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(rust) | ||
target_sources(app PRIVATE ./src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
|
||
# For this example, add ZEPHYR_RUST as a zephyr module. Not needed if added in | ||
# your environment or managed by west. | ||
get_filename_component(ZEPHYR_RUST ${CMAKE_CURRENT_SOURCE_DIR}/../.. ABSOLUTE) | ||
list(APPEND ZEPHYR_MODULES ${ZEPHYR_RUST}) | ||
list(APPEND ZEPHYR_EXTRA_MODULES ${ZEPHYR_RUST}) | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(rust) | ||
target_sources(app PRIVATE ./src/main.c) |