Files
yaze/CMakePresets.json
scawful 588db01df6 feat: Improve CMake configuration and build environment verification
- Enabled JSON support by default in CMake to resolve Windows build issues.
- Added checks for the existence of the JSON library and its target, providing clear error messages if missing.
- Updated README with instructions for building with AI features.
- Enhanced the build environment verification script for better feedback on setup issues and added checks for agent folder structure.
- Introduced new CMake presets for AI-enabled builds and collaboration support.
2025-10-04 19:43:05 -04:00

770 lines
22 KiB
JSON

{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 16,
"patch": 0
},
"configurePresets": [
{
"name": "default",
"displayName": "Default Config",
"description": "Default build configuration",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"YAZE_BUILD_TESTS": "ON",
"YAZE_BUILD_APP": "ON",
"YAZE_BUILD_LIB": "ON",
"YAZE_BUILD_EMU": "OFF",
"YAZE_BUILD_Z3ED": "OFF",
"YAZE_USE_MODULAR_BUILD": "ON"
}
},
{
"name": "debug",
"displayName": "Debug",
"description": "Debug build with full debugging symbols",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_FLAGS_DEBUG": "-g -O0 -DDEBUG",
"CMAKE_C_FLAGS_DEBUG": "-g -O0 -DDEBUG",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "release",
"displayName": "Release",
"description": "Optimized release build",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"YAZE_BUILD_TESTS": "OFF"
}
},
{
"name": "dev",
"displayName": "Development",
"description": "Development build with ROM testing enabled",
"inherits": "debug",
"cacheVariables": {
"YAZE_ENABLE_ROM_TESTS": "ON",
"YAZE_TEST_ROM_PATH": "${sourceDir}/zelda3.sfc"
}
},
{
"name": "macos-dev",
"displayName": "macOS debug (ARM64)",
"description": "macOS ARM64 development build with ROM testing (no z3ed AI)",
"inherits": "macos-debug",
"cacheVariables": {
"YAZE_BUILD_APP": "ON",
"YAZE_BUILD_EMU": "OFF",
"YAZE_BUILD_Z3ED": "OFF",
"YAZE_MINIMAL_BUILD": "ON",
"YAZE_BUILD_TESTS": "ON",
"YAZE_ENABLE_ROM_TESTS": "ON",
"YAZE_TEST_ROM_PATH": "${sourceDir}/zelda3.sfc",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "macos-dev-z3ed-ai",
"displayName": "yaze-ai",
"description": "macOS ARM64 development build with ROM testing",
"binaryDir": "${sourceDir}/build_test",
"inherits": "macos-debug",
"cacheVariables": {
"YAZE_ENABLE_ROM_TESTS": "ON",
"YAZE_TEST_ROM_PATH": "${sourceDir}/zelda3.sfc",
"Z3ED_AI": "ON",
"YAZE_WITH_JSON": "ON",
"YAZE_WITH_GRPC": "ON",
"YAZE_BUILD_Z3ED": "ON",
"YAZE_BUILD_EMU": "ON"
}
},
{
"name": "macos-agent-test",
"displayName": "z3ed-agent (ARM64)",
"description": "macOS ARM64 build for exercising the z3ed agent with JSON/GRPC",
"inherits": "macos-debug",
"cacheVariables": {
"YAZE_WITH_JSON": "ON",
"YAZE_WITH_GRPC": "ON",
"YAZE_BUILD_Z3ED": "ON",
"YAZE_BUILD_TESTS": "ON",
"YAZE_ENABLE_ROM_TESTS": "ON",
"YAZE_TEST_ROM_PATH": "${sourceDir}/zelda3.sfc"
}
},
{
"name": "macos-dungeon-dev",
"displayName": "Dungeon Editor Dev (ARM64)",
"description": "macOS ARM64 build for dungeon editing implementation work (app + tests only)",
"binaryDir": "${sourceDir}/build_rooms",
"inherits": "macos-debug",
"cacheVariables": {
"YAZE_BUILD_APP": "ON",
"YAZE_BUILD_EMU": "OFF",
"YAZE_BUILD_Z3ED": "OFF",
"YAZE_MINIMAL_BUILD": "ON",
"YAZE_BUILD_TESTS": "ON",
"YAZE_ENABLE_ROM_TESTS": "ON",
"YAZE_TEST_ROM_PATH": "${sourceDir}/zelda3.sfc",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "ci",
"displayName": "Continuous Integration",
"description": "CI build without ROM-dependent tests",
"inherits": "default",
"cacheVariables": {
"YAZE_ENABLE_ROM_TESTS": "OFF",
"YAZE_BUILD_TESTS": "ON"
}
},
{
"name": "macos-debug",
"displayName": "macOS Debug (ARM64)",
"description": "macOS ARM64-specific debug configuration",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0",
"CMAKE_OSX_ARCHITECTURES": "arm64"
}
},
{
"name": "macos-release",
"displayName": "macOS Release (ARM64)",
"description": "macOS ARM64-specific release configuration",
"inherits": "release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0",
"CMAKE_OSX_ARCHITECTURES": "arm64"
}
},
{
"name": "macos-debug-universal",
"displayName": "macOS Debug (Universal)",
"description": "macOS universal binary debug configuration",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15",
"CMAKE_OSX_ARCHITECTURES": "x86_64;arm64"
}
},
{
"name": "macos-release-universal",
"displayName": "macOS Release (Universal)",
"description": "macOS universal binary release configuration",
"inherits": "release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15",
"CMAKE_OSX_ARCHITECTURES": "x86_64;arm64"
}
},
{
"name": "linux-debug",
"displayName": "Linux Debug",
"description": "Linux-specific debug configuration",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"cacheVariables": {
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_C_COMPILER": "gcc"
}
},
{
"name": "linux-clang",
"displayName": "Linux Clang",
"description": "Linux build with Clang",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"cacheVariables": {
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_C_COMPILER": "clang"
}
},
{
"name": "windows-debug",
"displayName": "Windows Debug",
"description": "Windows debug build (JSON enabled by default, AI features disabled)",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_MANIFEST_MODE": "ON"
}
},
{
"name": "windows-release",
"displayName": "Windows Release",
"description": "Windows-specific release configuration with vcpkg",
"inherits": "release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_MANIFEST_MODE": "ON"
}
},
{
"name": "windows-dev",
"displayName": "Windows Development",
"description": "Windows development build with vcpkg and testing enabled",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_MANIFEST_MODE": "ON",
"YAZE_BUILD_TESTS": "ON",
"YAZE_ENABLE_ROM_TESTS": "ON"
}
},
{
"name": "windows-agent-test",
"displayName": "Windows z3ed agent test",
"description": "Windows build for exercising the z3ed agent with JSON/GRPC",
"inherits": "windows-debug",
"cacheVariables": {
"YAZE_WITH_JSON": "ON",
"YAZE_WITH_GRPC": "ON",
"YAZE_BUILD_Z3ED": "ON",
"YAZE_BUILD_TESTS": "ON",
"YAZE_ENABLE_ROM_TESTS": "ON",
"YAZE_TEST_ROM_PATH": "${sourceDir}/zelda3.sfc"
}
},
{
"name": "windows-ai-debug",
"displayName": "Windows AI Debug",
"description": "Windows debug build with AI agent features (JSON enabled)",
"inherits": "windows-debug",
"cacheVariables": {
"Z3ED_AI": "ON",
"YAZE_WITH_JSON": "ON",
"YAZE_BUILD_Z3ED": "ON",
"YAZE_BUILD_TESTS": "ON"
}
},
{
"name": "windows-ai-release",
"displayName": "Windows AI Release",
"description": "Windows release build with AI agent features (JSON enabled)",
"inherits": "windows-release",
"cacheVariables": {
"Z3ED_AI": "ON",
"YAZE_WITH_JSON": "ON",
"YAZE_BUILD_Z3ED": "ON"
}
},
{
"name": "windows-collab-debug",
"displayName": "Windows Collaboration Debug",
"description": "Windows debug build with full collaboration support (JSON + gRPC)",
"inherits": "windows-debug",
"cacheVariables": {
"Z3ED_AI": "ON",
"YAZE_WITH_JSON": "ON",
"YAZE_WITH_GRPC": "ON",
"YAZE_BUILD_Z3ED": "ON",
"YAZE_BUILD_TESTS": "ON"
}
},
{
"name": "windows-arm64-debug",
"displayName": "Windows ARM64 Debug",
"description": "Windows ARM64-specific debug configuration with vcpkg",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "arm64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "arm64-windows",
"VCPKG_MANIFEST_MODE": "ON"
}
},
{
"name": "windows-arm64-release",
"displayName": "Windows ARM64 Release",
"description": "Windows ARM64-specific release configuration with vcpkg",
"inherits": "release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "arm64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "arm64-windows",
"VCPKG_MANIFEST_MODE": "ON"
}
},
{
"name": "windows-arm64-dev",
"displayName": "Windows ARM64 Development",
"description": "Windows ARM64 development build with vcpkg and testing enabled",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "arm64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "arm64-windows",
"VCPKG_MANIFEST_MODE": "ON",
"YAZE_BUILD_TESTS": "ON",
"YAZE_ENABLE_ROM_TESTS": "ON"
}
},
{
"name": "asan",
"displayName": "AddressSanitizer",
"description": "Debug build with AddressSanitizer",
"inherits": "debug",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-fsanitize=address -fno-omit-frame-pointer -g",
"CMAKE_C_FLAGS": "-fsanitize=address -fno-omit-frame-pointer -g",
"CMAKE_EXE_LINKER_FLAGS": "-fsanitize=address",
"CMAKE_SHARED_LINKER_FLAGS": "-fsanitize=address"
}
},
{
"name": "coverage",
"displayName": "Code Coverage",
"description": "Debug build with code coverage",
"inherits": "debug",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "--coverage -g -O0",
"CMAKE_C_FLAGS": "--coverage -g -O0",
"CMAKE_EXE_LINKER_FLAGS": "--coverage"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default",
"displayName": "Default Build",
"jobs": 12
},
{
"name": "debug",
"configurePreset": "debug",
"displayName": "Debug Build",
"jobs": 12
},
{
"name": "release",
"configurePreset": "release",
"displayName": "Release Build",
"jobs": 12
},
{
"name": "dev",
"configurePreset": "dev",
"displayName": "Development Build",
"jobs": 12
},
{
"name": "macos-dev",
"configurePreset": "macos-dev",
"displayName": "macOS debug ARM64",
"jobs": 12
},
{
"name": "macos-dev-z3ed-ai",
"configurePreset": "macos-dev-z3ed-ai",
"displayName": "yaze-ai",
"jobs": 12
},
{
"name": "ci",
"configurePreset": "ci",
"displayName": "CI Build",
"jobs": 12
},
{
"name": "macos-debug",
"configurePreset": "macos-debug",
"displayName": "macOS Debug Build",
"jobs": 12
},
{
"name": "macos-release",
"configurePreset": "macos-release",
"displayName": "macOS Release Build (ARM64)",
"jobs": 12
},
{
"name": "macos-debug-universal",
"configurePreset": "macos-debug-universal",
"displayName": "macOS Debug Build (Universal)",
"jobs": 12
},
{
"name": "macos-release-universal",
"configurePreset": "macos-release-universal",
"displayName": "macOS Release Build (Universal)",
"jobs": 12
},
{
"name": "macos-agent-test",
"configurePreset": "macos-agent-test",
"displayName": "macOS z3ed Agent Test Build",
"jobs": 12
},
{
"name": "macos-dungeon-dev",
"configurePreset": "macos-dungeon-dev",
"displayName": "macOS Dungeon Editor Dev Build",
"jobs": 12
},
{
"name": "fast",
"configurePreset": "debug",
"displayName": "Fast Debug Build",
"jobs": 12
},
{
"name": "windows-debug",
"configurePreset": "windows-debug",
"displayName": "Windows Debug Build",
"configuration": "Debug",
"jobs": 12
},
{
"name": "windows-release",
"configurePreset": "windows-release",
"displayName": "Windows Release Build",
"configuration": "Release",
"jobs": 12
},
{
"name": "windows-dev",
"configurePreset": "windows-dev",
"displayName": "Windows Development Build",
"configuration": "Debug",
"jobs": 12
},
{
"name": "windows-arm64-debug",
"configurePreset": "windows-arm64-debug",
"displayName": "Windows ARM64 Debug Build",
"configuration": "Debug",
"jobs": 12
},
{
"name": "windows-arm64-release",
"configurePreset": "windows-arm64-release",
"displayName": "Windows ARM64 Release Build",
"configuration": "Release",
"jobs": 12
},
{
"name": "windows-arm64-dev",
"configurePreset": "windows-arm64-dev",
"displayName": "Windows ARM64 Development Build",
"configuration": "Debug",
"jobs": 12
},
{
"name": "windows-agent-test",
"configurePreset": "windows-agent-test",
"displayName": "Windows z3ed Agent Test Build",
"configuration": "Debug",
"jobs": 12
},
{
"name": "windows-ai-debug",
"configurePreset": "windows-ai-debug",
"displayName": "Windows AI Debug Build",
"configuration": "Debug",
"jobs": 12
},
{
"name": "windows-ai-release",
"configurePreset": "windows-ai-release",
"displayName": "Windows AI Release Build",
"configuration": "Release",
"jobs": 12
},
{
"name": "windows-collab-debug",
"configurePreset": "windows-collab-debug",
"displayName": "Windows Collaboration Debug Build",
"configuration": "Debug",
"jobs": 12
}
],
"testPresets": [
{
"name": "stable",
"configurePreset": "default",
"displayName": "Stable Tests (Release Ready)",
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
},
"filter": {
"exclude": {
"name": ".*(IntegrationTest|E2ERomDependentTest|ZSCustomOverworldUpgradeTest|RomIntegrationTest|ComprehensiveIntegrationTest|OverworldIntegrationTest|DungeonIntegrationTest|DungeonEditorIntegrationTest|DungeonEditorSystemIntegrationTest|DungeonObjectRendererIntegrationTest|DungeonObjectRendererMockTest|DungeonObjectRenderingTests|Tile16EditorIntegrationTest).*"
}
}
},
{
"name": "dev",
"configurePreset": "dev",
"displayName": "Development Tests (with ROM)",
"execution": {
"noTestsAction": "error",
"stopOnFailure": false
},
"filter": {
"exclude": {
"name": ".*(E2ERomDependentTest|ZSCustomOverworldUpgradeTest).*"
}
}
},
{
"name": "ci",
"configurePreset": "ci",
"displayName": "CI Tests (stable only)",
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
},
"filter": {
"exclude": {
"name": ".*(IntegrationTest|E2ERomDependentTest|ZSCustomOverworldUpgradeTest|RomIntegrationTest|ComprehensiveIntegrationTest|OverworldIntegrationTest|DungeonIntegrationTest|DungeonEditorIntegrationTest|DungeonEditorSystemIntegrationTest|DungeonObjectRendererIntegrationTest|DungeonObjectRendererMockTest|DungeonObjectRenderingTests|Tile16EditorIntegrationTest).*"
}
}
},
{
"name": "experimental",
"configurePreset": "debug",
"displayName": "Experimental Tests",
"execution": {
"noTestsAction": "ignore",
"stopOnFailure": false
},
"filter": {
"include": {
"name": ".*(E2ERomDependentTest|ZSCustomOverworldUpgradeTest).*"
}
}
},
{
"name": "asar-only",
"configurePreset": "default",
"displayName": "Asar Tests Only",
"filter": {
"include": {
"name": ".*Asar.*"
}
}
},
{
"name": "unit-only",
"configurePreset": "default",
"displayName": "Unit Tests Only",
"filter": {
"exclude": {
"name": ".*(IntegrationTest|E2ERomDependentTest|ZSCustomOverworldUpgradeTest|RomIntegrationTest|ComprehensiveIntegrationTest|OverworldIntegrationTest|DungeonIntegrationTest|DungeonEditorIntegrationTest|DungeonEditorSystemIntegrationTest|DungeonObjectRendererIntegrationTest|DungeonObjectRendererMockTest|DungeonObjectRenderingTests|Tile16EditorIntegrationTest).*"
}
}
},
{
"name": "integration-only",
"configurePreset": "default",
"displayName": "Integration Tests Only",
"execution": {
"noTestsAction": "error",
"stopOnFailure": false
},
"filter": {
"include": {
"name": ".*(IntegrationTest|RomIntegrationTest|ComprehensiveIntegrationTest|OverworldIntegrationTest|DungeonIntegrationTest|DungeonEditorIntegrationTest|DungeonEditorSystemIntegrationTest|DungeonObjectRendererIntegrationTest|DungeonObjectRendererMockTest|DungeonObjectRenderingTests|Tile16EditorIntegrationTest).*"
}
}
},
{
"name": "rom-only",
"configurePreset": "default",
"displayName": "ROM-Dependent Tests",
"execution": {
"noTestsAction": "error",
"stopOnFailure": false
},
"filter": {
"include": {
"name": ".*(RomTest|RomIntegrationTest|ComprehensiveIntegrationTest|OverworldIntegrationTest|DungeonIntegrationTest|DungeonEditorIntegrationTest|DungeonEditorSystemIntegrationTest|DungeonObjectRendererIntegrationTest|DungeonObjectRendererMockTest|DungeonObjectRenderingTests|Tile16EditorIntegrationTest).*"
}
}
},
{
"name": "e2e-only",
"configurePreset": "default",
"displayName": "End-to-End Tests",
"execution": {
"noTestsAction": "ignore",
"stopOnFailure": false
},
"filter": {
"include": {
"name": ".*(E2ERomDependentTest|ZSCustomOverworldUpgradeTest).*"
}
}
},
{
"name": "zscustom-overworld",
"configurePreset": "default",
"displayName": "ZS Custom Overworld Tests",
"execution": {
"noTestsAction": "ignore",
"stopOnFailure": false
},
"filter": {
"include": {
"name": ".*ZSCustomOverworldUpgradeTest.*"
}
}
}
],
"packagePresets": [
{
"name": "default",
"configurePreset": "release",
"displayName": "Default Package"
},
{
"name": "macos",
"configurePreset": "macos-release",
"displayName": "macOS Package (ARM64)"
},
{
"name": "macos-universal",
"configurePreset": "macos-release-universal",
"displayName": "macOS Package (Universal)"
}
],
"workflowPresets": [
{
"name": "dev-workflow",
"displayName": "Development Workflow",
"steps": [
{
"type": "configure",
"name": "dev"
},
{
"type": "build",
"name": "dev"
},
{
"type": "test",
"name": "dev"
}
]
},
{
"name": "ci-workflow",
"displayName": "CI Workflow",
"steps": [
{
"type": "configure",
"name": "ci"
},
{
"type": "build",
"name": "ci"
},
{
"type": "test",
"name": "ci"
}
]
},
{
"name": "release-workflow",
"displayName": "Release Workflow",
"steps": [
{
"type": "configure",
"name": "macos-release"
},
{
"type": "build",
"name": "macos-release"
},
{
"type": "package",
"name": "macos"
}
]
}
]
}