[geos-commits] r4249 - trunk

Mateusz Loskot mateusz at loskot.net
Wed Aug 24 01:57:47 PDT 2016


Author: mloskot
Date: 2016-08-24 01:57:47 -0700 (Wed, 24 Aug 2016)
New Revision: 4249

Added:
   trunk/build.bat
Log:
Add convenient build.bat for Visual Studio and CMake users:
* Runs CMake to configure 32-bit or 64-bit build with the latest release of Visual Studio.
* Runs MSBuild to build the generated solution.

Added: trunk/build.bat
===================================================================
--- trunk/build.bat	                        (rev 0)
+++ trunk/build.bat	2016-08-24 08:57:47 UTC (rev 4249)
@@ -0,0 +1,53 @@
+ at echo off
+rem Runs CMake to configure for Visual Studio 2015.
+rem Runs MSBuild to build the generated solution.
+rem
+rem Usage:
+rem 1. Copy build.bat to build.locale.bat (git ignored file)
+rem 2. Make your adjustments in the CONFIGURATION section below
+rem 3. Run build.local.bat 32|64
+rem 4. Optionally, run devenv.exe GEOS{32|64}.sln
+
+rem ### CONFIGURATION #####################################
+rem #######################################################
+
+if not defined VS140COMNTOOLS goto :NoVS
+if [%1]==[] goto :Usage
+if [%1]==[32] goto :32
+if [%1]==[64] goto :64
+goto :Usage
+
+:32
+set BUILDP=32
+set MSBUILDP=Win32
+set GENERATOR="Visual Studio 14 2015"
+goto :Build
+
+:64
+set BUILDP=64
+set MSBUILDP=x64
+set GENERATOR="Visual Studio 14 2015 Win64"
+goto :Build
+
+:Build
+set BUILDDIR=_build%BUILDP%
+mkdir %BUILDDIR%
+pushd %BUILDDIR%
+"C:\Program Files\CMake\bin\cmake.exe" ^
+    -G %GENERATOR% ^
+    ..
+move GEOS.sln GEOS%BUILDP%.sln
+msbuild.exe GEOS%BUILDP%.sln /p:Configuration=Release /p:Platform=%MSBUILDP%
+popd
+goto :EOF
+
+:NoVS
+ at echo build.bat
+ at echo  Visual Studio 2015 not found
+ at echo  "%%VS140COMNTOOLS%%" environment variable not defined
+exit /B 1
+
+:Usage
+ at echo build.bat
+ at echo Usage: build.bat [32 or 64]
+exit /B 1



More information about the geos-commits mailing list