2
0
mirror of https://github.com/boostorg/compat.git synced 2026-01-19 16:12:15 +00:00

11 Commits

Author SHA1 Message Date
Peter Dimov
bba8d5f101 Update CMakeLists.txt 2024-03-28 20:32:41 +02:00
Peter Dimov
56b776fc29 Update test/quick.cpp 2024-03-28 20:31:36 +02:00
Peter Dimov
0220855d9c Update ci.yml 2024-03-21 19:51:58 +02:00
Peter Dimov
91c2054151 Merge pull request #7 from cmazakas/missing-copyright
Add missing copyright to shared_lock_test.cpp
2024-03-21 19:48:13 +02:00
Christian Mazakas
6153916abe Add missing copyright to shared_lock_test.cpp 2024-03-21 10:41:17 -07:00
Peter Dimov
0008d02a62 Update ci.yml 2023-08-29 11:57:33 +03:00
Peter Dimov
0387e8afe1 Merge pull request #4 from ecatmur/gcc-13
Also suppress Wself-move under gcc 13
2023-08-29 02:50:54 +03:00
Ed Catmur
6292106e68 Update shared_lock_test.cpp 2023-08-28 15:51:11 -05:00
Ed Catmur
8f75ad2a75 Also suppress Wself-move under gcc 13
Compiling with gcc 13.1.0:

   ../libs/compat/test/shared_lock_test.cpp: In function 'void {anonymous}::move_assignment()':
   ../libs/compat/test/shared_lock_test.cpp:378:10: error: moving 'lock' of type '{anonymous}::shared_lock_type' {aka 'boost::compat::shared_lock<dummy_lock>'} to itself [-Werror=self-move]
     378 |     lock = std::move( lock );
         |     ~~~~~^~~~~~~~~~~~~~~~~~~
   ../libs/compat/test/shared_lock_test.cpp:378:10: note: remove 'std::move' call
   cc1plus: all warnings being treated as errors
2023-08-15 19:15:46 -05:00
Peter Dimov
f5da663cbc Add .appveyor.yml 2023-06-25 11:50:24 +03:00
Peter Dimov
8abbc6d979 Update latch.hpp 2023-06-25 11:47:43 +03:00
6 changed files with 112 additions and 16 deletions

56
.appveyor.yml Normal file
View File

@@ -0,0 +1,56 @@
# Copyright 2016-2023 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
version: 1.0.{build}-{branch}
shallow_clone: true
branches:
only:
- master
- develop
- /feature\/.*/
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-14.0
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
ADDRMD: 32,64
CXXSTD: 14,17,latest
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
ADDRMD: 32,64
CXXSTD: 14,17,latest
CXXFLAGS: /permissive-
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: clang-win
ADDRMD: 64
CXXSTD: 14,17,latest
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: clang-win
ADDRMD: 64
CXXSTD: 14,17,latest
install:
- set BOOST_BRANCH=develop
- if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
- 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
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\compat\
- python tools/boostdep/depinst/depinst.py compat
- cmd /c bootstrap
- b2 -d0 headers
build: off
test_script:
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
- if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
- if not "%CXXFLAGS%" == "" set CXXFLAGS=cxxflags=%CXXFLAGS%
- if "%CMAKE%%CMAKE_SUBDIR%%CMAKE_INSTALL%" == "" b2 -j3 libs/compat/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% %CXXFLAGS% variant=debug,release embed-manifest-via=linker

View File

@@ -55,6 +55,11 @@ jobs:
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-22.04
install: g++-12
- toolset: gcc-13
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-latest
container: ubuntu:23.04
install: g++-13
- toolset: clang
compiler: clang++-3.9
cxxstd: "03,11,14"
@@ -111,24 +116,42 @@ jobs:
- toolset: clang
compiler: clang++-13
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: clang-13
- toolset: clang
compiler: clang++-14
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: clang-14
- toolset: clang
compiler: clang++-15
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: clang-15
- toolset: clang
compiler: clang++-16
cxxstd: "03,11,14,17,20,2b"
container: ubuntu:23.04
os: ubuntu-latest
install: clang-16
- toolset: clang
compiler: clang++-17
cxxstd: "03,11,14,17,20,2b"
container: ubuntu:23.10
os: ubuntu-latest
install: clang-17
- toolset: clang
cxxstd: "03,11,14,17,2a"
os: macos-11
- toolset: clang
cxxstd: "03,11,14,17,20,2b"
os: macos-12
- toolset: clang
cxxstd: "03,11,14,17,20,2b"
os: macos-13
runs-on: ${{matrix.os}}
container: ${{matrix.container}}
@@ -144,11 +167,13 @@ jobs:
if: matrix.container
run: |
apt-get update
apt-get -y install sudo python git g++
apt-get -y install sudo python3 git g++
- name: Install packages
if: matrix.install
run: sudo apt-get -y install ${{matrix.install}}
run: |
sudo apt-get update
sudo apt-get -y install ${{matrix.install}}
- name: Setup Boost
run: |
@@ -169,7 +194,7 @@ jobs:
mkdir -p libs/$LIBRARY
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
./bootstrap.sh
./b2 -d0 headers
@@ -212,7 +237,7 @@ jobs:
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Boost
shell: cmd
@@ -251,11 +276,12 @@ jobs:
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
- os: macos-13
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install packages
if: matrix.install
@@ -299,11 +325,12 @@ jobs:
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
- os: macos-13
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install packages
if: matrix.install
@@ -357,11 +384,12 @@ jobs:
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
- os: macos-13
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install packages
if: matrix.install
@@ -415,7 +443,7 @@ jobs:
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Boost
shell: cmd
@@ -464,7 +492,7 @@ jobs:
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Boost
shell: cmd
@@ -531,7 +559,7 @@ jobs:
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Boost
shell: cmd

View File

@@ -15,6 +15,8 @@ target_include_directories(boost_compat INTERFACE include)
target_link_libraries(boost_compat
INTERFACE
Boost::assert
Boost::config
Boost::throw_exception
)
target_compile_features(boost_compat INTERFACE cxx_std_11)

View File

@@ -1,11 +1,11 @@
#ifndef BOOST_COMPAT_LATCH_HPP_INCLUDED
#define BOOST_COMPAT_LATCH_HPP_INCLUDED
// Copyright 2023 Peter Dimov.
// Copyright 2023 Christian Mazakas.
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_COMPAT_LATCH_HPP_INCLUDED
#define BOOST_COMPAT_LATCH_HPP_INCLUDED
#include <boost/assert.hpp>
#include <climits>

View File

@@ -3,6 +3,7 @@
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/compat/latch.hpp>
#include <boost/compat/shared_lock.hpp>
int main()
{

View File

@@ -1,3 +1,9 @@
// Copyright 2023 Peter Dimov.
// Copyright 2023 Christian Mazakas.
// Copyright 2023 Ed Catmur
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#ifdef _MSC_VER
#pragma warning(disable: 4530) // C++ exception handler used, but unwing semantics not enabled
#pragma warning(disable: 4577) // noexcept used with no exception handling mode specified
@@ -23,6 +29,9 @@
#ifdef __clang__
#pragma clang diagnostic ignored "-Wself-move"
#endif
#if defined(__GNUC__) && __GNUC__ >= 13
#pragma GCC diagnostic ignored "-Wself-move"
#endif
struct invalid_lock_use: public std::runtime_error
{