diff --git a/.github/workflows/zxc-build-library.yaml b/.github/workflows/zxc-build-library.yaml index 5e8ee0b79..665f065a7 100644 --- a/.github/workflows/zxc-build-library.yaml +++ b/.github/workflows/zxc-build-library.yaml @@ -86,7 +86,7 @@ jobs: matrix: include: - os: Linux - preset: linux-x64 + preset: linux-x64-gcc steps: - name: Harden Runner diff --git a/CMakePresets.json b/CMakePresets.json index 0375c57e3..bf4c5f1da 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -37,33 +37,42 @@ } }, { - "name": "linux-x64-release", + "name": "linux-x64-gcc-debug", + "displayName": "Linux x64 GCC Debug", + "description": "GCC build for Linux x64 Debug", "inherits": ["vcpkg-base"], "cacheVariables": { - "VCPKG_TARGET_TRIPLET": { - "type": "STRING", - "value": "x64-linux" - }, - "CMAKE_BUILD_TYPE": { - "type": "STRING", - "value": "Release" - } + "CMAKE_C_COMPILER": "gcc", + "CMAKE_CXX_COMPILER": "g++", + "VCPKG_TARGET_TRIPLET": "x64-linux", + "CMAKE_BUILD_TYPE": "Debug" } }, { - "name": "linux-x64-debug", + "name": "linux-x64-gcc-release", + "displayName": "Linux x64 GCC Release", + "description": "GCC build for Linux x64 Release", "inherits": ["vcpkg-base"], "cacheVariables": { - "VCPKG_TARGET_TRIPLET": { - "type": "STRING", - "value": "x64-linux" - }, - "CMAKE_BUILD_TYPE": { - "type": "STRING", - "value": "Debug" - } + "CMAKE_C_COMPILER": "gcc", + "CMAKE_CXX_COMPILER": "g++", + "VCPKG_TARGET_TRIPLET": "x64-linux", + "CMAKE_BUILD_TYPE": "Release" } }, + { + "name": "linux-x64-release", + "displayName": "Linux x64 Release", + "description": "Linux x64 Release - defaults to GCC; alias of linux-x64-gcc-release", + "inherits": ["linux-x64-gcc-release"] + }, + { + "name": "linux-x64-debug", + "displayName": "Linux x64 Debug", + "description": "Linux x64 Debug — defaults to GCC; alias of linux-x64-gcc-debug.", + "inherits": ["linux-x64-gcc-debug"] + + }, { "name": "macos-x64-release", "inherits": ["vcpkg-base"], @@ -150,21 +159,35 @@ } ], "buildPresets": [ + { + "name": "linux-x64-gcc-release", + "configurePreset": "linux-x64-gcc-release", + "displayName": "Build ninja-multi-vcpkg (GCC)", + "description": "Build ninja-multi-vcpkg Configurations with GCC", + "configuration": "Release", + "targets": ["install"] + }, + { + "name": "linux-x64-gcc-debug", + "configurePreset": "linux-x64-gcc-debug", + "displayName": "Build ninja-multi-vcpkg (GCC)", + "description": "Build ninja-multi-vcpkg Configurations with GCC", + "configuration": "Debug", + "targets": ["install"] + }, { "name": "linux-x64-release", + "inherits": ["linux-x64-gcc-release"], "configurePreset": "linux-x64-release", "displayName": "Build ninja-multi-vcpkg", - "description": "Build ninja-multi-vcpkg Configurations", - "configuration": "Release", - "targets": ["install"] + "description": "Alias for linux-x64-gcc-release build preset" }, { "name": "linux-x64-debug", + "inherits": ["linux-x64-gcc-debug"], "configurePreset": "linux-x64-debug", "displayName": "Build ninja-multi-vcpkg", - "description": "Build ninja-multi-vcpkg Configurations", - "configuration": "Debug", - "targets": ["install"] + "description": "Alias for linux-x64-gcc-debug build preset" }, { "name": "macos-x64-release", diff --git a/README.md b/README.md index 39a7ec3e6..a470d6e17 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,15 @@ cmake --build --preset windows-x64-release cmake --preset linux-x64-release cmake --build --preset linux-x64-release +# Note on Linux Presets: The standard '''linux-x64-release''' +# and '''linux-x64-debug''' presets are the recommended +# defaults for local development and will automatically +# use the GCC Compiler. If you are specifically testing +# toolchain portability or checking CI matrix +# coverage, compiler-explicit alternatives are available: +# '''linux-x64-gcc-release''' / '''linux-x64-gcc-debug''' +# (with '''clang''' variants forthcoming) + # macOS (Intel x64) cmake --preset macos-x64-release cmake --build --preset macos-x64-release