THRIFT-4166: fix recent VC2010 build regression and prevent it in the future
Client: cpp
This closes #1237
diff --git a/build/appveyor/cl_setenv.bat b/build/appveyor/cl_setenv.bat
index d907d5e..c1b956c 100644
--- a/build/appveyor/cl_setenv.bat
+++ b/build/appveyor/cl_setenv.bat
@@ -40,17 +40,29 @@
SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\local-thrift-inst
SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
+: PLATFORM is x64 or x86, but we want x86 to become "32" when we strip it down for paths:
+SET NORM_PLATFORM=%PLATFORM:~-2,2%
+IF "%NORM_PLATFORM%" == "86" (SET NORM_PLATFORM=32)
+
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 BOOST_LIBRARYDIR=%BOOST_ROOT%\lib%NORM_PLATFORM%-msvc-%COMPILER:~-3,2%.0
+SET OPENSSL_ROOT=C:\OpenSSL-Win%NORM_PLATFORM%
SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty
+
+:: MSVC2010 doesn't "do" std::thread
+IF "%COMPILER%" == "vc100" (
+ SET THREADMODEL=BOOST
+) ELSE (
+ SET THREADMODEL=STD
+)
+
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 "%CONFIGURATION%" == "Debug" (SET ZLIB_LIB_SUFFIX=d)
IF NOT "%QT_VERSION%" == "" (
IF /i "%PLATFORM%" == "x64" SET QTEXT=_64