Skip to content

Commit

Permalink
Merge pull request #161 from boostorg/icu_cmake
Browse files Browse the repository at this point in the history
Update ICU testing and usage.
  • Loading branch information
jzmaddock authored Oct 10, 2021
2 parents eb573a7 + fe72f47 commit b5cb9b7
Show file tree
Hide file tree
Showing 98 changed files with 404 additions and 175 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)

name: CI
on: [ push, pull_request ]
on:
push:
branches:
- master
- develop
pull_request:
release:
types: [published, created, edited]
jobs:
ubuntu-focal:
runs-on: ubuntu-20.04
Expand All @@ -27,7 +34,7 @@ jobs:
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-9 g++-10 clang-9 clang-10
run: sudo apt install g++-9 g++-10 clang-9 clang-10 libicu-dev
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
Expand Down Expand Up @@ -78,7 +85,7 @@ jobs:
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-7 g++-8 clang-7 clang-8
run: sudo apt install g++-7 g++-8 clang-7 clang-8 libicu-dev
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
Expand Down Expand Up @@ -331,6 +338,8 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Install packages
run: sudo apt install libicu-dev
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
Expand All @@ -352,3 +361,17 @@ jobs:
cmake ..
cmake --build .
cmake --build . --target check
rm -rf *
echo Standalone configuration
cmake -DBOOST_REGEX_STANDALONE=on ..
cmake --build .
cmake --build . --target check
cd ../../cmake_subdir_test_icu && mkdir __build__ && cd __build__
cmake ..
cmake --build .
cmake --build . --target check
rm -rf *
echo Standalone configuration
cmake -DBOOST_REGEX_STANDALONE=on ..
cmake --build .
cmake --build . --target check
60 changes: 53 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,57 @@ add_library(Boost::regex ALIAS boost_regex)

target_include_directories(boost_regex INTERFACE include)

target_link_libraries(boost_regex
INTERFACE
Boost::config
Boost::throw_exception
Boost::predef
Boost::assert
)
option(BOOST_REGEX_STANDALONE "Boost.Regex: Enable Standalone Mode (i.e. no Boost dependencies)")

if(NOT BOOST_REGEX_STANDALONE)

target_link_libraries(boost_regex
INTERFACE
Boost::config
Boost::throw_exception
Boost::predef
Boost::assert
)

else()

target_compile_definitions(boost_regex
INTERFACE BOOST_REGEX_STANDALONE
)

endif()

find_package(ICU COMPONENTS data i18n uc QUIET)
#option(BOOST_REGEX_ENABLE_ICU "Boost.Regex: enable ICU support" ${ICU_FOUND})

if(ICU_FOUND)

add_library(boost_regex_icu INTERFACE)
add_library(Boost::regex_icu ALIAS boost_regex_icu)

target_include_directories(boost_regex_icu INTERFACE include)

if(NOT BOOST_REGEX_STANDALONE)

target_link_libraries(boost_regex_icu
INTERFACE
Boost::config
Boost::throw_exception
Boost::predef
Boost::assert
)

else()

target_compile_definitions(boost_regex_icu
INTERFACE BOOST_REGEX_STANDALONE
)

endif()

find_package(ICU COMPONENTS data i18n uc REQUIRED)

target_link_libraries(boost_regex_icu INTERFACE ICU::data ICU::i18n ICU::uc)

endif()

4 changes: 2 additions & 2 deletions doc/html/boost_regex/background.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<title>Background Information</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="Boost.Regex 5.1.4">
<link rel="up" href="../index.html" title="Boost.Regex 5.1.4">
<link rel="home" href="../index.html" title="Boost.Regex 7.0.0">
<link rel="up" href="../index.html" title="Boost.Regex 7.0.0">
<link rel="prev" href="ref/internals/uni_iter.html" title="Unicode Iterators">
<link rel="next" href="background/headers.html" title="Headers">
</head>
Expand Down
2 changes: 1 addition & 1 deletion doc/html/boost_regex/background/acknowledgements.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Acknowledgements</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Regex 5.1.4">
<link rel="home" href="../../index.html" title="Boost.Regex 7.0.0">
<link rel="up" href="../background.html" title="Background Information">
<link rel="prev" href="redist.html" title="Redistributables">
<link rel="next" href="history.html" title="History">
Expand Down
2 changes: 1 addition & 1 deletion doc/html/boost_regex/background/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Test and Example Programs</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Regex 5.1.4">
<link rel="home" href="../../index.html" title="Boost.Regex 7.0.0">
<link rel="up" href="../background.html" title="Background Information">
<link rel="prev" href="thread_safety.html" title="Thread Safety">
<link rel="next" href="futher.html" title="References and Further Information">
Expand Down
2 changes: 1 addition & 1 deletion doc/html/boost_regex/background/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>FAQ</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Regex 5.1.4">
<link rel="home" href="../../index.html" title="Boost.Regex 7.0.0">
<link rel="up" href="../background.html" title="Background Information">
<link rel="prev" href="futher.html" title="References and Further Information">
<link rel="next" href="performance.html" title="Performance">
Expand Down
2 changes: 1 addition & 1 deletion doc/html/boost_regex/background/futher.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>References and Further Information</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Regex 5.1.4">
<link rel="home" href="../../index.html" title="Boost.Regex 7.0.0">
<link rel="up" href="../background.html" title="Background Information">
<link rel="prev" href="examples.html" title="Test and Example Programs">
<link rel="next" href="faq.html" title="FAQ">
Expand Down
2 changes: 1 addition & 1 deletion doc/html/boost_regex/background/headers.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Headers</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Regex 5.1.4">
<link rel="home" href="../../index.html" title="Boost.Regex 7.0.0">
<link rel="up" href="../background.html" title="Background Information">
<link rel="prev" href="../background.html" title="Background Information">
<link rel="next" href="locale.html" title="Localization">
Expand Down
Loading

0 comments on commit b5cb9b7

Please sign in to comment.