CL command does not work on the following batch file because build.bat
will stop by showing message "Hit any key to close this window..." before CL. (vcvarsall.bat uses exit /b
)
rem buid.bat
...\vcvarsall.bat x64
cl ...
USE &&
rem build.bat
...\vcvarsall.bat x64 && cl
Or CALL(https://technet.microsoft.com/en-us/library/bb490873.aspx)
Calls one batch program from another without stopping the parent batch program.
rem build.bat
CALL ...\vcvarsall.bat x64
cl ...