Compare commits

...

27 Commits

Author SHA1 Message Date
Peter Dimov
e9c54b2430 Add VERBATIM to add_custom_target 2024-08-27 21:04:58 +03:00
Peter Dimov
17e299f11e Update build.jam, test/Jamfile 2024-08-27 19:13:36 +03:00
Peter Dimov
71902a7bdb Merge branch 'modular' of https://github.com/grafikrobot/boostorg.smart_ptr into feature/modular-b2 2024-08-27 19:06:55 +03:00
Peter Dimov
e9790f99f7 Update .drone.jsonnet 2024-08-27 16:38:50 +03:00
Rene Rivera
d4c605e6ff Sync from upstream. 2024-08-20 09:56:41 -05:00
René Ferdinand Rivera Morell
f5152b0904 Remove CI fetch of functional. 2024-08-18 11:20:51 -05:00
René Ferdinand Rivera Morell
7caada352c Remove CI fetch of functional. 2024-08-18 11:20:26 -05:00
René Ferdinand Rivera Morell
11e56a4ad9 Remove CI fetch of functional. 2024-08-18 11:18:51 -05:00
René Ferdinand Rivera Morell
c33504189a Remove CI fetch of functional. 2024-08-18 11:18:24 -05:00
Rene Rivera
960741cb2e Replace functional deps with correct container_hash deps. 2024-08-17 12:04:30 -05:00
Peter Dimov
c8ef3e2276 Update ContainerHash includes 2024-08-17 20:01:25 +03:00
Rene Rivera
72c25383d5 Manually fetch functional, as depinst doesn't. 2024-08-16 23:25:09 -05:00
Rene Rivera
6b826f1139 Manually fetch functional, as depinst doesn't. 2024-08-16 22:29:05 -05:00
Rene Rivera
591d0e0728 Add test to depinst search to try and get functional. 2024-08-16 21:52:55 -05:00
Rene Rivera
e86015f9f6 Move inter-lib dependencies to a project variable and into the build targets. 2024-07-23 22:34:22 -05:00
Rene Rivera
4f9487d0f3 Update copyright dates. 2024-07-20 22:52:03 -05:00
Rene Rivera
0925dcce4e Change all <source> references to <library>. 2024-07-20 21:25:39 -05:00
Rene Rivera
6bc7ec7e6b Sync from upstream. 2024-07-12 08:52:50 -05:00
Peter Dimov
1650077eee Update ci.yml 2024-07-08 21:10:41 +03:00
Peter Dimov
635dfe46ee Update C++03 deprecation message 2024-07-08 21:02:19 +03:00
Rene Rivera
fc0eeeffa6 Bump B2 require to 5.2 2024-06-14 11:33:56 -05:00
Rene Rivera
4df3174d4a Add requires-b2 check to top-level build file. 2024-05-05 09:00:01 -05:00
Rene Rivera
1a51e0f02c Sync from upstream. 2024-04-20 15:31:46 -05:00
Peter Dimov
c4ae5e0c42 Do not disable GCC intrinsics under clang-cl 2024-04-13 20:29:34 +03:00
Daniel Arndt
85b0ab073c Don't define BOOST_SP_HAS_GCC_INTRINSICS for MSVC 2024-04-12 08:10:31 -05:00
Rene Rivera
ac9154d1e5 Switch to library requirements instead of source. As source puts extra source in install targets. 2024-03-29 21:15:59 -05:00
Rene Rivera
788313fda2 Make the library modular usable. 2024-03-11 08:38:16 -05:00
14 changed files with 118 additions and 35 deletions

View File

@@ -32,6 +32,8 @@ local linux_pipeline(name, image, environment, packages = "", sources = [], arch
commands: commands:
[ [
'set -e', 'set -e',
'uname -a',
'echo $DRONE_STAGE_MACHINE',
'wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -', 'wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -',
] + ] +
(if sources != [] then [ ('apt-add-repository "' + source + '"') for source in sources ] else []) + (if sources != [] then [ ('apt-add-repository "' + source + '"') for source in sources ] else []) +
@@ -207,13 +209,6 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
"g++-13-multilib", "g++-13-multilib",
), ),
linux_pipeline(
"Linux 23.04 GCC 13 64 ASAN",
"cppalliance/droneubuntu2304:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '03,11,14,17,20,2b', ADDRMD: '64' } + asan,
"g++-13-multilib",
),
linux_pipeline( linux_pipeline(
"Linux 23.04 GCC 13 32 UBSAN", "Linux 23.04 GCC 13 32 UBSAN",
"cppalliance/droneubuntu2304:1", "cppalliance/droneubuntu2304:1",
@@ -228,6 +223,20 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
"g++-13-multilib", "g++-13-multilib",
), ),
linux_pipeline(
"Linux 24.04 GCC 14 UBSAN",
"cppalliance/droneubuntu2404:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '03,11,14,17,20,2b' } + ubsan,
"g++-14-multilib",
),
linux_pipeline(
"Linux 24.04 GCC 14 ASAN",
"cppalliance/droneubuntu2404:1",
{ TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '03,11,14,17,20,2b' } + asan,
"g++-14-multilib",
),
linux_pipeline( linux_pipeline(
"Linux 16.04 Clang 3.5", "Linux 16.04 Clang 3.5",
"cppalliance/droneubuntu1604:1", "cppalliance/droneubuntu1604:1",
@@ -368,6 +377,20 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
"clang-17", "clang-17",
), ),
linux_pipeline(
"Linux 24.04 Clang 18 UBSAN",
"cppalliance/droneubuntu2404:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-18', CXXSTD: '03,11,14,17,20,2b' } + ubsan,
"clang-18",
),
linux_pipeline(
"Linux 24.04 Clang 18 ASAN",
"cppalliance/droneubuntu2404:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-18', CXXSTD: '03,11,14,17,20,2b' } + asan,
"clang-18",
),
macos_pipeline( macos_pipeline(
"MacOS 10.15 Xcode 12.2 UBSAN", "MacOS 10.15 Xcode 12.2 UBSAN",
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,1z' } + ubsan, { TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,1z' } + ubsan,

View File

@@ -58,7 +58,7 @@ jobs:
address-model: 32,64 address-model: 32,64
- toolset: gcc-11 - toolset: gcc-11
cxxstd: "03,11,14,17,20" cxxstd: "03,11,14,17,20"
os: ubuntu-20.04 os: ubuntu-22.04
install: g++-11-multilib install: g++-11-multilib
address-model: 32,64 address-model: 32,64
- toolset: gcc-12 - toolset: gcc-12
@@ -72,6 +72,12 @@ jobs:
container: ubuntu:23.04 container: ubuntu:23.04
install: g++-13-multilib install: g++-13-multilib
address-model: 32,64 address-model: 32,64
- toolset: gcc-14
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-latest
container: ubuntu:24.04
install: g++-14-multilib
address-model: 32,64
- toolset: clang - toolset: clang
compiler: clang++-3.9 compiler: clang++-3.9
cxxstd: "03,11,14" cxxstd: "03,11,14"
@@ -153,14 +159,20 @@ jobs:
os: ubuntu-latest os: ubuntu-latest
install: clang-17 install: clang-17
- toolset: clang - toolset: clang
cxxstd: "03,11,14,17,2a" compiler: clang++-18
os: macos-11 cxxstd: "03,11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: clang-18
- toolset: clang - toolset: clang
cxxstd: "03,11,14,17,20,2b" cxxstd: "03,11,14,17,20,2b"
os: macos-12 os: macos-12
- toolset: clang - toolset: clang
cxxstd: "03,11,14,17,20,2b" cxxstd: "03,11,14,17,20,2b"
os: macos-13 os: macos-13
- toolset: clang
cxxstd: "03,11,14,17,20,2b"
os: macos-14
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
container: ${{matrix.container}} container: ${{matrix.container}}
@@ -170,6 +182,10 @@ jobs:
shell: bash shell: bash
steps: steps:
- name: Enable Node 16
run: |
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup container environment - name: Setup container environment
@@ -245,7 +261,7 @@ jobs:
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Boost - name: Setup Boost
shell: cmd shell: cmd
@@ -282,14 +298,14 @@ jobs:
include: include:
- os: ubuntu-20.04 - os: ubuntu-20.04
- os: ubuntu-22.04 - os: ubuntu-22.04
- os: macos-11
- os: macos-12 - os: macos-12
- os: macos-13 - os: macos-13
- os: macos-14
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Install packages - name: Install packages
if: matrix.install if: matrix.install
@@ -330,14 +346,14 @@ jobs:
include: include:
- os: ubuntu-20.04 - os: ubuntu-20.04
- os: ubuntu-22.04 - os: ubuntu-22.04
- os: macos-11
- os: macos-12 - os: macos-12
- os: macos-13 - os: macos-13
- os: macos-14
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Install packages - name: Install packages
if: matrix.install if: matrix.install
@@ -388,14 +404,14 @@ jobs:
include: include:
- os: ubuntu-20.04 - os: ubuntu-20.04
- os: ubuntu-22.04 - os: ubuntu-22.04
- os: macos-11
- os: macos-12 - os: macos-12
- os: macos-13 - os: macos-13
- os: macos-14
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Install packages - name: Install packages
if: matrix.install if: matrix.install
@@ -448,7 +464,7 @@ jobs:
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Boost - name: Setup Boost
shell: cmd shell: cmd
@@ -497,7 +513,7 @@ jobs:
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Boost - name: Setup Boost
shell: cmd shell: cmd
@@ -564,7 +580,7 @@ jobs:
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Boost - name: Setup Boost
shell: cmd shell: cmd

26
build.jam Normal file
View File

@@ -0,0 +1,26 @@
# Copyright 2023-2024 René Ferdinand Rivera Morell
# Copyright 2024 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
require-b2 5.2 ;
constant boost_dependencies :
/boost/assert//boost_assert
/boost/config//boost_config
/boost/core//boost_core
/boost/move//boost_move
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/type_traits//boost_type_traits
;
project /boost/smart_ptr ;
explicit
[ alias boost_smart_ptr : : : : <include>include <library>$(boost_dependencies) ]
[ alias all : boost_smart_ptr test ]
;
call-if : boost-library smart_ptr
;

View File

@@ -16,7 +16,7 @@
defined(BOOST_NO_CXX11_NULLPTR) || \ defined(BOOST_NO_CXX11_NULLPTR) || \
defined(BOOST_NO_CXX11_SMART_PTR) defined(BOOST_NO_CXX11_SMART_PTR)
BOOST_PRAGMA_MESSAGE("C++03 support was deprecated in Boost.SmartPtr 1.82 and will be removed in Boost.SmartPtr 1.86.") BOOST_PRAGMA_MESSAGE("C++03 support was deprecated in Boost.SmartPtr 1.82 and will be removed in Boost.SmartPtr 1.87.")
#endif #endif

View File

@@ -17,8 +17,11 @@
// Defines the BOOST_SP_HAS_GCC_INTRINSICS macro if the __atomic_* // Defines the BOOST_SP_HAS_GCC_INTRINSICS macro if the __atomic_*
// intrinsics are available. // intrinsics are available.
// Libraries (e.g. Kokkos) sometimes define the __ATOMIC_RELAXED macros,
// leading to errors under MSVC (https://github.com/boostorg/smart_ptr/pull/112)
#if defined( __ATOMIC_RELAXED ) && defined( __ATOMIC_ACQUIRE ) && defined( __ATOMIC_RELEASE ) && defined( __ATOMIC_ACQ_REL ) #if defined( __ATOMIC_RELAXED ) && defined( __ATOMIC_ACQUIRE ) && defined( __ATOMIC_RELEASE ) && defined( __ATOMIC_ACQ_REL ) \
&& !( defined(_MSC_VER) && !defined(__clang__) )
# define BOOST_SP_HAS_GCC_INTRINSICS # define BOOST_SP_HAS_GCC_INTRINSICS

View File

@@ -7,17 +7,25 @@
# accompanying file LICENSE_1_0.txt or copy at # accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt) # http://www.boost.org/LICENSE_1_0.txt)
require-b2 5.0.1 ;
import-search /boost/config/checks ;
import config : requires ;
import testing ; import testing ;
import ../../config/checks/config : requires ;
project project
: requirements : requirements
<library>/boost/smart_ptr//boost_smart_ptr
<library>/boost/align//boost_align
<toolset>gcc:<cxxflags>-Wno-non-virtual-dtor <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor
<toolset>gcc:<cxxflags>-Wno-deprecated-declarations <toolset>gcc:<cxxflags>-Wno-deprecated-declarations
#<toolset>gcc:<cxxflags>-Wno-delete-non-virtual-dtor (not in 4.4/4.6) #<toolset>gcc:<cxxflags>-Wno-delete-non-virtual-dtor (not in 4.4/4.6)
; ;
local cnhash = [ requires cxx11_decltype cxx11_noexcept ] <toolset>gcc-4.6:<build>no ; local cnhash =
<library>/boost/container_hash//boost_container_hash
[ requires cxx11_decltype cxx11_noexcept ]
<toolset>gcc-4.6:<build>no ;
# quick test (for CI) # quick test (for CI)
run quick.cpp ; run quick.cpp ;
@@ -79,7 +87,8 @@ run shared_ptr_convertible_test.cpp ;
run wp_convertible_test.cpp ; run wp_convertible_test.cpp ;
run ip_convertible_test.cpp ; run ip_convertible_test.cpp ;
run allocate_shared_test.cpp ; run allocate_shared_test.cpp ;
run sp_atomic_test.cpp ; run sp_atomic_test.cpp
: : : <library>/boost/atomic//boost_atomic ;
run esft_void_test.cpp ; run esft_void_test.cpp ;
run esft_second_ptr_test.cpp ; run esft_second_ptr_test.cpp ;
run make_shared_esft_test.cpp ; run make_shared_esft_test.cpp ;
@@ -251,7 +260,8 @@ compile make_shared_msvc_test.cpp ;
compile lwm_win32_cs_test.cpp ; compile lwm_win32_cs_test.cpp ;
run atomic_sp_test.cpp ; run atomic_sp_test.cpp
: : : <library>/boost/atomic//boost_atomic ;
run sp_constexpr_test.cpp ; run sp_constexpr_test.cpp ;
run sp_constexpr_test2.cpp ; run sp_constexpr_test2.cpp ;
@@ -405,7 +415,12 @@ run lsp_hash_test.cpp
: : : $(cnhash) ; : : : $(cnhash) ;
run lsp_hash_test2.cpp ; run lsp_hash_test2.cpp ;
local MT = <threading>multi [ requires cxx11_decltype cxx11_noexcept ] <toolset>gcc-4.6:<build>no ; local MT =
<threading>multi
<library>/boost/bind//boost_bind
[ requires cxx11_decltype cxx11_noexcept ]
<toolset>gcc-4.6:<build>no ;
run atomic_count_mt_test.cpp run atomic_count_mt_test.cpp
: : : $(MT) ; : : : $(MT) ;

View File

@@ -15,4 +15,4 @@ target_link_libraries(quick Boost::smart_ptr Boost::core)
enable_testing() enable_testing()
add_test(quick quick) add_test(quick quick)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>) add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)

View File

@@ -21,4 +21,4 @@ target_link_libraries(quick Boost::smart_ptr Boost::core)
enable_testing() enable_testing()
add_test(quick quick) add_test(quick quick)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>) add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)

View File

@@ -9,7 +9,7 @@
// //
#include <boost/intrusive_ptr.hpp> #include <boost/intrusive_ptr.hpp>
#include <boost/functional/hash.hpp> #include <boost/container_hash/hash.hpp>
#include <boost/core/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
class base class base

View File

@@ -3,7 +3,7 @@
// https://www.boost.org/LICENSE_1_0.txt // https://www.boost.org/LICENSE_1_0.txt
#include <boost/smart_ptr/local_shared_ptr.hpp> #include <boost/smart_ptr/local_shared_ptr.hpp>
#include <boost/functional/hash.hpp> #include <boost/container_hash/hash.hpp>
#include <boost/core/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()

View File

@@ -9,7 +9,7 @@
// //
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/functional/hash.hpp> #include <boost/container_hash/hash.hpp>
#include <boost/core/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()

View File

@@ -9,7 +9,7 @@
// //
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/functional/hash.hpp> #include <boost/container_hash/hash.hpp>
#include <boost/core/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()

View File

@@ -9,7 +9,7 @@
// //
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/functional/hash.hpp> #include <boost/container_hash/hash.hpp>
#include <boost/core/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()

View File

@@ -4,7 +4,7 @@
#include <boost/weak_ptr.hpp> #include <boost/weak_ptr.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/functional/hash.hpp> #include <boost/container_hash/hash.hpp>
#include <boost/core/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()