-
-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible bug with CMake and visual studio release type #1582
Comments
I found the answer 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 |
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
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
Now that you've figured out what's going on with this, do we still need this issue? Or, is this something you think we should document somewhere? EDIT: Oh, nevermind, it looks like you have you have PR #1600 to fix this. I'll update the description on that one so these are linked. |
VSProj Configure type on build command - to resolve #1582
If there are build instructions please point me in their direction and I'll
update them.
…On Thu, Sep 26, 2024, 10:34 PM David Snopek ***@***.***> wrote:
Closed #1582 <#1582> as
completed via #1600 <#1600>.
—
Reply to this email directly, view it on GitHub
<#1582 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANEDDUPTCRSP55CVISPQCTZYQA5HAVCNFSM6AAAAABOEIU3ZKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGQYTMMJVGQYTQMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I guess there's your build instructions in PR #1595? |
Those were simply what existed as comments just moved to an appropriate
location. Will likely require a rewrite sometime soon.
…On Fri, Sep 27, 2024, 1:26 PM David Snopek ***@***.***> wrote:
I guess there's your build instructions in PR #1595
<#1595>?
—
Reply to this email directly, view it on GitHub
<#1582 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANEDDUFPRUKOKSSF4XIRADZYVFITAVCNFSM6AAAAABOEIU3ZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZZGE2TKOJQHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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 07704f8)
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 07704f8)
Godot version
godot-cpp version
master
System information
github ci
Issue description
I pulled the build logs from the github ci, 🏁 Build (Windows, MSVC, CMake)
cmake command is 'cmake -DCMAKE_BUILD_TYPE=Release -G"Visual Studio 16 2019" .' but the visual studio build command has this in it: '/p:Configuration=Debug' is this a bug? I'm unfamilar with msvc
I'm submitting this so that it doesnt get lost, and can be reviewed by someone familiar with msvc
Steps to reproduce
review the ci logs
Minimal reproduction project
Release build of godot-cpp using CMake and Visual Studio
The text was updated successfully, but these errors were encountered: