Skip to content

Commit f748512

Browse files
committed
Merge branch 'develop'
2 parents 3f7149e + 4412f9f commit f748512

Some content is hidden

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

44 files changed

+2303
-1138
lines changed

.appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ for:
146146
build_script: cmake --build . --config %configuration% --parallel 4
147147
test_script:
148148
- ctest --output-on-failure -C %configuration% --parallel 4
149+
- ps: |
150+
$iostream_exe = "$env:configuration/boost_nowide-test_iostream.exe"
151+
# Should show "Using Nowide input/output" and run the tests
152+
&$iostream_exe
149153
- ps: |
150154
If ($env:COVERAGE -eq "true") {
151155
choco install opencppcoverage

.clang-format

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,12 @@ IncludeCategories:
7373
- Regex: '<boost/nowide'
7474
Priority: 49
7575
SortPriority: 0
76-
- Regex: '<boost/'
76+
- Regex: '^"'
7777
Priority: 50
7878
SortPriority: 0
79+
- Regex: '<boost/'
80+
Priority: 75
81+
SortPriority: 0
7982
- Regex: '^<'
8083
Priority: 100
8184
SortPriority: 0

.github/workflows/ci_tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282
run: cmake .. -DBoost_DEBUG=ON -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DBUILD_SHARED_LIBS=${{matrix.shared_lib}} -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/../install -G "${{matrix.generator}}" -DCMAKE_SH="CMAKE_SH-NOTFOUND" -DBoost_NO_BOOST_CMAKE=ON
8383
- name: Build & Install
8484
run: cmake --build build --config ${{matrix.buildType}} --target install
85+
8586
# Run test with both bash and powershell and watch for "Using std::cin" on bash but not on powershell
8687
- name: Test
8788
working-directory: build
@@ -179,7 +180,7 @@ jobs:
179180
runs-on: ubuntu-latest
180181
steps:
181182
- uses: actions/checkout@v1
182-
- uses: DoozyX/clang-format-lint-action@v0.10
183+
- uses: DoozyX/clang-format-lint-action@v0.11
183184
with:
184185
exclude: './doc'
185186
clangFormatVersion: 10

.github/workflows/posix.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ env:
1616
jobs:
1717
CI:
1818
strategy:
19-
fail-fast: false
2019
matrix:
2120
include:
2221
- { compiler: g++-4.4, cxxstd: '98,0x', os: ubuntu-16.04, install: yes }
@@ -60,7 +59,8 @@ jobs:
6059
6160
- name: Setup config vars
6261
run: |
63-
echo "LIBRARY=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
62+
LIBRARY=${GITHUB_REPOSITORY#*/}
63+
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
6464
echo "B2_COMPILER=${{matrix.compiler}}" >> $GITHUB_ENV
6565
${{matrix.compiler}} --version
6666
if [[ "${{matrix.compiler}}" =~ clang ]]; then
@@ -76,7 +76,7 @@ jobs:
7676
echo "B2_CXXSTD=${{matrix.cxxstd}}" >> $GITHUB_ENV
7777
if [[ "${{matrix.sanitize}}" == "yes" ]]; then
7878
echo "B2_ASAN=address-sanitizer=norecover" >> $GITHUB_ENV
79-
echo "B2_UBSAN=undefined-sanitizer=norecover" >> $GITHUB_ENV
79+
echo "B2_UBSAN=undefined-sanitizer=norecover cxxflags=-fsanitize-blacklist=libs/$LIBRARY/ubsan-blacklist" >> $GITHUB_ENV
8080
fi
8181
[[ "${{matrix.linkflags}}" == "" ]] || echo "B2_LINKFLAGS=linkflags=${{matrix.linkflags}}" >> $GITHUB_ENV
8282

.github/workflows/update_standalone.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ jobs:
4343
git commit -m "Include '${{github.event.head_commit.message}}'"
4444
remote_repo="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"
4545
git push "$remote_repo" HEAD:$STANDALONE_BRANCH_NAME
46-

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ option(Boost_NOWIDE_WERROR "Treat warnings as errors" "${def_WERROR}")
5454

5555
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/config/check_lfs_support.cpp lfsSource)
5656
check_cxx_source_compiles("${lfsSource}" BOOST_NOWIDE_HAS_LFS)
57+
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/config/check_attribute_init_priority.cpp attributeInitPrioritySource)
58+
check_cxx_source_compiles("${attributeInitPrioritySource}" BOOST_NOWIDE_HAS_INIT_PRIORITY)
5759

5860
# Using glob here is ok as it is only for headers
5961
file(GLOB_RECURSE headers include/*.hpp)
60-
add_library(boost_nowide src/cstdio.cpp src/cstdlib.cpp src/filebuf.cpp src/iostream.cpp src/stat.cpp ${headers})
62+
add_library(boost_nowide src/console_buffer.cpp src/cstdio.cpp src/cstdlib.cpp src/filebuf.cpp src/iostream.cpp src/stat.cpp ${headers})
6163
add_library(Boost::nowide ALIAS boost_nowide)
6264
set_target_properties(boost_nowide PROPERTIES
6365
CXX_VISIBILITY_PRESET hidden
@@ -71,6 +73,9 @@ endif()
7173
if(NOT BOOST_NOWIDE_HAS_LFS)
7274
target_compile_definitions(boost_nowide PRIVATE BOOST_NOWIDE_NO_LFS)
7375
endif()
76+
if(BOOST_NOWIDE_HAS_INIT_PRIORITY)
77+
target_compile_definitions(boost_nowide PRIVATE BOOST_NOWIDE_HAS_INIT_PRIORITY)
78+
endif()
7479
target_compile_definitions(boost_nowide PUBLIC BOOST_NOWIDE_NO_LIB)
7580
target_include_directories(boost_nowide PUBLIC include)
7681
boost_add_warnings(boost_nowide pedantic ${Boost_NOWIDE_WERROR})

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Branch | Appveyor | Github | codecov.io | Documentation
55
[master](https://github.com/boostorg/nowide/tree/master) | [![Build status](https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/master?svg=true)](https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/master) | ![](https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=master) ![](https://github.com/boostorg/nowide/workflows/POSIX/badge.svg?branch=master) | [![codecov](https://codecov.io/gh/boostorg/nowide/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/nowide/branch/master) | [![Documentation](https://img.shields.io/badge/documentation-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/nowide/index.html)
66
[develop](https://github.com/boostorg/nowide/tree/develop) | [![Build status](https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/develop?svg=true)](https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/develop) | ![](https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=develop) ![](https://github.com/boostorg/nowide/workflows/POSIX/badge.svg?branch=develop) | [![codecov](https://codecov.io/gh/boostorg/nowide/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/nowide/branch/develop) | [![Documentation](https://img.shields.io/badge/documentation-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/nowide/index.html)
77

8-
Coverity Scan: [![Coverity Scan Build Status](https://scan.coverity.com/projects/20464/badge.svg)](https://scan.coverity.com/projects/boostorg-nowide)
8+
Quality checks:
9+
[![Coverity Scan Build Status](https://scan.coverity.com/projects/20464/badge.svg)](https://scan.coverity.com/projects/boostorg-nowide)
10+
[![CodeFactor](https://www.codefactor.io/repository/github/boostorg/nowide/badge)](https://www.codefactor.io/repository/github/boostorg/nowide)
911

1012
Library for cross-platform, unicode aware programming.
1113

build/Jamfile.v2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ project boost/nowide
2525
]
2626
[ check-target-builds ../config//cxx11_moveable_fstreams "std::fstream is moveable and swappable" : : <build>no ]
2727
[ check-target-builds ../config//lfs_support "Has Large File Support" : : <define>BOOST_NOWIDE_NO_LFS ]
28+
[ check-target-builds ../config//attribute_init_priority "Has attribute init_priority" : <define>BOOST_NOWIDE_HAS_INIT_PRIORITY ]
2829
: usage-requirements $(requirements)
2930
;
3031

31-
local SOURCES = cstdio cstdlib filebuf iostream stat ;
32+
local SOURCES = console_buffer cstdio cstdlib filebuf iostream stat ;
3233

3334
lib boost_nowide
3435
: $(SOURCES).cpp

cmake/BoostAddWarnings.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ function(boost_add_warnings target level)
1414
if(NOT level IN_LIST allowed_levels)
1515
message(FATAL_ERROR "${level} is not a valid warning level (${allowed_levels})")
1616
endif()
17-
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
17+
if(MSVC)
18+
set(warn_off /W0)
19+
set(warn_on /W3)
20+
foreach(_lvl IN ITEMS all extra pedantic)
21+
set(warn_${_lvl} /W4)
22+
endforeach()
23+
set(werror /WX)
24+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1825
set(warn_off -w)
1926
set(warn_on -Wall)
2027
set(warn_all -Wall)
@@ -27,13 +34,6 @@ function(boost_add_warnings target level)
2734
set(warn_${_lvl} -w1)
2835
endforeach()
2936
set(werror "")
30-
elseif(MSVC)
31-
set(warn_off /W0)
32-
set(warn_on /W3)
33-
foreach(_lvl IN ITEMS all extra pedantic)
34-
set(warn_${_lvl} /W4)
35-
endforeach()
36-
set(werror /WX)
3737
endif()
3838
target_compile_options(${target} PRIVATE ${warn_${level}})
3939
if(warningsAsErrors)

config/Jamfile.v2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
obj attribute_init_priority : check_attribute_init_priority.cpp ;
2+
explicit attribute_init_priority ;
3+
14
obj cxx11_moveable_fstreams : check_movable_fstreams.cpp ;
25
explicit cxx11_moveable_fstreams ;
36

0 commit comments

Comments
 (0)