From f4e1ff192f706204e8eb1688c96bff37ca3aa895 Mon Sep 17 00:00:00 2001 From: Scott Ramsby Date: Fri, 9 Nov 2018 16:08:07 -0800 Subject: [PATCH 1/4] Fix potential double-definition of WIN32_LEAN_AND_MEAN macro --- src/regex.cpp | 4 +++- src/static_mutex.cpp | 4 +++- src/w32_regex_traits.cpp | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/regex.cpp b/src/regex.cpp index e9e97627..5a8bbdc0 100644 --- a/src/regex.cpp +++ b/src/regex.cpp @@ -28,7 +28,9 @@ # include #endif #ifdef BOOST_REGEX_HAS_MS_STACK_GUARD -#define WIN32_LEAN_AND_MEAN +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #ifndef NOMINMAX # define NOMINMAX #endif diff --git a/src/static_mutex.cpp b/src/static_mutex.cpp index d02b01fc..35dd0c79 100644 --- a/src/static_mutex.cpp +++ b/src/static_mutex.cpp @@ -28,7 +28,9 @@ #ifndef NOMINMAX # define NOMINMAX #endif -#define WIN32_LEAN_AND_MEAN +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include #include #endif diff --git a/src/w32_regex_traits.cpp b/src/w32_regex_traits.cpp index 0f825702..5b5236aa 100644 --- a/src/w32_regex_traits.cpp +++ b/src/w32_regex_traits.cpp @@ -23,7 +23,9 @@ #include #include -#define WIN32_LEAN_AND_MEAN +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #ifndef NOMINMAX # define NOMINMAX #endif From 23915ade0c55148fa08adba99b906fecd28b9a86 Mon Sep 17 00:00:00 2001 From: "James E. King III" Date: Sun, 11 Nov 2018 07:55:24 -0500 Subject: [PATCH 2/4] Add cygwin, cygwin64, and MSVC2017 strict builds to AppVeyor --- appveyor.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b131adcd..51adc6f0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,13 +23,15 @@ environment: - ARGS: --toolset=msvc-14.0 address-model=32 - ARGS: --toolset=msvc-12.0 address-model=64 - ARGS: --toolset=msvc-14.0 address-model=64 - - ARGS: --toolset=msvc-14.0 address-model=64 cxxflags=-std:c++latest + - ARGS: --toolset=msvc-14.0 address-model=64 cxxstd=latest - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ARGS: --toolset=msvc-14.1 address-model=64 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ARGS: --toolset=msvc-14.1 address-model=32 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-std:c++latest + ARGS: --toolset=msvc-14.1 address-model=64 cxxstd=17 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + ARGS: --toolset=msvc-14.1 address-model=64 cxxstd=latest cxxflags=-permissive- - ARGS: --toolset=gcc address-model=64 PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z @@ -38,7 +40,10 @@ environment: PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH% - ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition PATH: C:\MinGW\bin;%PATH% - + - ARGS: --toolset=gcc address-model=32 define=_POSIX_C_SOURCE=200112L threadapi=pthread link=static + PATH: C:\cygwin\bin;%PATH% + - ARGS: --toolset=gcc address-model=64 define=_POSIX_C_SOURCE=200112L define=__USE_ISOC99 threadapi=pthread link=static + PATH: C:\cygwin64\bin;%PATH% install: - cd .. From 3c6cf877187e8d536c0f990478f4c6544acc61d6 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 11 Nov 2018 17:12:56 +0000 Subject: [PATCH 3/4] Disable external template instances on cygwin - they lead to duplicate symbols for some reason. See https://github.com/boostorg/regex/issues/64. --- include/boost/regex/config.hpp | 4 ++++ test/Jamfile.v2 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/regex/config.hpp b/include/boost/regex/config.hpp index de817dbf..f01321c8 100644 --- a/include/boost/regex/config.hpp +++ b/include/boost/regex/config.hpp @@ -120,6 +120,10 @@ #ifdef __clang__ # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES #endif +#ifdef __CYGWIN__ +/* We get multiply defined symbols without this: */ +# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES +#endif /* * If there isn't good enough wide character support then there will diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 17f6b842..49ed730b 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -19,7 +19,7 @@ project U_USING_ICU_NAMESPACE=0 #gcc-mw:static #gcc-mingw:static - gcc-cygwin:static + #gcc-cygwin:static sun:static ; From 88f29667b794b91e57bec60e1b4b63b3417442b7 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 20 Dec 2018 09:04:02 +0000 Subject: [PATCH 4/4] Update CI scripts to handle new module layout. --- .travis.yml | 2 ++ appveyor.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4b1ab15e..2bc5872d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -247,6 +247,8 @@ install: - git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - git submodule update --init tools/build + - git submodule update --init tools/boost_install + - git submodule update --init libs/headers - git submodule update --init libs/config - git submodule update --init libs/core - git submodule update --init libs/container_hash diff --git a/appveyor.yml b/appveyor.yml index b131adcd..721a62fe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -45,6 +45,8 @@ install: - git clone -b %APPVEYOR_REPO_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - git submodule update --init tools/build + - git submodule update --init tools/boost_install + - git submodule update --init libs/headers - git submodule update --init libs/config - git submodule update --init libs/core - git submodule update --init libs/container_hash