Suggestion: Compile Instructions guide step to disable CMakePresets if not already done
#16,424 opened on 2023年2月17日
説明
Describe the bug
Not a bug but more of a small suggestion for the compile instructions guide to make things easier for less experienced developers. While following the compile instructions I ran into an issue at step 2.1 'Standard Build' where I was expecting CMake to generate a msvc.build_x64 folder in the checkout directory but this was not being generated. I eventually figured out that because I have a recent fresh install of Visual Studio I had a CMake option enabled which automatically generates a CMakePresets.json file which was causing VS to ignore the CMakeSettings.json file.
I think it would be helpful for those not so familiar with CMake to mention that this might happen and suggest to check CMake settings in VS. Something small like 'In the event that msvc.build_x64 is not generating in the checkout directory (root), be sure to check that Visual Studio is correctly picking up the x64-RelWithDebInfo configuration and not one of the default Visual Studio configurations'.
To Reproduce
Steps to reproduce the behavior:
- Open Visual Studio
- Click on tools
- Click on options
- Click on CMake in the dropdown menu on the left
- Click on General
- Under 'CMake configuration file' select 'Always use CMake Presets'
- Follow the Compile Instructions from the beginning under the assumption that there is no existing knowledge of this setting. (I believe it is the default in Visual Studio).
Expected behavior
I think this is probably pretty obvious for more experienced developers but as a newbie to C++ build tools, I was expecting to follow the Compile Instructions guide and for the msvc.build_x64 folder to get generated without having to change any settings in Visual Studio itself. Simple enough to solve but it might save someone else a bit of time.
Screenshots
With the following setting selected:
Visual Studio generates a file called 'CMakePresets.json' and will try to build for the default VS x64Debug or another default option:
Changing the setting to 'Never use CMake Presets ':
Now the correct build configuration is selected and CMake will correctly generate the msvc.build_x64 folder.

Platform information
- OS: Windows 11
Additional context Visual Studio 17 2022