microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.48k stars 456 forks source link

Allow CMake to select a default internal generator when the user selects "__unspec__" for the kit #3889

Closed snehara99 closed 4 months ago

snehara99 commented 4 months ago

This change addresses item #3405

CMake file api supports not passing in a generator in versions >= 3.15.0. I added a check for that version and using the file api in order to not pass in Ninja as a preferred generator when the user selects "unspec" as a kit and doesn't define any generator/preferredGenerators.

snehara99 commented 4 months ago

Overall this looks good, assuming we confirm with testing that it works as expected and our tests pass, and I have one comment that needs addressing.

I've tested it a decent amount. I think it should be fine