Skip to content

Possible bug with CMake and visual studio release type #1582

Closed

Description

@enetheru

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

Activity

  1. added
    bug
    topic:buildsystem
    on Sep 18, 2024
  2. enetheru commented on Sep 21, 2024

    @enetheru
    CollaboratorAuthor

    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
  3. added 2 commits that reference this issue on Sep 21, 2024
    47c2d27
    07704f8
  4. dsnopek commented on Sep 26, 2024

    @dsnopek
    Collaborator

    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.

  5. added a commit that references this issue on Sep 26, 2024
    96565e1
  6. enetheru commented on Sep 27, 2024

    @enetheru
    CollaboratorAuthor
  7. dsnopek commented on Sep 27, 2024

    @dsnopek
    Collaborator

    I guess there's your build instructions in PR #1595?

  8. enetheru commented on Sep 28, 2024

    @enetheru
    CollaboratorAuthor
  9. added 2 commits that reference this issue on Oct 28, 2024
    5e7d247
    a3d5d6d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcmaketopic:buildsystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions