I have a CMake project that generates a Visual Studio solution that builds with MSBuild.
The command I am using to build the project is:
cmake --build Debug -- -v:diag
using the -- option causes the -v:diag option to be passed to MSBuild.
When run from a command prompt, everything is fine.
However, when run from within a powershell prompt, it breaks:
PS C:\proj> cmake --build Debug --verbose -- -v:diag
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1016: Specify the verbosity level.
Switch: -v:
For switch syntax, type "MSBuild -help"
Seems powershell is doing something to parse the arguments around the colon :.
How can I cause powershell to pass the argument string as-is to cmake?