Giter Site home page Giter Site logo

Comments (3)

Evelyn-001 avatar Evelyn-001 commented on June 3, 2024

@Croydon, could you please add property "configuration": "release" in buildPresets for release-shared/release-static configuration and verify your issue again? We find that select one of the release- targets and build it in Code, we could get a release build, please see the below video. Thanks.
ENV:
VS code version: 1.88.1
CMake Extension version: v 1.17.17
image

video0426

from vscode-cmake-tools.

Croydon avatar Croydon commented on June 3, 2024

Thank you @Evelyn-001!

Adding "configuration": "release" works for VS Code and continues to work for VS.

I am assuming that this difference between VS Code and VS is, that VS prefers the Ninja CMake generator which is single-configuration, while VS Code apparently(?) has no own preferences and uses whatever CMake itself prefers, which is the VS generator on Windows and the VS generator is a multi-generator. So specifying configuration again selects the desired one then.

It is still annoying that "CMAKE_BUILD_TYPE": "Release" from the configuration step is not respected automatically, but I am not sure which component would need to change for that. CMake itself, this extension here, ...?

from vscode-cmake-tools.

Evelyn-001 avatar Evelyn-001 commented on June 3, 2024

@Croydon, we are glad to be hearing your issue has been fixed. This is by design based on CMake upstream commandline. In multi-config scenarios one must define a Build Preset in which they define the configuration field. This matches the command-line cmake behavior where if you simply run cmake --build it will build the debug configuration, you must run cmake --build --config in order to build the correct configuration. This is done in VS by defining a build preset and defining configuration. please refer to this VS feedback ticket. Thanks for your support.

from vscode-cmake-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.