Skip to content

Commit e53f6de

Browse files
ball-haydencfriedt
authored andcommitted
fix(cmake): Evaluate generator expressions in sample cargo config
Output currently includes unexpanded generator expressions, such as `$<TARGET_PROPERTY:compiler,nostdinc_include>;` within INCLUDE_DIRS. Using GENERATE instead of WRITE expands generator expressions correctly. Signed-off-by: Hayden Ball <[email protected]>
1 parent e64cadb commit e53f6de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
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)