VS: .NET SDK Style Project Improvements
I want to provide some patches for various issues which came up during the usage of the new Visual Studio .NET SDK style project generator.
The first commit adds the ability to change the output directory for binaries. This was not possible with the original code.
The second commit enables CMake to build mixed architecture projects.
Here the use case is a build command to a multi project solution (with mixed C/C++ x86 build targets and new .NET SDK projects with Any CPU
):
cmake -S C:\pathToProject -A Win32
The solution has a Win32 target which maps to Any CPU for .NET SDK projects after generation. All fine until it comes to build call:
cmake --build C:\pathToGeneratedProjectDirectory --config Debug --target projectName -- -verbosity:minimal
This targets the Debug configuration, but it uses the default Win32 platform specifier. Result is that the build command tries to build the .NET SDK project with Debug|Win32
.
My patch extends the Visual Studio solution parser and uses its mapping information to select the correct platform specifier Any CPU
.
Backport: release