From 9ef4be2a961e36d81f3e01556635bf6eb27ae7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 22:41:14 +0100 Subject: [PATCH] Update build_cmake.yml to handle GCC 5-6 with older CMake versions --- .github/workflows/build_cmake.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 3742b79..5adba98 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -238,7 +238,18 @@ jobs: - name: Configure run: | - cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release + # GCC 5-6 have CMake 3.0.2 which doesn't support -S/-B flags (added in 3.13) + if [ "${{ matrix.compiler }}" = "gcc" ]; then + if [ "${{ matrix.version }}" = "5" ] || [ "${{ matrix.version }}" = "6" ]; then + mkdir build + cd build + cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release + else + cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release + fi + else + cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release + fi - name: Build run: cmake --build build