From 075cbfc24f12c4ea1003c13f8a48eabcffe36c82 Mon Sep 17 00:00:00 2001 From: Ethan Chien Date: Fri, 29 Mar 2024 02:47:26 +0800 Subject: [PATCH] fix: Add architecture setting in the CMakePresets.json.sample --- CMakePresets.json.sample | 58 +++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/CMakePresets.json.sample b/CMakePresets.json.sample index 6d12c95d8d..958a108b5a 100644 --- a/CMakePresets.json.sample +++ b/CMakePresets.json.sample @@ -1,22 +1,17 @@ { - "version": 2, - "cmakeMinimumRequired": { - "major": 3, - "minor": 14, - "patch": 0 - }, + "version": 3, "configurePresets": [ { - "name": "vcpkg", - "hidden": true, - "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" - } - }, - { - "name": "KiCad", - "description": "This preset is var settings for KiCad", + "name": "base", "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/build", + "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + }, "cacheVariables": { "KICAD_BUILD_QA_TESTS": "OFF", "KICAD_BUILD_I18N": "ON", @@ -25,39 +20,36 @@ }, { "name": "win64", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build", "hidden": true, "cacheVariables": { "KICAD_WIN32_DPI_AWARE": "ON", "CMAKE_INSTALL_PREFIX": "out", "CMAKE_PDB_OUTPUT_DIRECTORY": "out/pdb" }, + "architecture": { + "value": "x64", + "strategy": "external" + }, "inherits": [ - "vcpkg", - "KiCad" + "base" ] }, { - "name": "win64-Release", - "inherits": [ - "win64", - "vcpkg", - "KiCad" - ], + "name": "x64-debug", + "displayName": "x64 Debug", + "description": "Sets debug build type and x64 arch", + "inherits": "win64", "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo" + "CMAKE_BUILD_TYPE": "Debug" } }, { - "name": "win64-Debug", - "inherits": [ - "win64", - "vcpkg", - "KiCad" - ], + "name": "x64-release", + "displayName": "x64 Release", + "description": "Sets release build type", + "inherits": "win64", "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug" + "CMAKE_BUILD_TYPE": "Release" } } ]