Closed timkpaine closed 3 months ago
What is the bug? What is PSP_GENERATOR
? How do I know not to revert this in the future?
PSP_GENERATOR
is the user-configureable override (similar to e.g. PSP_DEBUG
) for the cmake-generator used by the C++ build system. This doesn't matter too much on Mac and Linux, where you can likely use makefiles
or ninja
interchangeably, but on Windows you may want to override the default generator to be a certain version of Visual Studio for compatibility with python or other libraries. In the perspective codebase, we use this here and its also used in e.g. conda-forge or when building from source.
We have always hardcoded it in our CI, which is why we likely never saw the issue. It's also possible that we hardcoded it originally BECAUSE of this bug. Regardless, this fixes the Visual Studio detection logic so that by default we build against the same VS that your python built against (whereas before the bug caused it to always use the default because of the wrong key type)
This is a really minor bug, but causes some annoyance during our build process and is the reason we have to explicitly set
PSP_GENERATOR
in a few places.