Skip to content

Commit

Permalink
updated build scripts for VS2015
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Jul 30, 2015
1 parent b6ae512 commit 92e993c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
2 changes: 2 additions & 0 deletions build_vs140.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
buildwin 140 build shared both Win32 samples tests devenv
19 changes: 15 additions & 4 deletions buildwin.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rem
rem Usage:
rem ------
rem buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL]
rem VS_VERSION: 90|100|110|120
rem VS_VERSION: 90|100|110|120|140
rem ACTION: build|rebuild|clean
rem LINKMODE: static_mt|static_md|shared|all
rem CONFIGURATION: release|debug|both
Expand All @@ -39,7 +39,7 @@ set LIB=%LIB%;%MYSQL_LIB%
set POCO_BASE=%CD%
set PATH=%POCO_BASE%\bin64;%POCO_BASE%\bin;%PATH%

rem VS_VERSION {90 | 100 | 110 | 120}
rem VS_VERSION {90 | 100 | 110 | 120 | 140}
if "%1"=="" goto usage
set VS_VERSION=vs%1
set VS_64_BIT_ENV=VC\bin\x86_amd64\vcvarsx86_amd64.bat
Expand Down Expand Up @@ -80,7 +80,14 @@ if not defined VCINSTALLDIR (
) else (
call "%VS120COMNTOOLS%vsvars32.bat
)
)
) else (
if %VS_VERSION%==vs140 (
if %PLATFORM%==x64 (
call "%VS140COMNTOOLS%..\..\%VS_64_BIT_ENV%"
) else (
call "%VS140COMNTOOLS%vsvars32.bat
)
)
)
)
)
Expand All @@ -97,6 +104,7 @@ set VCPROJ_EXT=vcproj
if %VS_VERSION%==vs100 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs110 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs120 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs140 (set VCPROJ_EXT=vcxproj)

if "%8"=="" goto use_devenv
set BUILD_TOOL=%8
Expand All @@ -106,6 +114,7 @@ set BUILD_TOOL=devenv
if "%VS_VERSION%"=="vs100" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs110" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs120" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs140" (set BUILD_TOOL=msbuild)
:use_custom
if not "%BUILD_TOOL%"=="msbuild" (set USEENV=/useenv)
if "%BUILD_TOOL%"=="msbuild" (
Expand All @@ -120,6 +129,7 @@ if not "%BUILD_TOOL%"=="msbuild" (
if "%VS_VERSION%"=="vs100" (goto msbuildok)
if "%VS_VERSION%"=="vs110" (goto msbuildok)
if "%VS_VERSION%"=="vs120" (goto msbuildok)
if "%VS_VERSION%"=="vs140" (goto msbuildok)
if "%BUILD_TOOL%"=="msbuild" (
echo "Cannot use msbuild with Visual Studio 2008 or earlier."
exit /b 2
Expand Down Expand Up @@ -162,6 +172,7 @@ set PLATFORMSW=/p:Platform=%WEC2013_PLATFORM%
set USEENV=
if %VS_VERSION%==vs110 (set EXTRASW=/m /p:VisualStudioVersion=11.0)
if %VS_VERSION%==vs120 (set EXTRASW=/m /p:VisualStudioVersion=12.0)
if %VS_VERSION%==vs140 (set EXTRASW=/m /p:VisualStudioVersion=14.0)
)

rem SAMPLES [samples|nosamples]
Expand Down Expand Up @@ -499,7 +510,7 @@ exit /b 1
echo Usage:
echo ------
echo buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL]
echo VS_VERSION: "90|100|110|120"
echo VS_VERSION: "90|100|110|120|140"
echo ACTION: "build|rebuild|clean"
echo LINKMODE: "static_mt|static_md|shared|all"
echo CONFIGURATION: "release|debug|both"
Expand Down
9 changes: 5 additions & 4 deletions buildwin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Usage:
# ------
# buildwin.ps1 [-poco_base dir]
# [-vs_version 120 | 110 | 100 | 90]
# [-vs_version 140 | 120 | 110 | 100 | 90]
# [-action build | rebuild | clean]
# [-linkmode shared | static_mt | static_md | all]
# [-config release | debug | both]
Expand All @@ -23,7 +23,7 @@ Param
[string] $poco_base,

[Parameter()]
[ValidateSet(90, 100, 110, 120)]
[ValidateSet(90, 100, 110, 120, 140)]
[int] $vs_version,

[Parameter()]
Expand Down Expand Up @@ -78,7 +78,8 @@ function Set-Environment

if ($vs_version -eq 0)
{
if ($Env:VS120COMNTOOLS -ne '') { $script:vs_version = 120 }
if ($Env:VS140COMNTOOLS -ne '') { $script:vs_version = 140 }
elseif ($Env:VS120COMNTOOLS -ne '') { $script:vs_version = 120 }
elseif ($Env:VS110COMNTOOLS -ne '') { $script:vs_version = 110 }
elseif ($Env:VS100COMNTOOLS -ne '') { $script:vs_version = 100 }
elseif ($Env:VS90COMNTOOLS -ne '') { $script:vs_version = 90 }
Expand Down Expand Up @@ -144,7 +145,7 @@ function Process-Input
Write-Host 'Usage:'
Write-Host '------'
Write-Host 'buildwin.ps1 [-poco_base dir]'
Write-Host ' [-vs_version 120 | 110 | 100 | 90]'
Write-Host ' [-vs_version 140 | 120 | 110 | 100 | 90]'
Write-Host ' [-action build | rebuild | clean]'
Write-Host ' [-linkmode shared | static_mt | static_md | all]'
Write-Host ' [-config release | debug | both]'
Expand Down

0 comments on commit 92e993c

Please sign in to comment.