Skip to content

Commit 2639587

Browse files
authored
Merge pull request #1 from boostorg/develop
Pull request containing latest changes from upstream
2 parents 80a2a12 + 9712546 commit 2639587

File tree

171 files changed

+1346
-569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+1346
-569
lines changed

.travis.yml

Lines changed: 67 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@
44

55
language: cpp
66

7-
sudo: false
8-
9-
python: "2.7"
10-
11-
os:
12-
- linux
13-
- osx
14-
157
branches:
168
only:
179
- master
1810
- develop
11+
- /feature\/.*/
1912

2013
env:
2114
matrix:
@@ -27,6 +20,20 @@ matrix:
2720
- env: BOGUS_JOB=true
2821

2922
include:
23+
- os: linux
24+
env: TEST_CMAKE=true # variables unused - just for identification in travis ci gui
25+
script:
26+
- mkdir __build__ && cd __build__
27+
- cmake .. -DBOOST_ENABLE_CMAKE=ON -DBOOST_INCLUDE_LIBRARIES=regex -DBOOST_REGEX_INCLUDE_EXAMPLES=ON
28+
- cmake --build .
29+
30+
- os: linux
31+
env: TEST_CMAKE=true BUILD_SHARED_LIBS=On # variables unused - just for identification in travis ci gui
32+
script:
33+
- mkdir __build__ && cd __build__
34+
- cmake .. -DBUILD_SHARED_LIBS=ON -DBOOST_ENABLE_CMAKE=ON -DBOOST_INCLUDE_LIBRARIES=regex -DBOOST_REGEX_INCLUDE_EXAMPLES=ON
35+
- cmake --build .
36+
3037
- os: linux
3138
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03
3239

@@ -102,6 +109,42 @@ matrix:
102109
sources:
103110
- ubuntu-toolchain-r-test
104111

112+
- os: linux
113+
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11 CXXSTD_DIALECT=cxxstd-dialect=gnu
114+
addons:
115+
apt:
116+
packages:
117+
- g++-7
118+
sources:
119+
- ubuntu-toolchain-r-test
120+
121+
- os: linux
122+
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=14,1z CXXSTD_DIALECT=cxxstd-dialect=gnu
123+
addons:
124+
apt:
125+
packages:
126+
- g++-7
127+
sources:
128+
- ubuntu-toolchain-r-test
129+
130+
- os: linux
131+
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11 CXXSTD_DIALECT=cxxstd-dialect=gnu
132+
addons:
133+
apt:
134+
packages:
135+
- g++-8
136+
sources:
137+
- ubuntu-toolchain-r-test
138+
139+
- os: linux
140+
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=14,1z CXXSTD_DIALECT=cxxstd-dialect=gnu
141+
addons:
142+
apt:
143+
packages:
144+
- g++-8
145+
sources:
146+
- ubuntu-toolchain-r-test
147+
105148
- os: linux
106149
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
107150

@@ -205,58 +248,27 @@ matrix:
205248
- os: osx
206249
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11
207250
osx_image: xcode6.4
251+
# On this image, git doesn't support --jobs 3
252+
install:
253+
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
254+
- cd ..
255+
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
256+
- cd boost-root
257+
- git submodule update --init tools/boostdep
258+
- cp -r $TRAVIS_BUILD_DIR/* libs/regex
259+
- python tools/boostdep/depinst/depinst.py -I example regex
260+
- ./bootstrap.sh
261+
- ./b2 headers
262+
208263

209264
install:
265+
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
210266
- cd ..
211-
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
267+
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
212268
- cd boost-root
213-
- git submodule update --init tools/build
214-
- git submodule update --init libs/config
215-
- git submodule update --init libs/core
216-
- git submodule update --init libs/container_hash
217-
- git submodule update --init libs/detail
218-
- git submodule update --init libs/smart_ptr
219-
- git submodule update --init libs/predef
220-
- git submodule update --init libs/assert
221-
- git submodule update --init libs/throw_exception
222-
- git submodule update --init libs/mpl
223-
- git submodule update --init libs/type_traits
224-
- git submodule update --init libs/static_assert
225-
- git submodule update --init libs/integer
226-
- git submodule update --init libs/preprocessor
227-
- git submodule update --init libs/functional
228-
- git submodule update --init libs/program_options
229-
- git submodule update --init libs/chrono
230-
- git submodule update --init libs/system
231-
- git submodule update --init libs/thread
232-
- git submodule update --init libs/winapi
233-
- git submodule update --init libs/move
234-
- git submodule update --init libs/date_time
235-
- git submodule update --init libs/ratio
236-
- git submodule update --init libs/iterator
237-
- git submodule update --init libs/range
238-
- git submodule update --init libs/any
239-
- git submodule update --init libs/concept_check
240-
- git submodule update --init libs/array
241-
- git submodule update --init libs/timer
242-
- git submodule update --init libs/bind
243-
- git submodule update --init libs/utility
244-
- git submodule update --init libs/io
245-
- git submodule update --init libs/intrusive
246-
- git submodule update --init libs/container
247-
- git submodule update --init libs/tuple
248-
- git submodule update --init libs/exception
249-
- git submodule update --init libs/function
250-
- git submodule update --init libs/type_index
251-
- git submodule update --init libs/lexical_cast
252-
- git submodule update --init libs/numeric
253-
- git submodule update --init libs/math
254-
- git submodule update --init libs/tokenizer
255-
- git submodule update --init libs/optional
256-
- git submodule update --init libs/atomic
257-
- git submodule update --init libs/rational
258-
- git submodule update --init libs/algorithm
269+
- git submodule update --init tools/boostdep
259270
- cp -r $TRAVIS_BUILD_DIR/* libs/regex
271+
- python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
260272
- ./bootstrap.sh
261273
- ./b2 headers
262274

CMakeLists.txt

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Copyright 2018-2019 Mike Dev
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
4+
#
5+
# NOTE: CMake support for Boost.Regex is currently experimental at best
6+
# and the interface is likely to change in the future
7+
8+
9+
##### How-To:
10+
#
11+
# If you have a cmake project that wants to use and compile
12+
# boost_regex, as part of a single build system run, do the following:
13+
# 1) clone the boost project and all its sub-projects:
14+
#
15+
# git clone --branch develop --depth 1 --recursive --shallow-submodules https://github.com/boostorg/boost.git boost-root
16+
#
17+
# 2) add to your cmake script:
18+
#
19+
# add_subdirectory( <path-to-boost-root> [<build-dir-for-boost-libs>])
20+
# target_link_libraries( <my-exec> PUBLIC Boost::regex)
21+
#
22+
# 3) run your cmake build as usual
23+
#
24+
# ## Explanation:
25+
#
26+
# Currently this file does not work standalone. It is expected to be
27+
# invoked from a parent script via add_subdirectory. That parent script
28+
# is responsible for providing targets for direct and indirect dependencies,
29+
# such as Boost::assert, Boost::concept_check, e.g. by also adding those
30+
# libraries via add_submodule (order doesn't matter).
31+
# The parent script can be your own cmake script, but it is easier to just
32+
# use add the CMakeLists in the root of the boost super project, which
33+
# will in turn add all boost libraries usable with the add_subdirectory
34+
# Workflow.
35+
#
36+
# Note: You don't need to actually clone all boost libraries. E.g. look
37+
# into the travis ci file to see on which libraries boost_regex actually
38+
# depends or use boostdep https://github.com/boostorg/boostdep
39+
40+
41+
##### Current Limitations:
42+
#
43+
# - Doesn't compile or run tests
44+
#
45+
46+
cmake_minimum_required( VERSION 3.5...3.16 )
47+
project( boost_regex VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX )
48+
49+
option( BOOST_REGEX_INCLUDE_EXAMPLES "Also build (some) boost regex examples" OFF )
50+
option( BOOST_REGEX_USE_ICU "Enable ICU support in boost regex" OFF )
51+
52+
file( GLOB BOOST_REGEX_SRC ./src/*.cpp )
53+
54+
add_library( boost_regex ${BOOST_REGEX_SRC} )
55+
add_library( Boost::regex ALIAS boost_regex )
56+
57+
target_include_directories( boost_regex PUBLIC include )
58+
59+
target_compile_definitions( boost_regex
60+
PUBLIC
61+
# No need for autolink
62+
BOOST_REGEX_NO_LIB
63+
$<$<STREQUAL:$<TARGET_PROPERTY:boost_regex,TYPE>,SHARED_LIBRARY>:BOOST_REGEX_DYN_LINK=1>
64+
$<$<STREQUAL:$<TARGET_PROPERTY:boost_regex,TYPE>,STATIC_LIBRARY>:BOOST_REGEX_STATIC_LINK=1>
65+
)
66+
67+
# Specify dependencies (including header-only libraries)
68+
target_link_libraries( boost_regex
69+
PUBLIC
70+
Boost::assert
71+
Boost::concept_check
72+
Boost::config
73+
Boost::container_hash
74+
Boost::core
75+
Boost::integer
76+
Boost::iterator
77+
Boost::mpl
78+
Boost::predef
79+
Boost::smart_ptr
80+
Boost::static_assert
81+
Boost::throw_exception
82+
Boost::type_traits
83+
)
84+
85+
if( BOOST_REGEX_USE_ICU )
86+
# ICU Targets could be provided by parent project,
87+
# if not, look for them ourselves
88+
if( NOT TARGET ICU::dt )
89+
# components need to be listed explicitly
90+
find_package( ICU COMPONENTS dt in uc REQUIRED )
91+
endif()
92+
93+
target_link_libraries( boost_regex
94+
PRIVATE
95+
ICU::dt ICU::in ICU::uc
96+
)
97+
target_compile_definitions( boost_regex PRIVATE BOOST_HAS_ICU=1 )
98+
endif()
99+
100+
if( BOOST_REGEX_INCLUDE_EXAMPLES )
101+
add_subdirectory( example/snippets )
102+
endif()
103+

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Boost Regex Library
2+
============================
3+
4+
The Boost Regex library provides regular expression support for C++, this library is the ancestor to std::regex and still goes beyond
5+
and offers some advantages to, the standard version.
6+
7+
The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/libs/regex/index.html).
8+
9+
## Support, bugs and feature requests ##
10+
11+
Bugs and feature requests can be reported through the [Gitub issue tracker](https://github.com/boostorg/regex/issues)
12+
(see [open issues](https://github.com/boostorg/regex/issues) and
13+
[closed issues](https://github.com/boostorg/regex/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed)).
14+
15+
You can submit your changes through a [pull request](https://github.com/boostorg/regex/pulls).
16+
17+
There is no mailing-list specific to Boost Regex, although you can use the general-purpose Boost [mailing-list](http://lists.boost.org/mailman/listinfo.cgi/boost-users) using the tag [regex].
18+
19+
20+
## Development ##
21+
22+
Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)):
23+
24+
git clone https://github.com/boostorg/boost
25+
cd boost
26+
git submodule update --init
27+
28+
The Boost Regex Library is located in `libs/regex/`.
29+
30+
### Running tests ###
31+
First, make sure you are in `libs/regex/test`.
32+
You can either run all the tests listed in `Jamfile.v2` or run a single test:
33+
34+
../../../b2 <- run all tests
35+
../../../b2 regex_regress <- single test
36+

appveyor.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ environment:
2323
- ARGS: --toolset=msvc-14.0 address-model=32
2424
- ARGS: --toolset=msvc-12.0 address-model=64
2525
- ARGS: --toolset=msvc-14.0 address-model=64
26-
- ARGS: --toolset=msvc-14.0 address-model=64 cxxflags=-std:c++latest
26+
- ARGS: --toolset=msvc-14.0 address-model=64 cxxstd=latest
2727
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
2828
ARGS: --toolset=msvc-14.1 address-model=64
2929
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
3030
ARGS: --toolset=msvc-14.1 address-model=32
3131
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
32-
ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-std:c++latest
32+
ARGS: --toolset=msvc-14.1 address-model=64 cxxstd=17
33+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
34+
ARGS: --toolset=msvc-14.1 address-model=64 cxxstd=latest cxxflags=-permissive-
3335
- ARGS: --toolset=gcc address-model=64
3436
PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
3537
- ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z
@@ -38,13 +40,18 @@ environment:
3840
PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH%
3941
- ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition
4042
PATH: C:\MinGW\bin;%PATH%
41-
43+
- ARGS: --toolset=gcc address-model=32 define=_POSIX_C_SOURCE=200112L threadapi=pthread link=static
44+
PATH: C:\cygwin\bin;%PATH%
45+
- ARGS: --toolset=gcc address-model=64 define=_POSIX_C_SOURCE=200112L define=__USE_ISOC99 threadapi=pthread link=static
46+
PATH: C:\cygwin64\bin;%PATH%
4247

4348
install:
4449
- cd ..
4550
- git clone -b %APPVEYOR_REPO_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
4651
- cd boost-root
4752
- git submodule update --init tools/build
53+
- git submodule update --init tools/boost_install
54+
- git submodule update --init libs/headers
4855
- git submodule update --init libs/config
4956
- git submodule update --init libs/core
5057
- git submodule update --init libs/container_hash

0 commit comments

Comments
 (0)