From 03af4b3dd448c4ddfefe6d35e8b30892920522a8 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 17 Feb 2016 13:44:33 +0100 Subject: [PATCH] Appveyor: add compiler setup script. --- appveyor.yml | 16 +++++++++--- scripts/appveyor/compiler_setup.bat | 40 +++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 scripts/appveyor/compiler_setup.bat diff --git a/appveyor.yml b/appveyor.yml index 6b1410b69..b72708d41 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,11 +17,21 @@ os: - Visual Studio 2010 - Visual Studio 2015 -configuration: Release +configuration: + - 2015 + - 2013 + - 2012 + #- MinGW + - 2010 # only works for x86 -build: +init: +- if "%platform%" EQU "x64" ( for %%a in (2008 2010 MinGW) do ( if "%Configuration%"=="%%a" (echo "Skipping unsupported configuration" && exit /b 1 ) ) ) + +install: +# Make compiler command line tools available +- call appveyor\compiler_setup.bat build_script: - cd c:\projects\assimp - - cmake CMakeLists.txt -G "Visual Studio 11" + - cmake CMakeLists.txt -G "Visual Studio %Configuration%" - msbuild /m /p:Configuration=Release /p:Platform="Win32" Assimp.sln diff --git a/scripts/appveyor/compiler_setup.bat b/scripts/appveyor/compiler_setup.bat new file mode 100644 index 000000000..7e8462ec5 --- /dev/null +++ b/scripts/appveyor/compiler_setup.bat @@ -0,0 +1,40 @@ +@echo off + +:: Now we declare a scope +Setlocal EnableDelayedExpansion EnableExtensions + +if not defined Configuration set Configuration=2015 + +if "%Configuration%"=="MinGW" ( goto :mingw ) + +set arch=x86 + +if "%platform%" EQU "x64" ( set arch=x86_amd64 ) + +if "%Configuration%"=="2015" ( + set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" +) + +if "%Configuration%"=="2013" ( + set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" +) + +if "%Configuration%"=="2012" ( + set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" +) + +if "%Configuration%"=="2010" ( + set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" +) + +if "%Configuration%"=="2008" ( + set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" +) + +:: Visual Studio detected +endlocal & call %SET_VS_ENV% %arch% +goto :eof + +:: MinGW detected +:mingw +endlocal & set PATH=c:\mingw\bin;%PATH%