Active build configuration warning
See original GitHub issueWith current CMT code base, any project gets a warning from CppTools about. This is with presets on, but even if the currently selected configure preset does define CMAKE_BUILD_TYPE.
The build configurations generated do not contain the active build configuration. Using 'Debug' for CMAKE_BUILD_TYPE instead of 'null' to ensure that IntelliSense configurations can be found.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:11 (5 by maintainers)
Top Results From Across the Web
What is the meaning of "Active build Configuration" - TI E2E
Briefly - a build configuration defines a set a build options at the project level. It is useful if you need to switch...
Read more >Understand build configurations - Visual Studio (Windows)
Learn how you need build configurations when you need to build your projects with different settings in Visual Studio.
Read more >CMAKE_BUILD_TYPE is not being used in CMakeLists.txt
This will print to the standard error every access to this variable. And to get it to log file, do something like: cmake...
Read more >Solved: Always get "Errors exist in the active configurati...
Always get "Errors exist in the active configuration" message when I debug ... Deleting the current build folder (i.e., "Debug") resolved the issue...
Read more >From Cake to Nuke - Files in use and Visual Studio Active ...
Now that this change has been made, if you try to run a nuke build, it will raise a warning that there is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I meet same issue on ubuntu/gcc, in my case, the problem is caused by 2 line in CMakeLists.txt which defined different BUILD_TYPE again.
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS “-std=c++14 -O3 -DMINIGLOG=ON”),
vscode worked as expected after comment those two lines
I am running into the same or a very similar error. Using Ubuntu with gcc, the CMake project uses a toolchain generated by Conan. I also am using CMake presets.
I install two configurations (Debug and Release) with Conan, the
CMakePresets.jsongenerated by Conan has two configurations:I’ve noticed that the cpptools warning always occurs when switching to a configuration that has not been built last. E.g. I configure “Debug”, build “Debug”, switch to “Release”, then it would show
If I then build in Release mode and switch the config back to “Debug”, it shows
Output of CMake: Log Diagnostics:
I think the problem lies in
The cpptools extension only seems to see the last-built build type but the active build type can be different.