Skip to content

Instantly share code, notes, and snippets.

@killerswan
Created March 18, 2016 02:14
Show Gist options
  • Save killerswan/be00aee5ed2f53cead84 to your computer and use it in GitHub Desktop.
Save killerswan/be00aee5ed2f53cead84 to your computer and use it in GitHub Desktop.
specify sub-projects to build in a solution
setlocal
@echo on
set here=%~dp0
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat"
pushd %here%\vsprojects-2010
msbuild protobuf.sln /target:libprotobuf-lite:Rebuild /p:Platform=x64;Configuration=Debug || goto :error
msbuild protobuf.sln /target:libprotobuf-lite:Rebuild /p:Platform=Win32;Configuration=Debug || goto :error
msbuild protobuf.sln /target:libprotobuf-lite:Rebuild /p:Platform=x64;Configuration=Release || goto :error
msbuild protobuf.sln /target:libprotobuf-lite:Rebuild /p:Platform=Win32;Configuration=Release || goto :error
popd
echo OK
endlocal
goto :EOF
:error
set err=%errorlevel%
echo Failed with errorlevel %err%.
endlocal
exit /b %err%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment