From 12fd320f3cf86964092b2659bb6e039b019360b7 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 20 Jan 2020 16:40:28 +0200 Subject: [PATCH 1/6] Fix CMakeLists.txt --- CMakeLists.txt | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d7e190be..a61ba77c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,11 +41,10 @@ ##### Current Limitations: # # - Doesn't compile or run tests -# - Doesn't support installation # -cmake_minimum_required( VERSION 3.5 ) -project( BoostRegex LANGUAGES CXX ) +cmake_minimum_required( VERSION 3.5...3.16 ) +project( boost_regex VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX ) option( BOOST_REGEX_INCLUDE_EXAMPLES "Also build (some) boost regex examples" OFF ) option( BOOST_REGEX_USE_ICU "Enable ICU support in boost regex" OFF ) @@ -55,20 +54,11 @@ file( GLOB BOOST_REGEX_SRC ./src/*.cpp ) add_library( boost_regex ${BOOST_REGEX_SRC} ) add_library( Boost::regex ALIAS boost_regex ) -# Currently, installation isn't supported directly, -# but someone else might install this target from the parent -# CMake script, so lets proactively differentiate between -# the include directory during regular use (BUILD_INTERFACE) -# and after installation -target_include_directories( boost_regex - PUBLIC - $ - $ -) +target_include_directories( boost_regex PUBLIC include ) target_compile_definitions( boost_regex PUBLIC - # No need for autolink and we don't mangle library name anyway + # No need for autolink BOOST_REGEX_NO_LIB $<$,SHARED_LIBRARY>:BOOST_REGEX_DYN_LINK=1> $<$,STATIC_LIBRARY>:BOOST_REGEX_STATIC_LINK=1> From a1d0c4fdc415442ad7fb998d46862e31d4e1d944 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 20 Jan 2020 16:43:43 +0200 Subject: [PATCH 2/6] Update .travis.yml --- .travis.yml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index bad8a07e..4b215585 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,18 +4,11 @@ language: cpp -sudo: false - -python: "2.7" - -os: - - linux - - osx - branches: only: - master - develop + - /feature\/.*/ env: matrix: @@ -30,25 +23,15 @@ matrix: - os: linux env: TEST_CMAKE=true # variables unused - just for identification in travis ci gui script: - - git submodule update --init tools/cmake - - git submodule update --init libs/conversion - - git submodule update --init libs/function_types - - git submodule update --init libs/fusion - - git submodule update --init libs/typeof - mkdir __build__ && cd __build__ - - cmake .. -DBOOST_ENABLE_CMAKE=ON -DBOOST_REGEX_INCLUDE_EXAMPLES=ON + - cmake .. -DBOOST_ENABLE_CMAKE=ON -DBOOST_INCLUDE_LIBRARIES=regex -DBOOST_REGEX_INCLUDE_EXAMPLES=ON - cmake --build . - os: linux env: TEST_CMAKE=true BUILD_SHARED_LIBS=On # variables unused - just for identification in travis ci gui script: - - git submodule update --init tools/cmake - - git submodule update --init libs/conversion - - git submodule update --init libs/function_types - - git submodule update --init libs/fusion - - git submodule update --init libs/typeof - mkdir __build__ && cd __build__ - - cmake .. -DBUILD_SHARED_LIBS=ON -DBOOST_ENABLE_CMAKE=ON -DBOOST_REGEX_INCLUDE_EXAMPLES=ON + - cmake .. -DBUILD_SHARED_LIBS=ON -DBOOST_ENABLE_CMAKE=ON -DBOOST_INCLUDE_LIBRARIES=regex -DBOOST_REGEX_INCLUDE_EXAMPLES=ON - cmake --build . - os: linux @@ -275,6 +258,7 @@ install: - cd boost-root - git submodule update --init tools/build - git submodule update --init tools/boost_install + - git submodule update --init tools/cmake - git submodule update --init libs/headers - git submodule update --init libs/config - git submodule update --init libs/core From b0eb5ccb205e2536c18b872e0aff18e06c0e736d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 20 Jan 2020 16:48:44 +0200 Subject: [PATCH 3/6] Use depinst --- .travis.yml | 51 ++------------------------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4b215585..36e7bd5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -256,56 +256,9 @@ install: - cd .. - git clone -b $BOOST_BRANCH 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 tools/cmake - - 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 - - git submodule update --init libs/detail - - git submodule update --init libs/smart_ptr - - git submodule update --init libs/predef - - git submodule update --init libs/assert - - git submodule update --init libs/throw_exception - - git submodule update --init libs/mpl - - git submodule update --init libs/type_traits - - git submodule update --init libs/static_assert - - git submodule update --init libs/integer - - git submodule update --init libs/preprocessor - - git submodule update --init libs/functional - - git submodule update --init libs/program_options - - git submodule update --init libs/chrono - - git submodule update --init libs/system - - git submodule update --init libs/thread - - git submodule update --init libs/winapi - - git submodule update --init libs/move - - git submodule update --init libs/date_time - - git submodule update --init libs/ratio - - git submodule update --init libs/iterator - - git submodule update --init libs/range - - git submodule update --init libs/any - - git submodule update --init libs/concept_check - - git submodule update --init libs/array - - git submodule update --init libs/timer - - git submodule update --init libs/bind - - git submodule update --init libs/utility - - git submodule update --init libs/io - - git submodule update --init libs/intrusive - - git submodule update --init libs/container - - git submodule update --init libs/tuple - - git submodule update --init libs/exception - - git submodule update --init libs/function - - git submodule update --init libs/type_index - - git submodule update --init libs/lexical_cast - - git submodule update --init libs/numeric - - git submodule update --init libs/math - - git submodule update --init libs/tokenizer - - git submodule update --init libs/optional - - git submodule update --init libs/atomic - - git submodule update --init libs/rational - - git submodule update --init libs/algorithm + - git submodule update --init tools/boostdep - cp -r $TRAVIS_BUILD_DIR/* libs/regex + - python tools/boostdep/depinst/depinst.py regex - ./bootstrap.sh - ./b2 headers From 4788894218671c346c1e0fc1506da3ff5f9bf7c4 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 20 Jan 2020 16:56:43 +0200 Subject: [PATCH 4/6] Use --jobs 3 when updating submodules --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 36e7bd5b..8af3ea83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -254,11 +254,11 @@ matrix: install: - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - cd .. - - git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root + - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - git submodule update --init tools/boostdep - cp -r $TRAVIS_BUILD_DIR/* libs/regex - - python tools/boostdep/depinst/depinst.py regex + - python tools/boostdep/depinst/depinst.py -g "--jobs 3" regex - ./bootstrap.sh - ./b2 headers From bb9c3b68d468004a602731f4756673b46bfc31de Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 20 Jan 2020 16:58:24 +0200 Subject: [PATCH 5/6] Add `-I example` to depinst --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8af3ea83..158ae4bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -258,7 +258,7 @@ install: - cd boost-root - git submodule update --init tools/boostdep - cp -r $TRAVIS_BUILD_DIR/* libs/regex - - python tools/boostdep/depinst/depinst.py -g "--jobs 3" regex + - python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex - ./bootstrap.sh - ./b2 headers From 91892ab07d82967a86f3b94cba21242086d5c42d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 20 Jan 2020 18:51:31 +0200 Subject: [PATCH 6/6] On the xcode6.4 image, git is an older version and doesn't support --jobs 3 --- .travis.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 158ae4bc..060a16aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -248,7 +248,17 @@ matrix: - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=11 osx_image: xcode6.4 - + # On this image, git doesn't support --jobs 3 + install: + - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true + - cd .. + - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + - cd boost-root + - git submodule update --init tools/boostdep + - cp -r $TRAVIS_BUILD_DIR/* libs/regex + - python tools/boostdep/depinst/depinst.py -I example regex + - ./bootstrap.sh + - ./b2 headers install: