THRIFT-4081: appveyor retooling - added mingw64 build as a second job to the CI build process
This closes #1205
diff --git a/build/appveyor/cl_setenv.bat b/build/appveyor/cl_setenv.bat
new file mode 100644
index 0000000..d907d5e
--- /dev/null
+++ b/build/appveyor/cl_setenv.bat
@@ -0,0 +1,79 @@
+::
+:: Licensed under the Apache License, Version 2.0 (the "License");
+:: you may not use this file except in compliance with the License.
+:: You may obtain a copy of the License at
+::
+:: http://www.apache.org/licenses/LICENSE-2.0
+::
+:: Unless required by applicable law or agreed to in writing, software
+:: distributed under the License is distributed on an "AS IS" BASIS,
+:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+:: See the License for the specific language governing permissions and
+:: limitations under the License.
+::
+
+ IF "%PROFILE%" == "MSVC2010" (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %PLATFORM%
+) ELSE IF "%PROFILE%" == "MSVC2012" (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" %PLATFORM%
+) ELSE IF "%PROFILE%" == "MSVC2013" (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
+) ELSE IF "%PROFILE%" == "MSVC2015" (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
+) ELSE IF "%PROFILE%" == "MSVC2017" (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\vcvarsall.bat" %PLATFORM%
+) ELSE IF "%PROFILE%" == "MINGW" (
+ SET MSYS2_PATH_TYPE=stock
+) ELSE IF "%PROFILE%" == "MSYS" (
+ SET MSYS2_PATH_TYPE=stock
+) ELSE (
+ ECHO Unsupported PROFILE=%PROFILE% or PLATFORM=%PLATFORM%
+ EXIT /B 1
+)
+
+CALL cl_setcompiler.bat || EXIT /B
+CALL cl_setgenerator.bat || EXIT /B
+
+SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor
+SET BUILDCACHE=%APPVEYOR_BUILD_FOLDER%\buildcache
+SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\local-thrift-build
+SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\local-thrift-inst
+SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
+
+SET BOOST_ROOT=C:\Libraries\boost_%BOOST_VERSION:.=_%
+SET BOOST_LIBRARYDIR=%BOOST_ROOT%\lib%PLATFORM:~-2,2%-msvc-%COMPILER:~-3,2%.0
+SET OPENSSL_ROOT=C:\OpenSSL-Win%PLATFORM:~-2,2%
+SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty
+IF "%PYTHON_VERSION%" == "" (
+ SET WITH_PYTHON=OFF
+) ELSE (
+ SET WITH_PYTHON=ON
+ SET PATH=C:\Python%PYTHON_VERSION:.=%\scripts;C:\Python%PYTHON_VERSION:.=%;!PATH!
+)
+IF "%CONFIGURATION%" == "Debug" (SET ZLIB_STATIC_SUFFIX=d)
+
+IF NOT "%QT_VERSION%" == "" (
+ IF /i "%PLATFORM%" == "x64" SET QTEXT=_64
+ SET PATH=C:\Qt\%QT_VERSION%\%PROFILE%!QTEXT!\bin;!PATH!
+)
+
+IF NOT "%PROFILE:~0,4%" == "MSVC" (
+
+ SET BASH=C:\msys64\usr\bin\bash.exe
+ SET BOOST_ROOT=
+ SET BOOST_INCLUDEDIR=/mingw64/include
+ SET BOOST_LIBRARYDIR=/mingw64/lib
+ SET OPENSSL_LIBRARIES=/mingw64/lib
+ SET OPENSSL_ROOT=/mingw64
+ SET WIN3P=
+
+ !BASH! -lc "sed -i '/export PATH=\/mingw64\/bin/d' ~/.bash_profile && echo 'export PATH=/mingw64/bin:$PATH' >> ~/.bash_profile" || EXIT /B
+
+)
+
+SET BUILDDIR_MSYS=%BUILDDIR:\=/%
+SET BUILDDIR_MSYS=/c%BUILDDIR_MSYS:~2%
+SET INSTDIR_MSYS=%INSTDIR:\=/%
+SET INSTDIR_MSYS=/c%INSTDIR_MSYS:~2%
+SET SRCDIR_MSYS=%SRCDIR:\=/%
+SET SRCDIR_MSYS=/c%SRCDIR_MSYS:~2%