mirror of
https://github.com/boostorg/date_time.git
synced 2026-01-19 04:12:07 +00:00
fix mingw related build issues on appveyor
This commit is contained in:
45
appveyor.yml
45
appveyor.yml
@@ -1,5 +1,5 @@
|
||||
# Copyright 2016, 2017 Peter Dimov
|
||||
# Copyright (C) 2017 James E. King III
|
||||
# Copyright (C) 2017, 2018 James E. King III
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
@@ -28,43 +28,40 @@ environment:
|
||||
# B2_LINK: link=shared,static
|
||||
# B2_THREADING: threading=multi,single
|
||||
B2_VARIANT: variant=release,debug
|
||||
CXXSTD: 03
|
||||
|
||||
matrix:
|
||||
- COMMENT: Visual Studio Releases
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
||||
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0
|
||||
- COMMENT: Visual Studio 2015
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
TOOLSET: msvc-14.0
|
||||
B2_ADDRESS_MODEL: address-model=64,32
|
||||
- COMMENT: Visual Studio 2017
|
||||
- FLAVOR: Visual Studio 2017
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLSET: msvc-14.1
|
||||
B2_ADDRESS_MODEL: address-model=64,32
|
||||
- COMMENT: cygwin (32-bit)
|
||||
- FLAVOR: Visual Studio 2015
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
TOOLSET: msvc-14.0
|
||||
B2_ADDRESS_MODEL: address-model=64,32
|
||||
- FLAVOR: Visual Studio 2010, 2012, 2013
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
||||
TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0
|
||||
- FLAVOR: cygwin (32-bit)
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ADDPATH: C:\cygwin\bin;
|
||||
B2_ADDRESS_MODEL: address-model=32
|
||||
TOOLSET: gcc
|
||||
CXXSTD: cxxstd=03,11
|
||||
- COMMENT: cygwin (64-bit)
|
||||
- FLAVOR: cygwin (64-bit)
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ADDPATH: C:\cygwin64\bin;
|
||||
B2_ADDRESS_MODEL: address-model=64
|
||||
TOOLSET: gcc
|
||||
CXXSTD: cxxstd=03,11
|
||||
- COMMENT: mingw
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
||||
ADDPATH: C:\mingw\bin;
|
||||
- FLAVOR: mingw32
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARCH: i686
|
||||
B2_ADDRESS_MODEL: address-model=32
|
||||
TOOLSET: gcc
|
||||
CXXSTD: cxxstd=03,11
|
||||
- COMMENT: mingw-w64
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
||||
ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;
|
||||
SCRIPT: build\mingw.bat
|
||||
- FLAVOR: mingw64
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARCH: x86_64
|
||||
B2_ADDRESS_MODEL: address-model=64
|
||||
TOOLSET: gcc
|
||||
CXXSTD: cxxstd=03,11
|
||||
SCRIPT: build\mingw.bat
|
||||
|
||||
install:
|
||||
- set SELF=date_time
|
||||
@@ -84,4 +81,4 @@ build: off
|
||||
test_script:
|
||||
- set SELF=date_time
|
||||
- PATH=%ADDPATH%%PATH%
|
||||
- b2 libs/%SELF% toolset=%TOOLSET% %CXXFLAGS% %CXXSTD% %DEFINES% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3
|
||||
- IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF% toolset=%TOOLSET% cxxstd=%CXXSTD% %CXXFLAGS% %DEFINES% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
|
||||
|
||||
50
build/mingw.bat
Normal file
50
build/mingw.bat
Normal file
@@ -0,0 +1,50 @@
|
||||
::
|
||||
:: MinGW Build Script for Appveyor, leveraging the MSYS2 installation
|
||||
:: Copyright (C) 2018 James E. King III
|
||||
:: Distributed under the Boost Software License, Version 1.0.
|
||||
:: (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
::
|
||||
|
||||
@ECHO ON
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
:: Set up the toolset
|
||||
echo using gcc : %FLAVOR% : %ARCH%-w64-mingw32-g++.exe ; > %USERPROFILE%\user-config.jam
|
||||
SET UPPERFLAVOR=%FLAVOR%
|
||||
CALL :TOUPPER UPPERFLAVOR
|
||||
|
||||
:: Install packages needed to build boost
|
||||
:: Optional: comment out ones this library does not need,
|
||||
:: so people can copy this script to another library.
|
||||
|
||||
FOR %%a IN ("gcc" "icu" "libiconv" "openssl" "xz" "zlib") DO (
|
||||
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
|
||||
"pacman --sync --needed --noconfirm %FLAVOR%/mingw-w64-%ARCH%-%%a" || EXIT /B
|
||||
)
|
||||
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
|
||||
"pacman --sync --needed --noconfirm python3" || EXIT /B
|
||||
|
||||
::
|
||||
:: Now build things...
|
||||
::
|
||||
|
||||
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
|
||||
"cd %CD:\=/% && ./bootstrap.sh --with-toolset=gcc" || EXIT /B
|
||||
|
||||
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
|
||||
"cd %CD:\=/% && ./b2 libs/%SELF% toolset=gcc-%FLAVOR% cxxstd=%CXXSTD% %CXXFLAGS% %DEFINES% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3" || EXIT /B
|
||||
|
||||
EXIT /B 0
|
||||
|
||||
::
|
||||
:: Function to uppercase a variable
|
||||
:: from: https://stackoverflow.com/questions/34713621/batch-converting-variable-to-uppercase
|
||||
::
|
||||
|
||||
:TOUPPER <variable>
|
||||
@ECHO OFF
|
||||
FOR %%a IN ("a=A" "b=B" "c=C" "d=D" "e=E" "f=F" "g=G" "h=H" "i=I"
|
||||
"j=J" "k=K" "l=L" "m=M" "n=N" "o=O" "p=P" "q=Q" "r=R"
|
||||
"s=S" "t=T" "u=U" "v=V" "w=W" "x=X" "y=Y" "z=Z" ) DO ( CALL SET %~1=%%%~1:%%~a%% )
|
||||
@ECHO ON
|
||||
GOTO :EOF
|
||||
Reference in New Issue
Block a user