Skip to content

Commit 4096ad7

Browse files
committed
cmake: Fix dependency problem
For normal builds, the offsets.h file gets generated before the Rust target builds. But, when trying to build just the docs, the dependency is not explicit, and the file is just not generated. Fix this by making the dependency explicit. Like the others, we can't use the top-level define name, and have to state the dependency target by expanded name. This is due to the "fascinating" scoping rules in cmake. Signed-off-by: David Brown <[email protected]>
1 parent 5557cb3 commit 4096ad7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ ${config_paths}
195195
add_custom_target(librustapp ALL
196196
DEPENDS ${DUMMY_FILE}
197197
# The variables, defined at the top level, don't seem to be accessible here.
198+
offsets_h
198199
syscall_list_h_target
199200
driver_validation_h_target
200201
kobj_types_h_target
@@ -237,6 +238,7 @@ ${config_paths}
237238
add_custom_target(rustdoc
238239
DEPENDS generate_rust_docs
239240
# The variables, defined at the top level, don't seem to be accessible here.
241+
offsets_h
240242
syscall_list_h_target
241243
driver_validation_h_target
242244
kobj_types_h_target

0 commit comments

Comments
 (0)