summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2016-08-10 14:05:46 -0400
committerAllen Winter <allen.winter@kdab.com>2016-08-10 14:05:46 -0400
commit39e4c08c3e32ec2563e8bbd7f9097b8539c62b61 (patch)
treef36fd3baa1a13c78110da4e8182796206a20855d
parent56824f8b08550c15c67b38b40ef97dc674fc5b78 (diff)
downloadlibical-git-39e4c08c3e32ec2563e8bbd7f9097b8539c62b61.tar.gz
appveyor.yml - add configurations
-rw-r--r--appveyor.yml11
-rw-r--r--scripts/set_compiler_env.bat40
2 files changed, 47 insertions, 4 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 0af1f6aa..99f8928a 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -36,14 +36,17 @@ platform:
# build Configuration, i.e. Debug, Release, etc.
configuration:
- - Debug
- - Release
+ - 2015
+ - 2013
+ - 2012
+ - MinGW
+#todo: 2010, 2008
build_script:
- - call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
+ - call scripts\set_compiler_env.bat
- mkdir build
- cd build
- - cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DICAL_GLIB=False -DUSE_INTEROPERABLE_VTIMEZONES=true ..
+ - cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DICAL_GLIB=False -DUSE_INTEROPERABLE_VTIMEZONES=true ..
- nmake
# to disable automatic builds
diff --git a/scripts/set_compiler_env.bat b/scripts/set_compiler_env.bat
new file mode 100644
index 00000000..7e8462ec
--- /dev/null
+++ b/scripts/set_compiler_env.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%