Open mlasch opened 1 week ago
Seems like this feature only be used via CMake properties, not via CLI anymore due to #62395.
Example:
$ git diff samples/hello_world/CMakeLists.txt
diff --git a/samples/hello_world/CMakeLists.txt b/samples/hello_world/CMakeLists.txt
index ecb7d24bb8f..9b22926d66e 100644
--- a/samples/hello_world/CMakeLists.txt
+++ b/samples/hello_world/CMakeLists.txt
@@ -6,3 +6,4 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hello_world)
target_sources(app PRIVATE src/main.c)
+set_target_properties(version_h PROPERTIES KERNEL_VERSION_CUSTOMIZATION "#define;BANNER_VERSION;STRINGIFY(blah)")
Resulting Build:
$ west build --pristine -b nrf52840dk/nrf52840 zephyr/samples/hello_world
<snip>
$ rg BANNER_VERSION build/zephyr/include/generated/zephyr/version.h
23:#define BANNER_VERSION STRINGIFY(blah)
https://github.com/zephyrproject-rtos/zephyr/pull/61635 introduced a feature to set additional defines in
version.h
andapp_version.h
. This seems to be broken, at least in the current version (beginning with Zephyr 3.6.0 AFAIK).Steps to reproduce Build with
KERNEL_VERSION_CUSTOMIZATION
as mentioned in the PR. Then find a custom define in
build/zephyr/include/generated/version.h
. Note: in Zephyr 3.7.0version.h
moved to a new location:build/zephyr/include/generated/zephyr/version.h
.The regression appears to be present already in Zephyr 3.6.0.
Also there seems to be no documentation about this feature.
Expected behavior
KERNEL_VERSION_CUSTOMIZATION
should produce an entry in theversion.h
header file. Same forAPP_VERSION_CUSTOMIZATION
in app_version.h.Impact
KERNEL_VERSION_CUSTOMIZATION
andAPP_VERSION_CUSTOMIZATION
cannot be used.