AgentSkillsCN

building

构建、测试并运行 MAGDA DAW。适用于编译、运行测试,或启动应用程序时使用。务必使用 Makefile 命令,切勿直接使用 raw cmake/ninja。

SKILL.md
--- frontmatter
name: building
description: Build, test, and run MAGDA DAW. Use when compiling, running tests, or launching the app. Always use Makefile commands, never raw cmake/ninja.

Building MAGDA

Always use Makefile targets. Never use cmake or ninja directly.

Build Commands

CommandPurpose
make debugDebug build (default)
make releaseRelease build
make configureForce CMake reconfigure
make cleanRemove all build artifacts
make rebuildClean + debug build

Test Commands

CommandPurpose
make testBuild and run all tests
make test-buildBuild tests only
make test-verboseRun tests with verbose output
make test-listList all available tests
make test-windowPlugin window tests only
make test-shutdownShutdown sequence tests only
make test-threadingThread safety tests only

Run Commands

CommandPurpose
make runBuild and launch app (GUI)
make run-consoleBuild and run with stdout visible
make run-profileRun with performance profiling

Code Quality

CommandPurpose
make formatclang-format all source files
make lintclang-tidy on all sources
make lint-changedclang-tidy on modified files only
make lint-file FILE=pathclang-tidy on a specific file

Build Directories

  • Debug: cmake-build-debug/
  • Release: cmake-build-release/

Key Notes

  • Debug build directory is cmake-build-debug, NOT build/
  • Test binary is at cmake-build-debug/tests/magda_tests
  • App bundle is at cmake-build-debug/magda/daw/magda_daw_app_artefacts/Debug/MAGDA.app
  • Pre-commit hooks run clang-format automatically; if commit fails due to formatting, re-stage and commit again