for /F %%i in ('cd') do ( set dir=%%i) rmdir /s /q build mkdir build cmake -B build -G "NMake Makefiles" && cd ./build && nmake cd %dir%