Repository navigation
Generate only the preset's configuration in multi-config solutions - #169
Conversation
vcpkg installs dependencies for the preset's triplet only, so every other configuration in a multi-config VS/Xcode solution built silently against libraries of the original triplet's flavor, not the selected one. After this change, only the original flavor is exposed in the IDE.
728023c to
8de1267
Compare
There was a problem hiding this comment.
This looks good to me, and I think it’s a fine change to the CMake set up in light of how vcpkg behaves. The original CMake code comes from the time when we transitioned our one huge VS solution file over to CMake, and wanted to provide a similar experience with a VS solution file generated from that. Of course, given that vcpkg cannot install all carbon binaries in all build flavours at the same time, it makes sense that this now simply requires different VS solution files per build flavour.
The one thing that may be of note here, though, is that CMAKE_BUILD_TYPE now needs to be passed into the configuration phase, which is unusual when using a multi-config generator. The presets do this because vcpkg needs that, but as stated, it’s not “the usual” way.
Summary
vcpkg installs dependencies for the preset's triplet only, so every other configuration in a multi-config VS/Xcode solution built silently against libraries of the original triplet's flavor, not the selected one. After this change, only the original flavor is exposed in the IDE.
Linked issue (optional)
None, but fixes an open manhole that people keep falling into by accident
Testing
Generated solution in VS does not contain any other configs anymore; still builds against the correct libraries.
AI assistance
Lots, Claude.