This is a classic double-shielding case where both bash and CMD.EXE should be instructed to ignore special | (pipe).
Try the following:
$command $args "qt.sln" /BUILD '"Debug|Win32"'
This will be equivalent to how you type in the CMD.EXE prompt:
qtvars.bat vsstart qt.sln /BUILD "Debug|Win32"
Using the above, you are essentially forcing double quotes to be sent to CMD.EXE (you select them instead of bash.) The most distant single quotes instruct bash not to interpret or touch in any way what is inside them; internal double quotes instruct CMD.EXE to ignore any special characters (in this case, in this case).
Alternatively, you can also try:
$command $args "qt.sln" /BUILD 'Debug\|Win32'
This should be equivalent to how you type in the CMD.EXE prompt:
qtvars.bat vsstart qt.sln /BUILD Debug\|Win32
Note the use of single quotes (!), Which ensure that bash will not interpret \ (and will instead pass it as is to CMD.EXE.)
vladr
source share