diff --git a/README.md b/README.md index 36f3ff5..917a625 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,25 @@ Branch | Travis | Appveyor | Coverity Scan | codecov.io | Documentation [master](https://github.com/boostorg/uuid/tree/master) | [![Build Status](https://travis-ci.org/boostorg/uuid.svg?branch=master)](https://travis-ci.org/boostorg/uuid) | [![Build status](https://ci.appveyor.com/api/projects/status/nuihr6s92fjb9gwy/branch/master?svg=true)](https://ci.appveyor.com/project/boostorg/uuid/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/13982/badge.svg)](https://scan.coverity.com/projects/boostorg-uuid) | [![codecov](https://codecov.io/gh/boostorg/uuid/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/uuid/branch/master) | [![Documentation](https://img.shields.io/badge/documentation-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/libs/uuid/doc/index.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/uuid.html) [develop](https://github.com/boostorg/uuid/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/uuid.svg?branch=develop)](https://travis-ci.org/boostorg/uuid) | [![Build status](https://ci.appveyor.com/api/projects/status/nuihr6s92fjb9gwy/branch/develop?svg=true)](https://ci.appveyor.com/project/boostorg/uuid/branch/develop) | | [![codecov](https://codecov.io/gh/boostorg/uuid/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/uuid/branch/develop) | [![Documentation](https://img.shields.io/badge/documentation-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/libs/uuid/doc/index.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/uuid.html) +### Dependencies + +Boost.Uuid depends on the following Boost libraries: + +* assert +* config +* core +* io +* numeric +* predef +* random +* serialization +* smart_ptr +* static_assert +* throw_exception +* tti +* type_traits +* uuid +* winapi ### Directories diff --git a/appveyor.yml b/appveyor.yml index d3cf476..597321d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ # Copyright 2016, 2017 Peter Dimov -# Copyright 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) @@ -25,35 +25,54 @@ environment: # to use the default for a given environment, comment it out; recommend you build debug and release however.. # on Windows it is important to exercise all the possibilities, especially shared vs static # B2_ADDRESS_MODEL: address-model=64,32 - B2_LINK: link=shared,static - B2_THREADING: threading=multi,single + # B2_LINK: link=shared,static + # B2_THREADING: threading=multi,single B2_VARIANT: variant=release,debug - CXXSTD: 03,11 + CXXSTD: 03 matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + - FLAVOR: Visual Studio 2017 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + TOOLSET: msvc-14.1 + B2_ADDRESS_MODEL: address-model=64,32 + - 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 - COMMENT: "Visual Studio 2010/2012/2013" - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - TOOLSET: msvc-14.0,msvc-14.1 - COMMENT: "Visual Studio 2015/2017" - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + - FLAVOR: cygwin (32-bit) + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ADDPATH: C:\cygwin\bin; + B2_ADDRESS_MODEL: address-model=32 TOOLSET: gcc - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin; + - FLAVOR: cygwin (64-bit) + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + ADDPATH: C:\cygwin64\bin; + B2_ADDRESS_MODEL: address-model=64 TOOLSET: gcc + - FLAVOR: mingw32 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + ARCH: i686 + B2_ADDRESS_MODEL: address-model=32 + SCRIPT: ci\mingw.bat + - FLAVOR: mingw64 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + ARCH: x86_64 + B2_ADDRESS_MODEL: address-model=64 + SCRIPT: ci\mingw.bat install: - set SELF=uuid - cd .. - git clone -b %APPVEYOR_REPO_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - - git submodule update --init tools/boostdep - - git submodule update --init tools/build - - git submodule update --init tools/inspect + - git submodule update -q --init tools/boostdep + - git submodule update -q --init tools/build + - git submodule update -q --init tools/inspect - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\%SELF% - - python tools/boostdep/depinst/depinst.py %SELF% + - python tools/boostdep/depinst/depinst.py --include example --include tools %SELF% - cmd /c bootstrap - b2 headers @@ -62,4 +81,4 @@ build: off test_script: - set SELF=uuid - PATH=%ADDPATH%%PATH% - - b2 libs/%SELF%/test toolset=%TOOLSET% cxxstd=%CXXSTD% %CXXFLAGS% %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) diff --git a/ci/finddeps.sh b/ci/finddeps.sh new file mode 100755 index 0000000..c5ee412 --- /dev/null +++ b/ci/finddeps.sh @@ -0,0 +1,21 @@ +# A script to find direct depenedencies (for documentation) +# +# Copyright (c) 2018 James E. King III +# +# Use, modification, and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#!/bin/bash + +set -e + +# takes one or more arguments - subdirectories to calculate depenedencies for +function finddeps +{ + local hdrs=`find $* -type f -exec grep 'include' {} \; | grep 'boost/' | grep -v 'date_time' | sed 's//\"/g' | cut -d\" -f2 | sort | uniq` + local deps=`for hdr in $hdrs; do local hdronly=${hdr##*/}; find .. -name $hdronly -print | grep $hdr | cut -d'/' -f2; done` + echo $deps | xargs -n1 | sort -u +} + +finddeps $* diff --git a/ci/mingw.bat b/ci/mingw.bat new file mode 100755 index 0000000..bc189fd --- /dev/null +++ b/ci/mingw.bat @@ -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 +@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 \ No newline at end of file