Skip to content

Commit f80a3ab

Browse files
authored
Merge pull request boostorg#99 from boostorg/feature/update-cmake
Fix CMake Travis failures
2 parents 3b98dc9 + 91892ab commit f80a3ab

File tree

2 files changed

+21
-84
lines changed

2 files changed

+21
-84
lines changed

.travis.yml

Lines changed: 17 additions & 70 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:
@@ -30,25 +23,15 @@ matrix:
3023
- os: linux
3124
env: TEST_CMAKE=true # variables unused - just for identification in travis ci gui
3225
script:
33-
- git submodule update --init tools/cmake
34-
- git submodule update --init libs/conversion
35-
- git submodule update --init libs/function_types
36-
- git submodule update --init libs/fusion
37-
- git submodule update --init libs/typeof
3826
- mkdir __build__ && cd __build__
39-
- cmake .. -DBOOST_ENABLE_CMAKE=ON -DBOOST_REGEX_INCLUDE_EXAMPLES=ON
27+
- cmake .. -DBOOST_ENABLE_CMAKE=ON -DBOOST_INCLUDE_LIBRARIES=regex -DBOOST_REGEX_INCLUDE_EXAMPLES=ON
4028
- cmake --build .
4129

4230
- os: linux
4331
env: TEST_CMAKE=true BUILD_SHARED_LIBS=On # variables unused - just for identification in travis ci gui
4432
script:
45-
- git submodule update --init tools/cmake
46-
- git submodule update --init libs/conversion
47-
- git submodule update --init libs/function_types
48-
- git submodule update --init libs/fusion
49-
- git submodule update --init libs/typeof
5033
- mkdir __build__ && cd __build__
51-
- cmake .. -DBUILD_SHARED_LIBS=ON -DBOOST_ENABLE_CMAKE=ON -DBOOST_REGEX_INCLUDE_EXAMPLES=ON
34+
- cmake .. -DBUILD_SHARED_LIBS=ON -DBOOST_ENABLE_CMAKE=ON -DBOOST_INCLUDE_LIBRARIES=regex -DBOOST_REGEX_INCLUDE_EXAMPLES=ON
5235
- cmake --build .
5336

5437
- os: linux
@@ -265,63 +248,27 @@ matrix:
265248
- os: osx
266249
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11
267250
osx_image: xcode6.4
268-
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
269262

270263

271264
install:
272265
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
273266
- cd ..
274-
- git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root
267+
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
275268
- cd boost-root
276-
- git submodule update --init tools/build
277-
- git submodule update --init tools/boost_install
278-
- git submodule update --init libs/headers
279-
- git submodule update --init libs/config
280-
- git submodule update --init libs/core
281-
- git submodule update --init libs/container_hash
282-
- git submodule update --init libs/detail
283-
- git submodule update --init libs/smart_ptr
284-
- git submodule update --init libs/predef
285-
- git submodule update --init libs/assert
286-
- git submodule update --init libs/throw_exception
287-
- git submodule update --init libs/mpl
288-
- git submodule update --init libs/type_traits
289-
- git submodule update --init libs/static_assert
290-
- git submodule update --init libs/integer
291-
- git submodule update --init libs/preprocessor
292-
- git submodule update --init libs/functional
293-
- git submodule update --init libs/program_options
294-
- git submodule update --init libs/chrono
295-
- git submodule update --init libs/system
296-
- git submodule update --init libs/thread
297-
- git submodule update --init libs/winapi
298-
- git submodule update --init libs/move
299-
- git submodule update --init libs/date_time
300-
- git submodule update --init libs/ratio
301-
- git submodule update --init libs/iterator
302-
- git submodule update --init libs/range
303-
- git submodule update --init libs/any
304-
- git submodule update --init libs/concept_check
305-
- git submodule update --init libs/array
306-
- git submodule update --init libs/timer
307-
- git submodule update --init libs/bind
308-
- git submodule update --init libs/utility
309-
- git submodule update --init libs/io
310-
- git submodule update --init libs/intrusive
311-
- git submodule update --init libs/container
312-
- git submodule update --init libs/tuple
313-
- git submodule update --init libs/exception
314-
- git submodule update --init libs/function
315-
- git submodule update --init libs/type_index
316-
- git submodule update --init libs/lexical_cast
317-
- git submodule update --init libs/numeric
318-
- git submodule update --init libs/math
319-
- git submodule update --init libs/tokenizer
320-
- git submodule update --init libs/optional
321-
- git submodule update --init libs/atomic
322-
- git submodule update --init libs/rational
323-
- git submodule update --init libs/algorithm
269+
- git submodule update --init tools/boostdep
324270
- cp -r $TRAVIS_BUILD_DIR/* libs/regex
271+
- python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
325272
- ./bootstrap.sh
326273
- ./b2 headers
327274

CMakeLists.txt

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,10 @@
4141
##### Current Limitations:
4242
#
4343
# - Doesn't compile or run tests
44-
# - Doesn't support installation
4544
#
4645

47-
cmake_minimum_required( VERSION 3.5 )
48-
project( BoostRegex LANGUAGES CXX )
46+
cmake_minimum_required( VERSION 3.5...3.16 )
47+
project( boost_regex VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX )
4948

5049
option( BOOST_REGEX_INCLUDE_EXAMPLES "Also build (some) boost regex examples" OFF )
5150
option( BOOST_REGEX_USE_ICU "Enable ICU support in boost regex" OFF )
@@ -55,20 +54,11 @@ file( GLOB BOOST_REGEX_SRC ./src/*.cpp )
5554
add_library( boost_regex ${BOOST_REGEX_SRC} )
5655
add_library( Boost::regex ALIAS boost_regex )
5756

58-
# Currently, installation isn't supported directly,
59-
# but someone else might install this target from the parent
60-
# CMake script, so lets proactively differentiate between
61-
# the include directory during regular use (BUILD_INTERFACE)
62-
# and after installation
63-
target_include_directories( boost_regex
64-
PUBLIC
65-
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
66-
$<INSTALL_INTERFACE:include>
67-
)
57+
target_include_directories( boost_regex PUBLIC include )
6858

6959
target_compile_definitions( boost_regex
7060
PUBLIC
71-
# No need for autolink and we don't mangle library name anyway
61+
# No need for autolink
7262
BOOST_REGEX_NO_LIB
7363
$<$<STREQUAL:$<TARGET_PROPERTY:boost_regex,TYPE>,SHARED_LIBRARY>:BOOST_REGEX_DYN_LINK=1>
7464
$<$<STREQUAL:$<TARGET_PROPERTY:boost_regex,TYPE>,STATIC_LIBRARY>:BOOST_REGEX_STATIC_LINK=1>

0 commit comments

Comments
 (0)