Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-2726

Do not override CMAKE_BUILD_TYPE for multi-config generators

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.8.1
    • Affects Version/s: None
    • Component/s: None
    • None

      Scope

      • Do not override CMAKE_BUILD_TYPE for multi-config generators
      • Document use of --config in Windows installation instructions to choose a build configuration.

      Background

      Configuring on Windows without specifying CMAKE_BUILD_TYPE results in this log output from CMake:

      -- No build type selected, default is Release
      

      The log message is printed when overriding CMAKE_BUILD_TYPE. Overriding CMAKE_BUILD_TYPE is ignored for multi-configuration generators:

      For multi-configuration generators like Visual Studio, Xcode, and Ninja Multi-Config, the configuration is chosen by the user at build time and CMAKE_BUILD_TYPE is ignored.

      This may mislead users to think the build is Release, when it may be Debug. This may result in confusing runtime errors if mixing Debug and Release builds in an application.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: