Skip to content

Instantly share code, notes, and snippets.

@apathyboy
Created March 1, 2011 12:45
Show Gist options
  • Select an option

  • Save apathyboy/849070 to your computer and use it in GitHub Desktop.

Select an option

Save apathyboy/849070 to your computer and use it in GitHub Desktop.
@echo off
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: build_server.bat
::
:: Build's the project and produces a directory of all necesary executables and
:: dll's needed to run an instance of the server.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: initialize build variables
set "PROJECT_BASE=%~dp0"
set "PROJECT_DRIVE=%~d0"
:: create a build directory to perform all the work in (leaving the source dir
:: clean) if none exists, then change directories to the new build directory
if not exist "%PROJECT_BASE%\build" (
cmake -E make_directory "%PROJECT_BASE%\build"
)
cd "%PROJECT_BASE%\build"
:: run cmake to generate the default project settings
cmake -G "Visual Studio 10" -DENABLE_TEST_REPORT=ON ..
:: build the generated cmake environment
cmake --build .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment