Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error build if ICU or IConv support was requested but is not available. #247

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ jobs:
if: '!matrix.coverity'
run: ci/build.sh
env: {B2_FLAGS: -a boost.locale.icu=off boost.locale.iconv=on}
- name: Check ICU
if: '!matrix.coverity'
run: 'ci/build.sh || true'
env:
B2_FLAGS: -a boost.locale.icu=on boost.locale.iconv=off --debug-configuration
B2_TARGETS: libs/locale/build//has_icu
- name: Run tests with ICU only
if: '!matrix.coverity'
run: ci/build.sh
Expand Down Expand Up @@ -407,6 +413,18 @@ jobs:
B2_CXXSTD: ${{matrix.cxxstd}}
B2_ADDRESS_MODEL: ${{matrix.addrmd}}

- name: Check ICU
if: '!matrix.coverage'
run: |
set B2_FLAGS=boost.locale.icu=on boost.locale.iconv=off boost.locale.std=off boost.locale.winapi=off --debug-configuration
ci\build.bat
rmdir /s /q bin.v2
env:
B2_TOOLSET: ${{matrix.toolset}}
B2_CXXSTD: ${{matrix.cxxstd}}
B2_ADDRESS_MODEL: ${{matrix.addrmd}}
B2_TARGETS: libs/locale/build//has_icu

- name: Run tests (ICU, without coverage)
if: '!matrix.coverage'
run: |
Expand Down
8 changes: 7 additions & 1 deletion build/Jamfile.v2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2003 John Maddock
# Copyright 2010 Artyom Beilis
# Copyright 2021 - 2022 Alexander Grund
# Copyright 2021-2024 Alexander Grund
#
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt.
Expand Down Expand Up @@ -248,6 +248,9 @@ rule configure-full ( properties * : flags-only )
# ICU might introduce an own iconv, so check for that.
internal_iconv_target = has_iconv_with_icu ;
external_iconv_target = has_external_iconv_with_icu ;
} else if <boost.locale.icu>on in $(properties)
{
errors.user-error : "ICU support was requested but not found" ;
}
}

Expand All @@ -263,6 +266,9 @@ rule configure-full ( properties * : flags-only )
{
found-iconv = true ;
result += <library>iconv ;
} else if <boost.locale.iconv>on in $(properties)
{
errors.user-error : "Iconv support was requested but not found" ;
}
}
if $(found-iconv)
Expand Down
Loading