-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Sysbuild: fix annoyance with tab completion #74210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sysbuild: fix annoyance with tab completion #74210
Conversation
If not defined by caller, then set APPLICATION_BINARY_DIR to CMAKE_CURRENT_BINARY_DIR. This is normally be done by `find_package(Zephyr)`, but due to the indirection introduced with fc1884e to allow applications to provide their own sysbuild entry point, then the APPLICATION_BINARY_DIR is unexpectedly set to the bin dir of the entry point. Restore the old behavior so that APPLICATION_BINARY_DIR per default again points to top-level sysbuild binary dir. Signed-off-by: Torsten Rasmussen <[email protected]>
The sysbuild part of sysbuild/application creates a sysbuild/application folder under top-level build dir. However, having a sysbuild folder at this level means that tab completion for sysbuild pre-fixed build targets will stop after completing just `sysbuild` and then show several subfolders, making it hard to see important build targets, such as: `ninja sysbuild_menuconfig`. As `sysbuild/application` is just a folder name, then move it to `_sysbuild` instead to avoid impacting tab completion for ninja and make. Also strip the `application` part in the process, as the extra folder doesn't provide any extra benefit, but is just one more level to enter when browsing the build folder structure. Signed-off-by: Torsten Rasmussen <[email protected]>
| project(sysbuild_toplevel LANGUAGES) | ||
|
|
||
| if(NOT DEFINED APPLICATION_BINARY_DIR) | ||
| set(APPLICATION_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Application Binary Directory") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems alright, but I wonder if changing:
| set(APPLICATION_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH |
to CMAKE_BINARY_DIR would've been a more general fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did consider that, but simply decided to go with same pattern as:
zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake
Lines 50 to 54 in df788d0
| if(NOT DEFINED APPLICATION_BINARY_DIR) | |
| set(APPLICATION_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH | |
| "Application Binary Directory" | |
| ) | |
| endif() |
In the sysbuild case, then CMAKE_CURRENT_BINARY_DIR == CMAKE_BINARY_DIR when sysbuild is invoked as documented / through west build.
… folder If not defined by caller, then set APPLICATION_BINARY_DIR to CMAKE_CURRENT_BINARY_DIR. This is normally be done by `find_package(Zephyr)`, but due to the indirection introduced with fc1884e to allow applications to provide their own sysbuild entry point, then the APPLICATION_BINARY_DIR is unexpectedly set to the bin dir of the entry point. Restore the old behavior so that APPLICATION_BINARY_DIR per default again points to top-level sysbuild binary dir. Upstream PR: zephyrproject-rtos/zephyr#74210 Signed-off-by: Torsten Rasmussen <[email protected]>
The sysbuild part of sysbuild/application creates a sysbuild/application folder under top-level build dir. However, having a sysbuild folder at this level means that tab completion for sysbuild pre-fixed build targets will stop after completing just `sysbuild` and then show several subfolders, making it hard to see important build targets, such as: `ninja sysbuild_menuconfig`. As `sysbuild/application` is just a folder name, then move it to `_sysbuild` instead to avoid impacting tab completion for ninja and make. Also strip the `application` part in the process, as the extra folder doesn't provide any extra benefit, but is just one more level to enter when browsing the build folder structure. Upstream PR: zephyrproject-rtos/zephyr#74210 Signed-off-by: Torsten Rasmussen <[email protected]>
… folder If not defined by caller, then set APPLICATION_BINARY_DIR to CMAKE_CURRENT_BINARY_DIR. This is normally be done by `find_package(Zephyr)`, but due to the indirection introduced with fc1884e to allow applications to provide their own sysbuild entry point, then the APPLICATION_BINARY_DIR is unexpectedly set to the bin dir of the entry point. Restore the old behavior so that APPLICATION_BINARY_DIR per default again points to top-level sysbuild binary dir. Upstream PR: zephyrproject-rtos/zephyr#74210 Signed-off-by: Torsten Rasmussen <[email protected]>
The sysbuild part of sysbuild/application creates a sysbuild/application folder under top-level build dir. However, having a sysbuild folder at this level means that tab completion for sysbuild pre-fixed build targets will stop after completing just `sysbuild` and then show several subfolders, making it hard to see important build targets, such as: `ninja sysbuild_menuconfig`. As `sysbuild/application` is just a folder name, then move it to `_sysbuild` instead to avoid impacting tab completion for ninja and make. Also strip the `application` part in the process, as the extra folder doesn't provide any extra benefit, but is just one more level to enter when browsing the build folder structure. Upstream PR: zephyrproject-rtos/zephyr#74210 Signed-off-by: Torsten Rasmussen <[email protected]>
… folder If not defined by caller, then set APPLICATION_BINARY_DIR to CMAKE_CURRENT_BINARY_DIR. This is normally be done by `find_package(Zephyr)`, but due to the indirection introduced with fc1884e to allow applications to provide their own sysbuild entry point, then the APPLICATION_BINARY_DIR is unexpectedly set to the bin dir of the entry point. Restore the old behavior so that APPLICATION_BINARY_DIR per default again points to top-level sysbuild binary dir. Upstream PR: zephyrproject-rtos/zephyr#74210 Signed-off-by: Torsten Rasmussen <[email protected]> (cherry picked from commit c17f1bc)
The sysbuild part of sysbuild/application creates a sysbuild/application folder under top-level build dir. However, having a sysbuild folder at this level means that tab completion for sysbuild pre-fixed build targets will stop after completing just `sysbuild` and then show several subfolders, making it hard to see important build targets, such as: `ninja sysbuild_menuconfig`. As `sysbuild/application` is just a folder name, then move it to `_sysbuild` instead to avoid impacting tab completion for ninja and make. Also strip the `application` part in the process, as the extra folder doesn't provide any extra benefit, but is just one more level to enter when browsing the build folder structure. Upstream PR: zephyrproject-rtos/zephyr#74210 Signed-off-by: Torsten Rasmussen <[email protected]> (cherry picked from commit e4277b0)
Sysbuild improvements following the application sysbuild entry point support introduced in #72923