Skip to content

Commit 768bc95

Browse files
committed
fix(cmake): Evaluate generator expressions in sample cargo config
Using GENERATE instead of WRITE expands generator expressions. Signed-off-by: Hayden Ball <[email protected]>
1 parent 8952b44 commit 768bc95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ ${module}.path = \"$CACHE{RUST_MODULE_DIR}/${module}\"
129129
# symlink) in the source directory to allow various IDE tools and such to work. The build we
130130
# invoke will override these settings, in case they are out of date. Everything set here
131131
# should match the arguments given to the cargo build command below.
132-
file(WRITE ${SAMPLE_CARGO_CONFIG} "
132+
file(GENERATE OUTPUT ${SAMPLE_CARGO_CONFIG} CONTENT"
133133
# This is a generated sample .cargo/config.toml file from the Zephyr build.
134134
# At the time of generation, this represented the settings needed to allow
135135
# a `cargo build` command to compile the rust code using the current Zephyr build.

0 commit comments

Comments
 (0)