From a3d5d6d4d3218d83c928aa0e27cb0dc0b26baaa9 Mon Sep 17 00:00:00 2001 From: Samuel Nicholas Date: Sat, 21 Sep 2024 22:38:07 +0930 Subject: [PATCH] VSProj Configure type on build command - to resolve #1582 Visual Studio projects are multi-config projects like Ninja-MultiConfig which means you can't set the configuration at configure time as there are multiple, it always chooses the first one by default when not specified in the build command. Instead of this: cmake -DCMAKE_BUILD_TYPE=Release -G"Visual Studio 17 2022" . cmake --build . --verbose It should be this cmake -G"Visual Studio 17 2022" . cmake --build . --verbose --config Release Update ci.yml Because the current build system doesnt use generator expressions for multi config builds, both the CMAKE_BUILD_TYPE and the build --config options need to be set (cherry picked from commit 07704f8f48308b83fc99c67b33a10027aa5a7846) --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76abdd57..13b7243e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -264,9 +264,9 @@ jobs: - name: Build godot-cpp run: | cmake -DCMAKE_BUILD_TYPE=Release -G"Visual Studio 16 2019" . - cmake --build . --verbose + cmake --build . --verbose --config Release - name: Build test GDExtension library run: | cd test && cmake -DCMAKE_BUILD_TYPE=Release -DGODOT_HEADERS_PATH="../godot-headers" -DCPP_BINDINGS_PATH=".." -G"Visual Studio 16 2019" . - cmake --build . --verbose + cmake --build . --verbose --config Release