Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions share/sysbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ set(Sysbuild_DIR ${CMAKE_CURRENT_LIST_DIR}/../sysbuild-package/cmake)

project(sysbuild_toplevel LANGUAGES)

if(NOT DEFINED APPLICATION_BINARY_DIR)
set(APPLICATION_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Application Binary Directory")
Copy link
Contributor

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.

Copy link
Contributor Author

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:

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.

endif()

if(EXISTS ${APP_DIR}/sysbuild/CMakeLists.txt)
add_subdirectory(${APP_DIR}/sysbuild sysbuild/application)
else()
Expand Down