Comments (3)
@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
from vscode-cmake-tools.
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.
@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)
- cmakeuserpresets.json not read by vscode-cmake-tools? HOT 5
- There was an error running ctest to determine available test executables
- YAMLException on configure HOT 7
- sysroot arg isn't being passed properly
- usepresets context is not set after using quickstart HOT 4
- Investigate passing multiple workspace browse configurations (1 for each target+fileGroup combo) to C/C++ extension HOT 4
- After clicking Run Tests an error is reported HOT 1
- FR: Make it easier to setup a launch configuration with CMake Tools HOT 3
- Configure raises an error if CTest scripts print to stdout HOT 6
- presets: setting cmake.buildToolArgs in configuration leads to build failures HOT 3
- FR: support the terminal.integrated.automationProfile.* when launch target without debug
- The test process will remain loaded after clicking “Debug Tests” HOT 3
- Annoying unnecessary logging related to expanding strings that don't require expansion
- Doubling of cpack arguments via package preset
- Need to clean-configure when running workflow with workflow-configure-preset different than project-configure-preset
- Fix UI issues in the CMake left panel related to package preset override of settings
- Improve CMakeLists.txt support - auto formatting and auto add to CMakeLists.txt when adding files HOT 1
- Selecting CMake Tools as configuration provider has error squiggles for all standard library includes HOT 3
- IntelliSense picks up wrong include path and shows false-positive error squiggles HOT 3
- Intellisense Suddenly Stopped Working For Standard Headers & Included Directories HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-cmake-tools.