open vs console then run command in it
store command in bat file, this is not pwsh
generate nmake
cmd /D /K "Call "C:\Program Files (x86)\Microsoft Visual Studio\xxxx\Community\VC\Auxiliary\Build\vcvars64.bat" && cmake \abs\path\to\build -DCMAKE_BUILD_TYPE=Debug -G "NMake Makefiles" && exit"
build nmake
cd \abs\path\to\build && cmd /D /K "Call "C:\Program Files (x86)\Microsoft Visual Studio\xxxx\Community\VC\Auxiliary\Build\vcvars64.bat" && nmake /nologo -f Makefile && exit"
标签:bat,nmake,auto,Call,build,&&,Build
From: https://www.cnblogs.com/Searchor/p/17191331.html