---
id: TASK-18
title: Add sysbuild-specific build system command behavior
status: Done
assignee:
  - codex
created_date: '2026-02-27 09:09'
updated_date: '2026-02-27 10:11'
labels: []
dependencies: []
references:
  - docs/zync/lua/zync/api/manager.lua
  - src/core/cmd.rs
  - src/core/config.rs
  - src/core/cli.rs
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Implement sysbuild-specific behavior for configuration/build commands (e.g., cmake args) so kaze aligns with the Zync reference for sysbuild projects.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Sysbuild configuration uses the proper cmake invocation (`-DAPP_DIR` + `<zephyr_base>/share/sysbuild`) instead of the normal project dir path.
- [x] #2 Behavior is limited to sysbuild projects; non-sysbuild remains unchanged.
- [x] #3 Tests updated or added to cover the sysbuild configuration path; `just test` passes.
<!-- AC:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Implemented sysbuild-specific cmake source selection in `cmd_conf`: sysbuild uses `-S <zephyr_base>/share/sysbuild` and `-DAPP_DIR=<project_dir>`; non-sysbuild unchanged. Added tests validating sysbuild/non-sysbuild args. `just test` passes (79 tests).
<!-- SECTION:NOTES:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Added sysbuild-specific configuration command behavior: cmake uses `-DAPP_DIR` and the sysbuild source dir under `ZEPHYR_BASE` for sysbuild projects, while non-sysbuild remains unchanged. Added tests for both paths; `just test` passes.

Tests: `just test`
<!-- SECTION:FINAL_SUMMARY:END -->
