Merge pull request #2557 from Naratzul/ci_vs2019_support

Add Visual Studio 2019 support
pull/2567/head
Bret Curtis 5 years ago committed by GitHub
commit 675a79d0dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -103,7 +103,7 @@ Options:
Build unit tests / Google test
-u
Configure for unity builds.
-v <2013/2015/2017>
-v <2013/2015/2017/2019>
Choose the Visual Studio version to use.
-n
Produce NMake makefiles instead of a Visual Studio solution.
@ -251,6 +251,18 @@ if [ -z $VS_VERSION ]; then
fi
case $VS_VERSION in
16|16.0|2019 )
GENERATOR="Visual Studio 16 2019"
TOOLSET="vc142"
MSVC_REAL_VER="16"
MSVC_VER="14.2"
MSVC_YEAR="2015"
MSVC_DISPLAY_YEAR="2019"
BOOST_VER="1.71.0"
BOOST_VER_URL="1_71_0"
BOOST_VER_SDK="107100"
;;
15|15.0|2017 )
GENERATOR="Visual Studio 15 2017"
TOOLSET="vc141"
@ -258,6 +270,9 @@ case $VS_VERSION in
MSVC_VER="14.1"
MSVC_YEAR="2015"
MSVC_DISPLAY_YEAR="2017"
BOOST_VER="1.67.0"
BOOST_VER_URL="1_67_0"
BOOST_VER_SDK="106700"
;;
14|14.0|2015 )
@ -267,6 +282,9 @@ case $VS_VERSION in
MSVC_VER="14.0"
MSVC_YEAR="2015"
MSVC_DISPLAY_YEAR="2015"
BOOST_VER="1.67.0"
BOOST_VER_URL="1_67_0"
BOOST_VER_SDK="106700"
;;
12|12.0|2013 )
@ -276,6 +294,9 @@ case $VS_VERSION in
MSVC_VER="12.0"
MSVC_YEAR="2013"
MSVC_DISPLAY_YEAR="2013"
BOOST_VER="1.58.0"
BOOST_VER_URL="1_58_0"
BOOST_VER_SDK="105800"
;;
esac
@ -315,7 +336,7 @@ case $CONFIGURATION in
;;
esac
if [ ${BITS} -eq 64 ]; then
if [ $BITS -eq 64 ] && [ $MSVC_REAL_VER -lt 16 ]; then
GENERATOR="${GENERATOR} Win64"
fi
@ -323,7 +344,15 @@ if [ -n "$NMAKE" ]; then
GENERATOR="NMake Makefiles"
fi
add_cmake_opts "-G\"$GENERATOR\""
if [ $MSVC_REAL_VER -ge 16 ]; then
if [ $BITS -eq 64 ]; then
add_cmake_opts "-G\"$GENERATOR\" -A x64"
else
add_cmake_opts "-G\"$GENERATOR\" -A Win32"
fi
else
add_cmake_opts "-G\"$GENERATOR\""
fi
if [ -n "$NMAKE" ]; then
add_cmake_opts "-DCMAKE_BUILD_TYPE=${BUILD_CONFIG}"
@ -351,9 +380,9 @@ if [ -z $SKIP_DOWNLOAD ]; then
# Boost
if [ -z $APPVEYOR ]; then
download "Boost 1.67.0" \
"https://sourceforge.net/projects/boost/files/boost-binaries/1.67.0/boost_1_67_0-msvc-${MSVC_VER}-${BITS}.exe" \
"boost-1.67.0-msvc${MSVC_VER}-win${BITS}.exe"
download "Boost ${BOOST_VER}" \
"https://sourceforge.net/projects/boost/files/boost-binaries/${BOOST_VER}/boost_${BOOST_VER_URL}-msvc-${MSVC_VER}-${BITS}.exe" \
"boost-${BOOST_VER}-msvc${MSVC_VER}-win${BITS}.exe"
fi
# Bullet
@ -444,13 +473,9 @@ echo
# Boost
if [ -z $APPVEYOR ]; then
printf "Boost 1.67.0... "
printf "Boost ${BOOST_VER}... "
else
if [ "${MSVC_VER}" -eq 12.0 ]; then
printf "Boost 1.58.0 AppVeyor... "
else
printf "Boost 1.67.0 AppVeyor... "
fi
printf "Boost ${BOOST_VER} AppVeyor... "
fi
{
if [ -z $APPVEYOR ]; then
@ -468,13 +493,13 @@ fi
exit 1;
fi
if [ -d ${BOOST_SDK} ] && grep "BOOST_VERSION 106700" Boost/boost/version.hpp > /dev/null; then
if [ -d ${BOOST_SDK} ] && grep "BOOST_VERSION ${BOOST_VER_SDK}" Boost/boost/version.hpp > /dev/null; then
printf "Exists. "
elif [ -z $SKIP_EXTRACT ]; then
rm -rf Boost
CI_EXTRA_INNO_OPTIONS=""
[ -n "$CI" ] && CI_EXTRA_INNO_OPTIONS="//SUPPRESSMSGBOXES //LOG='boost_install.log'"
"${DEPS}/boost-1.67.0-msvc${MSVC_VER}-win${BITS}.exe" //DIR="${CWD_DRIVE_ROOT}" //VERYSILENT //NORESTART ${CI_EXTRA_INNO_OPTIONS}
"${DEPS}/boost-${BOOST_VER}-msvc${MSVC_VER}-win${BITS}.exe" //DIR="${CWD_DRIVE_ROOT}" //VERYSILENT //NORESTART ${CI_EXTRA_INNO_OPTIONS}
mv "${CWD_DRIVE_ROOT_BASH}" "${BOOST_SDK}"
fi
add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \
@ -483,11 +508,8 @@ fi
echo Done.
else
# Appveyor unstable has all the boost we need already
if [ $MSVC_REAL_VER -eq 12 ]; then
BOOST_SDK="c:/Libraries/boost_1_58_0"
else
BOOST_SDK="c:/Libraries/boost_1_67_0"
fi
BOOST_SDK="c:/Libraries/boost_${BOOST_VER_URL}"
if [ $MSVC_REAL_VER -eq 15 ]; then
LIB_SUFFIX="1"
else

Loading…
Cancel
Save