Compare commits

..

7 Commits

Author SHA1 Message Date
a2a5010e28 Update from hash_predef. 2025-02-03 08:30:35 -06:00
d64649d703 Add support for Tiny C Compiler (#138)
Adds support for detecting TCC by checking for __TINYC__ macro.
TCC pre-defines environment-specific macros similar to the ones
used by GCC and Clang so the rest of library works out of the box.
2025-02-03 06:29:44 -06:00
6f2bd13716 Update from hash_predef. 2025-02-02 23:07:45 -06:00
0727fa7ce3 Update from hash_predef, version 1.15.1. 2025-01-16 07:02:40 -06:00
e120d2e8f5 Add support for modular build structure. (#136) 2025-01-15 23:26:00 -06:00
fee1d9c646 Update from hash_predef, version 1.15.1. 2025-01-15 23:18:28 -06:00
1a76f0875f Update from hash_predef, version 1.15.1. 2025-01-14 21:02:34 -06:00
13 changed files with 381 additions and 126 deletions

View File

@ -1,5 +1,5 @@
# Copyright Mike Dev 2018 # Copyright Mike Dev 2018
# Copyright René Ferdinand Rivera Morell 2018-2023 # Copyright René Ferdinand Rivera Morell 2018-2025
# Distributed under the Boost Software License, Version 1.0. # Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at # See 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
@ -20,7 +20,7 @@ cmake_minimum_required( VERSION 3.5...3.999 )
# Don't set LANGUAGES as we are multi-language and header only, so it's # Don't set LANGUAGES as we are multi-language and header only, so it's
# irrelevant. # irrelevant.
set( BOOST_PREDEF_VERSION "1.15" ) set( BOOST_PREDEF_VERSION "1.16" )
project( boost_predef VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES NONE ) project( boost_predef VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES NONE )
# Simple INTERFACE, and header only, library target. # Simple INTERFACE, and header only, library target.

View File

@ -23,7 +23,8 @@ skip_commits:
environment: environment:
matrix: matrix:
# All the Visual Studio installs available on Appveyor # All the Visual Studio installs available on Appveyor
# - { job_name: 'VS 2019', TOOLSET: "msvc", TOOLSET_VERSION: '14.2', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' } - { job_name: 'VS 2022', TOOLSET: "msvc", TOOLSET_VERSION: '14.3', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' }
- { job_name: 'VS 2019', TOOLSET: "msvc", TOOLSET_VERSION: '14.2', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' }
- { job_name: 'VS 2017', TOOLSET: "msvc", TOOLSET_VERSION: '14.1', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' } - { job_name: 'VS 2017', TOOLSET: "msvc", TOOLSET_VERSION: '14.1', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' }
- { job_name: 'VS 2015', TOOLSET: "msvc", TOOLSET_VERSION: '14.0', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' } - { job_name: 'VS 2015', TOOLSET: "msvc", TOOLSET_VERSION: '14.0', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' }
- { job_name: 'VS 2013', TOOLSET: "msvc", TOOLSET_VERSION: '12.0', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' } - { job_name: 'VS 2013', TOOLSET: "msvc", TOOLSET_VERSION: '12.0', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' }
@ -34,10 +35,14 @@ environment:
- { job_name: 'MinGW-w64 7.3', TOOLSET: "gcc", CXXPATH: 'C:/mingw-w64/x86_64-7.3.0-posix-seh-rt_v5-rev0/mingw64/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' } - { job_name: 'MinGW-w64 7.3', TOOLSET: "gcc", CXXPATH: 'C:/mingw-w64/x86_64-7.3.0-posix-seh-rt_v5-rev0/mingw64/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' }
- { job_name: 'MinGW-w64 6.3', TOOLSET: "gcc", CXXPATH: 'C:/mingw-w64/x86_64-6.3.0-posix-seh-rt_v5-rev1/mingw64/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' } - { job_name: 'MinGW-w64 6.3', TOOLSET: "gcc", CXXPATH: 'C:/mingw-w64/x86_64-6.3.0-posix-seh-rt_v5-rev1/mingw64/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' }
# Cygwin versions available. # Cygwin versions available.
- { job_name: 'Cygwin 3.4.6 x64', TOOLSET: 'gcc', CXXPATH: 'C:/cygwin64/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' }
# - { job_name: 'Cygwin32 3.1.7', TOOLSET: 'gcc', CXXPATH: 'C:/cygwin/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' } # - { job_name: 'Cygwin32 3.1.7', TOOLSET: 'gcc', CXXPATH: 'C:/cygwin/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' }
# - { job_name: 'Cygwin64 3.1.7', TOOLSET: 'gcc', CXXPATH: 'C:/cygwin64/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' } # - { job_name: 'Cygwin64 3.1.7', TOOLSET: 'gcc', CXXPATH: 'C:/cygwin64/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' }
- { job_name: 'Cygwin32 3.0.7', TOOLSET: 'gcc', CXXPATH: 'C:/cygwin/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' } - { job_name: 'Cygwin32 3.0.7', TOOLSET: 'gcc', CXXPATH: 'C:/cygwin/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' }
- { job_name: 'Cygwin64 3.0.7', TOOLSET: 'gcc', CXXPATH: 'C:/cygwin64/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' } - { job_name: 'Cygwin64 3.0.7', TOOLSET: 'gcc', CXXPATH: 'C:/cygwin64/bin/g++.exe', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' }
# Clang-win versions available.
- { job_name: 'Clang 18 (VS2022)', TOOLSET: 'clang-win', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' }
- { job_name: 'Clang 9 (VS2015)', TOOLSET: 'clang-win', APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' }
platform: platform:
- x86 - x86
@ -77,10 +82,11 @@ for:
cd %APPVEYOR_BUILD_FOLDER%/test cd %APPVEYOR_BUILD_FOLDER%/test
%APPVEYOR_BUILD_FOLDER%/../b2-release/b2.exe --verbose-test -a toolset=%TOOLSET% %B2_ARGS% predef-info %APPVEYOR_BUILD_FOLDER%/../b2-release/b2.exe --verbose-test -a toolset=%TOOLSET% %B2_ARGS% predef-info
%APPVEYOR_BUILD_FOLDER%/../b2-release/b2.exe --debug-configuration -a toolset=%TOOLSET% %B2_ARGS% predef predef-headers %APPVEYOR_BUILD_FOLDER%/../b2-release/b2.exe --debug-configuration -a toolset=%TOOLSET% %B2_ARGS% predef predef-headers
# Windows MinGW & Cygwin job steps. # Windows MinGW, Cygwin, and Clang-win job steps.
- matrix: - matrix:
only: only:
- TOOLSET: 'gcc' - TOOLSET: 'gcc'
- TOOLSET: 'clang-win'
install: install:
- cmd: | - cmd: |
echo ">>>>> INSTALL B2 .." echo ">>>>> INSTALL B2 .."

View File

@ -24,14 +24,13 @@ pr:
include: include:
- develop - develop
variables: resources:
AZP: 1 containers:
AZP_REPO_DIR: $(Build.Repository.LocalPath) - { container: ubuntu_2404, image: 'ubuntu:24.04', options: '--name container -v /usr/bin/docker:/tmp/docker:ro' }
AZP_BRANCH: $(Build.SourceBranch) - { container: ubuntu_2204, image: 'ubuntu:22.04', options: '--name container -v /usr/bin/docker:/tmp/docker:ro' }
AZP_BRANCH_NAME: $(Build.SourceBranchName) # - { container: ubuntu_2004, image: 'ubuntu:20.04', options: '--name container -v /usr/bin/docker:/tmp/docker:ro' }
AZP_COMMIT: $(Build.SourceVersion) - { container: ubuntu_1804, image: 'ubuntu:18.04', options: '--name container -v /usr/bin/docker:/tmp/docker:ro' }
AZP_REPO: $(Build.Repository.Name) - { container: ubuntu_1604, image: 'ubuntu:16.04', options: '--name container -v /usr/bin/docker:/tmp/docker:ro' }
AZP_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)
stages: stages:
@ -41,26 +40,15 @@ stages:
- job: 'Linux' - job: 'Linux'
strategy: strategy:
matrix: matrix:
GCC 12 (GNU): { CXX: g++-12, PACKAGES: g++-12, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc, B2_ARGS: 'cxxstd=03,11,14,17,20 cxxstd-dialect=gnu' } GCC 14 (GNU): { CXX: g++-14, PACKAGES: g++-14, VM_IMAGE: 'ubuntu-24.04', TOOLSET: gcc, B2_ARGS: 'cxxstd=03,11,14,17,20 cxxstd-dialect=gnu' }
GCC 12 (ISO): { CXX: g++-12, PACKAGES: g++-12, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc, B2_ARGS: 'cxxstd=03,11,14,17,20 cxxstd-dialect=iso' } GCC 14 (ISO): { CXX: g++-14, PACKAGES: g++-14, VM_IMAGE: 'ubuntu-24.04', TOOLSET: gcc, B2_ARGS: 'cxxstd=03,11,14,17,20 cxxstd-dialect=iso' }
GCC 12: { CXX: g++-12, PACKAGES: g++-12, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc } GCC 13: { CXX: g++-13, PACKAGES: g++-13, VM_IMAGE: 'ubuntu-24.04', TOOLSET: gcc }
GCC 11: { CXX: g++-11, PACKAGES: g++-11, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc } GCC 12: { CXX: g++-12, PACKAGES: g++-12, VM_IMAGE: 'ubuntu-24.04', TOOLSET: gcc }
GCC 10: { CXX: g++-10, PACKAGES: g++-10, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc } GCC 11: { CXX: g++-11, PACKAGES: g++-11, VM_IMAGE: 'ubuntu-24.04', TOOLSET: gcc }
GCC 9: { CXX: g++-9, PACKAGES: g++-9, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc } GCC 10: { CXX: g++-10, PACKAGES: g++-10, VM_IMAGE: 'ubuntu-24.04', TOOLSET: gcc }
GCC 8: { CXX: g++-8, PACKAGES: g++-8, VM_IMAGE: 'ubuntu-20.04', TOOLSET: gcc } GCC 9: { CXX: g++-9, PACKAGES: g++-9, VM_IMAGE: 'ubuntu-24.04', TOOLSET: gcc }
GCC 7: { CXX: g++-7, PACKAGES: g++-7, VM_IMAGE: 'ubuntu-20.04', TOOLSET: gcc } Clang 18: { CXX: clang++-18, PACKAGES: clang-18, LLVM_OS: noble, LLVM_VER: 18, VM_IMAGE: 'ubuntu-24.04', TOOLSET: clang }
Clang 15: { CXX: clang++-15, PACKAGES: clang-15, LLVM_OS: jammy, LLVM_VER: 13, VM_IMAGE: 'ubuntu-22.04', TOOLSET: clang } Clang 17: { CXX: clang++-17, PACKAGES: clang-17, LLVM_OS: noble, LLVM_VER: 17, VM_IMAGE: 'ubuntu-24.04', TOOLSET: clang }
Clang 14: { CXX: clang++-14, PACKAGES: clang-14, LLVM_OS: jammy, LLVM_VER: 13, VM_IMAGE: 'ubuntu-22.04', TOOLSET: clang }
Clang 13: { CXX: clang++-13, PACKAGES: clang-13, LLVM_OS: jammy, LLVM_VER: 13, VM_IMAGE: 'ubuntu-22.04', TOOLSET: clang }
Clang 12: { CXX: clang++-12, PACKAGES: clang-12, LLVM_OS: focal, LLVM_VER: 12, VM_IMAGE: 'ubuntu-20.04', TOOLSET: clang }
Clang 11: { CXX: clang++-11, PACKAGES: clang-11, LLVM_OS: focal, LLVM_VER: 11, VM_IMAGE: 'ubuntu-20.04', TOOLSET: clang }
Clang 10: { CXX: clang++-10, PACKAGES: clang-10, LLVM_OS: focal, LLVM_VER: 10, VM_IMAGE: 'ubuntu-20.04', TOOLSET: clang }
Clang 9: { CXX: clang++-9, PACKAGES: clang-9, LLVM_OS: focal, LLVM_VER: 9, VM_IMAGE: 'ubuntu-20.04', TOOLSET: clang }
# Ubuntu 18.04 is deprecated.
# Clang 8: { CXX: clang++-8, PACKAGES: clang-8, LLVM_OS: bionic, LLVM_VER: 8, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
# Clang 7: { CXX: clang++-7, PACKAGES: clang-7, LLVM_OS: bionic, LLVM_VER: 7, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
# Clang 6.0: { CXX: clang++-6.0, PACKAGES: clang-6.0, LLVM_OS: bionic, LLVM_VER: 6.0, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
# Clang 5.0: { CXX: clang++-5.0, PACKAGES: clang-5.0, LLVM_OS: bionic, LLVM_VER: 5.0, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
pool: pool:
vmImage: $(VM_IMAGE) vmImage: $(VM_IMAGE)
steps: steps:
@ -92,24 +80,11 @@ stages:
- job: 'macOS' - job: 'macOS'
strategy: strategy:
matrix: matrix:
Xcode 13.4.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.4.1.app, VM_IMAGE: 'macOS-12'} Xcode 16.0: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_16.0.app, VM_IMAGE: 'macOS-15'}
Xcode 13.3.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.3.1.app, VM_IMAGE: 'macOS-12'} Xcode 15.4: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_15.4.app, VM_IMAGE: 'macOS-14'}
Xcode 13.2.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.2.1.app, VM_IMAGE: 'macOS-11'} Xcode 14.3.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_14.3.1.app, VM_IMAGE: 'macOS-13'}
Xcode 13.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.1.app, VM_IMAGE: 'macOS-12'} Xcode 14.2: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_14.2.app, VM_IMAGE: 'macOS-13'}
Xcode 13.0: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.0.app, VM_IMAGE: 'macOS-11'} Xcode 14.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_14.1.app, VM_IMAGE: 'macOS-13'}
Xcode 12.5.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.4.app, VM_IMAGE: 'macOS-11'}
Xcode 12.4: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.4.app, VM_IMAGE: 'macOS-11'}
# macOS-10.15 is deprecated.
# Xcode 12.3: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.3.app, VM_IMAGE: 'macOS-10.15'}
# Xcode 12.2: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.2.app, VM_IMAGE: 'macOS-10.15'}
# Xcode 12.1.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.1.1.app, VM_IMAGE: 'macOS-10.15'}
# Xcode 12.0.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.0.1.app, VM_IMAGE: 'macOS-10.15'}
# Xcode 11.7: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.7.app, VM_IMAGE: 'macOS-10.15'}
# Xcode 11.6: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.6.app, VM_IMAGE: 'macOS-10.15'}
# Xcode 11.5: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.5.app, VM_IMAGE: 'macOS-10.15'}
# Xcode 11.4.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.4.1.app, VM_IMAGE: 'macOS-10.15'}
# Xcode 11.3.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.3.1.app, VM_IMAGE: 'macOS-10.15'}
# Xcode 11.2.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.2.1.app, VM_IMAGE: 'macOS-10.15'}
pool: pool:
vmImage: $(VM_IMAGE) vmImage: $(VM_IMAGE)
steps: steps:
@ -213,8 +188,112 @@ stages:
%BUILD_SOURCESDIRECTORY%/../b2-release/b2.exe --debug-configuration -a toolset=%TOOLSET% %B2_ARGS% predef predef-headers %BUILD_SOURCESDIRECTORY%/../b2-release/b2.exe --debug-configuration -a toolset=%TOOLSET% %B2_ARGS% predef predef-headers
displayName: Test displayName: Test
- job: 'Co_Linux'
strategy:
matrix:
GCC 8: {CXX: g++-8, TOOLSET: gcc, PACKAGES: g++-8, CONTAINER: "ubuntu_1804"}
GCC 7: {CXX: g++-7, TOOLSET: gcc, PACKAGES: g++-7, CONTAINER: "ubuntu_1804"}
GCC 6: {CXX: g++-6, TOOLSET: gcc, PACKAGES: g++-6, CONTAINER: "ubuntu_1804"}
GCC 5: {CXX: g++-5, TOOLSET: gcc, PACKAGES: g++-5, CONTAINER: "ubuntu_1804"}
GCC 4.9: {CXX: g++-4.9, TOOLSET: gcc, PACKAGES: g++-4.9, CONTAINER: "ubuntu_1604"}
GCC 4.8: {CXX: g++-4.8, TOOLSET: gcc, PACKAGES: g++-4.8, CONTAINER: "ubuntu_1804"}
Clang 16: {CXX: clang++-16, TOOLSET: clang, PACKAGES: clang-16, LLVM_VER: 16, LLVM_OS: 'focal', CONTAINER: "ubuntu_2204"}
Clang 15: {CXX: clang++-15, TOOLSET: clang, PACKAGES: clang-15, LLVM_VER: 15, LLVM_OS: 'focal', CONTAINER: "ubuntu_2204"}
Clang 14: {CXX: clang++-14, TOOLSET: clang, PACKAGES: clang-14, LLVM_VER: 14, LLVM_OS: 'focal', CONTAINER: "ubuntu_2204"}
Clang 13: {CXX: clang++-13, TOOLSET: clang, PACKAGES: clang-13, LLVM_VER: 13, LLVM_OS: 'focal', CONTAINER: "ubuntu_2204"}
Clang 12: {CXX: clang++-12, TOOLSET: clang, PACKAGES: clang-12, LLVM_VER: 12, LLVM_OS: 'focal', CONTAINER: "ubuntu_2204"}
Clang 11: {CXX: clang++-11, TOOLSET: clang, PACKAGES: clang-11, LLVM_VER: 11, LLVM_OS: 'focal', CONTAINER: "ubuntu_2204"}
Clang 10: {CXX: clang++-10, TOOLSET: clang, PACKAGES: clang-10, CONTAINER: "ubuntu_1804"}
Clang 9: {CXX: clang++-9, TOOLSET: clang, PACKAGES: clang-9, CONTAINER: "ubuntu_1804"}
Clang 8: {CXX: clang++-8, TOOLSET: clang, PACKAGES: clang-8, CONTAINER: "ubuntu_1804"}
Clang 7: {CXX: clang++-7, TOOLSET: clang, PACKAGES: clang-7, CONTAINER: "ubuntu_1804"}
Clang 6: {CXX: clang++-6.0, TOOLSET: clang, PACKAGES: clang-6.0, CONTAINER: "ubuntu_1804"}
Clang 5: {CXX: clang++-5.0, TOOLSET: clang, PACKAGES: clang-5.0, LLVM_VER: 5.0, LLVM_OS: 'bionic', CONTAINER: "ubuntu_1804"}
Clang 4: {CXX: clang++-4.0, TOOLSET: clang, PACKAGES: clang-4.0, LLVM_VER: 4.0, LLVM_OS: 'xenial', CONTAINER: "ubuntu_1604"}
Clang 3.9: {CXX: clang++-3.9, TOOLSET: clang, PACKAGES: clang-3.9, LLVM_VER: 3.9, LLVM_OS: 'xenial', CONTAINER: "ubuntu_1604"}
Clang 3.8: {CXX: clang++-3.8, TOOLSET: clang, PACKAGES: clang-3.8, LLVM_VER: 3.8, LLVM_OS: 'xenial', CONTAINER: "ubuntu_1604"}
Clang 3.7: {CXX: clang++-3.7, TOOLSET: clang, PACKAGES: clang-3.7, CONTAINER: "ubuntu_1604"}
Clang 3.6: {CXX: clang++-3.6, TOOLSET: clang, PACKAGES: clang-3.6, CONTAINER: "ubuntu_1604"}
pool:
vmImage: 'ubuntu-20.04'
container: $[ variables['CONTAINER'] ]
steps:
- script: |
which docker
/tmp/docker exec -t -u root container mv /etc/sudoers /etc/sudoers.bak
/tmp/docker exec -t -u root container apt-get -qq update
/tmp/docker exec -t -u root container apt-get -qq install sudo
/tmp/docker exec -t -u root container mv /etc/sudoers.bak /etc/sudoers
displayName: Sudorize
- bash: |
set -e
uname -a
./tools/ci/linux-cxx-install.sh
displayName: 'Install CXX'
- bash: |
set -e
pushd ${HOME}
wget -nv https://github.com/bfgroup/b2/archive/release.tar.gz
tar -zxf release.tar.gz
cd b2-release
./bootstrap.sh --cxx=${CXX} ${TOOLSET}
CXX_PATH=`which ${CXX}`
echo "using ${TOOLSET} : : ${CXX_PATH} ;" > "${HOME}/user-config.jam"
sudo ./b2 --debug-configuration "--user-config=${HOME}/user-config.jam" install toolset=${TOOLSET}
popd
displayName: 'Install B2'
- bash: |
set -e
pushd test
b2 --verbose-test "--user-config=${HOME}/user-config.jam" -a toolset=${TOOLSET} ${B2_ARGS} predef-info
b2 --debug-configuration "--user-config=${HOME}/user-config.jam" -a toolset=${TOOLSET} ${B2_ARGS} predef predef-headers
popd
displayName: Test
- stage: Extra
dependsOn: [Test]
jobs:
- job: 'Linux'
strategy:
matrix:
TinyCC: {
EXE: tcc, PACKAGES: tcc, VM_IMAGE: 'ubuntu-latest',
TOOLSET: cc, VERSION: "tcc~0.9.27",
B2_CONFIG: '<cflags>"-std=c11" <-soname>-soname',
B2_ARGS: 'c' }
pool:
vmImage: $(VM_IMAGE)
continueOnError: 'true'
steps:
- bash: |
set -e
uname -a
./tools/ci/linux-cxx-install.sh
displayName: 'Install CXX'
- bash: |
set -e
pushd ${HOME}
wget -nv https://github.com/bfgroup/b2/archive/main.tar.gz
tar -zxf main.tar.gz
cd b2-main
./bootstrap.sh
sudo ./b2 install
popd
displayName: 'Install B2'
- bash: |
set -e
EXE_PATH=`which ${EXE}`
echo "using ${TOOLSET} : ${VERSION} : ${EXE_PATH} : ${B2_CONFIG} ;" > ${HOME}/user-config.jam
pushd test
b2 --verbose-test -a toolset=${TOOLSET} ${B2_ARGS}
b2 --debug-configuration -a toolset=${TOOLSET} ${B2_ARGS}
popd
displayName: Test
- stage: WebsiteUpdate - stage: WebsiteUpdate
displayName: 'Website Update' displayName: 'Website Update'
dependsOn: [Test]
condition: and(in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/develop'), eq(variables['Build.Repository.Name'], 'grafikrobot/hash-predef')) condition: and(in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/develop'), eq(variables['Build.Repository.Name'], 'grafikrobot/hash-predef'))
jobs: jobs:

View File

@ -3,6 +3,8 @@
# (See accompanying file LICENSE_1_0.txt or copy at # (See 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.2 ;
#| #|
This B2 project provides support for using the Predef library externally as This B2 project provides support for using the Predef library externally as
a standalone project. To use externally you would need a `use-project` a standalone project. To use externally you would need a `use-project`
@ -15,14 +17,10 @@ exe my_thing : main.cpp : <dependency>/boost/predef ;
---- ----
|# |#
import-search tools/check ;
import project ; import project ;
import modules ; import modules ;
path-constant PREDEF_ROOT : . ;
modules.poke : BOOST_BUILD_PATH
: $(PREDEF_ROOT)/tools/check [ modules.peek : BOOST_BUILD_PATH ] ;
project /boost/predef project /boost/predef
: common-requirements : common-requirements
<include>include <include>include

View File

@ -7,6 +7,10 @@ http://www.boost.org/LICENSE_1_0.txt)
= History = History
== 1.16.0
* Add detection for Tiny C Compiler (TCC). (from Kornel Ponikwicki)
== 1.15.1 == 1.15.1
* Guard against using the obsolete `predef/check/predef.jam` B2 module. * Guard against using the obsolete `predef/check/predef.jam` B2 module.

View File

@ -1022,9 +1022,10 @@ pre.rouge .ss {
<li><a href="#_boost_comp_pgi">4.2.25. <code>BOOST_COMP_PGI</code></a></li> <li><a href="#_boost_comp_pgi">4.2.25. <code>BOOST_COMP_PGI</code></a></li>
<li><a href="#_boost_comp_sgi">4.2.26. <code>BOOST_COMP_SGI</code></a></li> <li><a href="#_boost_comp_sgi">4.2.26. <code>BOOST_COMP_SGI</code></a></li>
<li><a href="#_boost_comp_sunpro">4.2.27. <code>BOOST_COMP_SUNPRO</code></a></li> <li><a href="#_boost_comp_sunpro">4.2.27. <code>BOOST_COMP_SUNPRO</code></a></li>
<li><a href="#_boost_comp_tendra">4.2.28. <code>BOOST_COMP_TENDRA</code></a></li> <li><a href="#_boost_comp_tcc">4.2.28. <code>BOOST_COMP_TCC</code></a></li>
<li><a href="#_boost_comp_msvc">4.2.29. <code>BOOST_COMP_MSVC</code></a></li> <li><a href="#_boost_comp_tendra">4.2.29. <code>BOOST_COMP_TENDRA</code></a></li>
<li><a href="#_boost_comp_watcom">4.2.30. <code>BOOST_COMP_WATCOM</code></a></li> <li><a href="#_boost_comp_msvc">4.2.30. <code>BOOST_COMP_MSVC</code></a></li>
<li><a href="#_boost_comp_watcom">4.2.31. <code>BOOST_COMP_WATCOM</code></a></li>
</ul> </ul>
</li> </li>
<li><a href="#_boost_lang_language_standards_macros">4.3. <code>BOOST_LANG</code> language standards macros</a> <li><a href="#_boost_lang_language_standards_macros">4.3. <code>BOOST_LANG</code> language standards macros</a>
@ -1140,24 +1141,25 @@ pre.rouge .ss {
</li> </li>
<li><a href="#_history">6. History</a> <li><a href="#_history">6. History</a>
<ul class="sectlevel2"> <ul class="sectlevel2">
<li><a href="#_1_15_1">6.1. 1.15.1</a></li> <li><a href="#_1_16_0">6.1. 1.16.0</a></li>
<li><a href="#_1_15_0">6.2. 1.15.0</a></li> <li><a href="#_1_15_1">6.2. 1.15.1</a></li>
<li><a href="#_1_14_0">6.3. 1.14.0</a></li> <li><a href="#_1_15_0">6.3. 1.15.0</a></li>
<li><a href="#_1_13_1">6.4. 1.13.1</a></li> <li><a href="#_1_14_0">6.4. 1.14.0</a></li>
<li><a href="#_1_13">6.5. 1.13</a></li> <li><a href="#_1_13_1">6.5. 1.13.1</a></li>
<li><a href="#_1_12">6.6. 1.12</a></li> <li><a href="#_1_13">6.6. 1.13</a></li>
<li><a href="#_1_11">6.7. 1.11</a></li> <li><a href="#_1_12">6.7. 1.12</a></li>
<li><a href="#_1_10">6.8. 1.10</a></li> <li><a href="#_1_11">6.8. 1.11</a></li>
<li><a href="#_1_9">6.9. 1.9</a></li> <li><a href="#_1_10">6.9. 1.10</a></li>
<li><a href="#_1_8">6.10. 1.8</a></li> <li><a href="#_1_9">6.10. 1.9</a></li>
<li><a href="#_1_7">6.11. 1.7</a></li> <li><a href="#_1_8">6.11. 1.8</a></li>
<li><a href="#_1_6">6.12. 1.6</a></li> <li><a href="#_1_7">6.12. 1.7</a></li>
<li><a href="#_1_5">6.13. 1.5</a></li> <li><a href="#_1_6">6.13. 1.6</a></li>
<li><a href="#_1_4_1">6.14. 1.4.1</a></li> <li><a href="#_1_5">6.14. 1.5</a></li>
<li><a href="#_1_4">6.15. 1.4</a></li> <li><a href="#_1_4_1">6.15. 1.4.1</a></li>
<li><a href="#_1_3">6.16. 1.3</a></li> <li><a href="#_1_4">6.16. 1.4</a></li>
<li><a href="#_1_2">6.17. 1.2</a></li> <li><a href="#_1_3">6.17. 1.3</a></li>
<li><a href="#_1_1">6.18. 1.1</a></li> <li><a href="#_1_2">6.18. 1.2</a></li>
<li><a href="#_1_1">6.19. 1.1</a></li>
</ul> </ul>
</li> </li>
<li><a href="#_to_do">7. To Do</a></li> <li><a href="#_to_do">7. To Do</a></li>
@ -3961,7 +3963,36 @@ Version number available as major, minor, and patch.</p>
</table> </table>
</div> </div>
<div class="sect3"> <div class="sect3">
<h4 id="_boost_comp_tendra"><a class="anchor" href="#_boost_comp_tendra"></a>4.2.28. <code>BOOST_COMP_TENDRA</code></h4> <h4 id="_boost_comp_tcc"><a class="anchor" href="#_boost_comp_tcc"></a>4.2.28. <code>BOOST_COMP_TCC</code></h4>
<div class="paragraph">
<p><a href="https://en.wikipedia.org/wiki/Tiny_C_Compiler">Tiny C Compiler</a> (TinyCC or TCC for short).
Version number available as major, minor, and patch.</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Symbol</th>
<th class="tableblock halign-left valign-top">Version</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>__TINYC__</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>detection</strong></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>__TINYC__</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">0.9.P</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_boost_comp_tendra"><a class="anchor" href="#_boost_comp_tendra"></a>4.2.29. <code>BOOST_COMP_TENDRA</code></h4>
<div class="paragraph"> <div class="paragraph">
<p><a href="http://en.wikipedia.org/wiki/TenDRA_Compiler">TenDRA C/C++</a> compiler.</p> <p><a href="http://en.wikipedia.org/wiki/TenDRA_Compiler">TenDRA C/C++</a> compiler.</p>
</div> </div>
@ -3985,7 +4016,7 @@ Version number available as major, minor, and patch.</p>
</table> </table>
</div> </div>
<div class="sect3"> <div class="sect3">
<h4 id="_boost_comp_msvc"><a class="anchor" href="#_boost_comp_msvc"></a>4.2.29. <code>BOOST_COMP_MSVC</code></h4> <h4 id="_boost_comp_msvc"><a class="anchor" href="#_boost_comp_msvc"></a>4.2.30. <code>BOOST_COMP_MSVC</code></h4>
<div class="paragraph"> <div class="paragraph">
<p><a href="http://en.wikipedia.org/wiki/Visual_studio">Microsoft Visual C/C++</a> compiler. <p><a href="http://en.wikipedia.org/wiki/Visual_studio">Microsoft Visual C/C++</a> compiler.
Version number available as major, minor, and patch.</p> Version number available as major, minor, and patch.</p>
@ -4032,7 +4063,7 @@ compiler version number directly, i.e. the _MSC_VER number.
</div> </div>
</div> </div>
<div class="sect3"> <div class="sect3">
<h4 id="_boost_comp_watcom"><a class="anchor" href="#_boost_comp_watcom"></a>4.2.30. <code>BOOST_COMP_WATCOM</code></h4> <h4 id="_boost_comp_watcom"><a class="anchor" href="#_boost_comp_watcom"></a>4.2.31. <code>BOOST_COMP_WATCOM</code></h4>
<div class="paragraph"> <div class="paragraph">
<p><a href="http://en.wikipedia.org/wiki/Watcom">Watcom C++</a> compiler. <p><a href="http://en.wikipedia.org/wiki/Watcom">Watcom C++</a> compiler.
Version number available as major, and minor.</p> Version number available as major, and minor.</p>
@ -7354,7 +7385,17 @@ expressions. It defaults to "c++", but can be any of: "c", "cpp",
<h2 id="_history"><a class="anchor" href="#_history"></a>6. History</h2> <h2 id="_history"><a class="anchor" href="#_history"></a>6. History</h2>
<div class="sectionbody"> <div class="sectionbody">
<div class="sect2"> <div class="sect2">
<h3 id="_1_15_1"><a class="anchor" href="#_1_15_1"></a>6.1. 1.15.1</h3> <h3 id="_1_16_0"><a class="anchor" href="#_1_16_0"></a>6.1. 1.16.0</h3>
<div class="ulist">
<ul>
<li>
<p>Add detection for Tiny C Compiler (TCC). (from Kornel Ponikwicki)</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="_1_15_1"><a class="anchor" href="#_1_15_1"></a>6.2. 1.15.1</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7368,7 +7409,7 @@ Instead of using the current <code>predef/tools/check/predef.jam</code> module.<
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_15_0"><a class="anchor" href="#_1_15_0"></a>6.2. 1.15.0</h3> <h3 id="_1_15_0"><a class="anchor" href="#_1_15_0"></a>6.3. 1.15.0</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7378,7 +7419,7 @@ Instead of using the current <code>predef/tools/check/predef.jam</code> module.<
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_14_0"><a class="anchor" href="#_1_14_0"></a>6.3. 1.14.0</h3> <h3 id="_1_14_0"><a class="anchor" href="#_1_14_0"></a>6.4. 1.14.0</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7388,7 +7429,7 @@ Instead of using the current <code>predef/tools/check/predef.jam</code> module.<
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_13_1"><a class="anchor" href="#_1_13_1"></a>6.4. 1.13.1</h3> <h3 id="_1_13_1"><a class="anchor" href="#_1_13_1"></a>6.5. 1.13.1</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7404,7 +7445,7 @@ Instead of using the current <code>predef/tools/check/predef.jam</code> module.<
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_13"><a class="anchor" href="#_1_13"></a>6.5. 1.13</h3> <h3 id="_1_13"><a class="anchor" href="#_1_13"></a>6.6. 1.13</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7423,7 +7464,7 @@ Instead of using the current <code>predef/tools/check/predef.jam</code> module.<
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_12"><a class="anchor" href="#_1_12"></a>6.6. 1.12</h3> <h3 id="_1_12"><a class="anchor" href="#_1_12"></a>6.7. 1.12</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7452,7 +7493,7 @@ Initial implementation inspired by submission from Mikhail Komarov.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_11"><a class="anchor" href="#_1_11"></a>6.7. 1.11</h3> <h3 id="_1_11"><a class="anchor" href="#_1_11"></a>6.8. 1.11</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7480,7 +7521,7 @@ Initial implementation inspired by submission from Mikhail Komarov.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_10"><a class="anchor" href="#_1_10"></a>6.8. 1.10</h3> <h3 id="_1_10"><a class="anchor" href="#_1_10"></a>6.9. 1.10</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7505,7 +7546,7 @@ removed in a future release.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_9"><a class="anchor" href="#_1_9"></a>6.9. 1.9</h3> <h3 id="_1_9"><a class="anchor" href="#_1_9"></a>6.10. 1.9</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7518,7 +7559,7 @@ removed in a future release.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_8"><a class="anchor" href="#_1_8"></a>6.10. 1.8</h3> <h3 id="_1_8"><a class="anchor" href="#_1_8"></a>6.11. 1.8</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7540,7 +7581,7 @@ removed in a future release.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_7"><a class="anchor" href="#_1_7"></a>6.11. 1.7</h3> <h3 id="_1_7"><a class="anchor" href="#_1_7"></a>6.12. 1.7</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7556,7 +7597,7 @@ removed in a future release.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_6"><a class="anchor" href="#_1_6"></a>6.12. 1.6</h3> <h3 id="_1_6"><a class="anchor" href="#_1_6"></a>6.13. 1.6</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7580,7 +7621,7 @@ Baratov)</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_5"><a class="anchor" href="#_1_5"></a>6.13. 1.5</h3> <h3 id="_1_5"><a class="anchor" href="#_1_5"></a>6.14. 1.5</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7599,7 +7640,7 @@ version instead of the varied product versions.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_4_1"><a class="anchor" href="#_1_4_1"></a>6.14. 1.4.1</h3> <h3 id="_1_4_1"><a class="anchor" href="#_1_4_1"></a>6.15. 1.4.1</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7612,7 +7653,7 @@ version instead of the varied product versions.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_4"><a class="anchor" href="#_1_4"></a>6.15. 1.4</h3> <h3 id="_1_4"><a class="anchor" href="#_1_4"></a>6.16. 1.4</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7633,7 +7674,7 @@ use cases. And changed the BBv2 check support to use compile only checks.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_3"><a class="anchor" href="#_1_3"></a>6.16. 1.3</h3> <h3 id="_1_3"><a class="anchor" href="#_1_3"></a>6.17. 1.3</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7658,7 +7699,7 @@ use cases. And changed the BBv2 check support to use compile only checks.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_2"><a class="anchor" href="#_1_2"></a>6.17. 1.2</h3> <h3 id="_1_2"><a class="anchor" href="#_1_2"></a>6.18. 1.2</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
@ -7682,7 +7723,7 @@ checks.</p>
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_1_1"><a class="anchor" href="#_1_1"></a>6.18. 1.1</h3> <h3 id="_1_1"><a class="anchor" href="#_1_1"></a>6.19. 1.1</h3>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>

View File

@ -652,6 +652,8 @@ include::../include/boost/predef/compiler/sgi_mipspro.h[tag=reference]
include::../include/boost/predef/compiler/sunpro.h[tag=reference] include::../include/boost/predef/compiler/sunpro.h[tag=reference]
include::../include/boost/predef/compiler/tcc.h[tag=reference]
include::../include/boost/predef/compiler/tendra.h[tag=reference] include::../include/boost/predef/compiler/tendra.h[tag=reference]
include::../include/boost/predef/compiler/visualc.h[tag=reference] include::../include/boost/predef/compiler/visualc.h[tag=reference]

View File

@ -37,6 +37,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#include <boost/predef/compiler/pgi.h> #include <boost/predef/compiler/pgi.h>
#include <boost/predef/compiler/sgi_mipspro.h> #include <boost/predef/compiler/sgi_mipspro.h>
#include <boost/predef/compiler/sunpro.h> #include <boost/predef/compiler/sunpro.h>
#include <boost/predef/compiler/tcc.h>
#include <boost/predef/compiler/tendra.h> #include <boost/predef/compiler/tendra.h>
#include <boost/predef/compiler/visualc.h> #include <boost/predef/compiler/visualc.h>
#include <boost/predef/compiler/watcom.h> #include <boost/predef/compiler/watcom.h>

View File

@ -11,6 +11,7 @@ http://www.boost.org/LICENSE_1_0.txt)
/* Other compilers that emulate this one need to be detected first. */ /* Other compilers that emulate this one need to be detected first. */
#include <boost/predef/compiler/clang.h> #include <boost/predef/compiler/clang.h>
#include <boost/predef/compiler/tcc.h>
#include <boost/predef/version_number.h> #include <boost/predef/version_number.h>
#include <boost/predef/make.h> #include <boost/predef/make.h>

View File

@ -0,0 +1,85 @@
/*
Copyright Kornel Ponikwicki 2025
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_COMPILER_TCC_H
#define BOOST_PREDEF_COMPILER_TCC_H
#include <boost/predef/version_number.h>
#include <boost/predef/make.h>
/* tag::reference[]
= `BOOST_COMP_TCC`
https://en.wikipedia.org/wiki/Tiny_C_Compiler[Tiny C Compiler] (TinyCC or TCC for short).
Version number available as major, minor, and patch.
[options="header"]
|===
| {predef_symbol} | {predef_version}
| `+__TINYC__+` | {predef_detection}
| `+__TINYC__+` | 0.9.P
|===
*/ // end::reference[]
#define BOOST_COMP_TCC BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__TINYC__) && !defined(BOOST_COMP_TCC_DETECTION)
/* Helper macros for checking if __TINYC__ expands to any value */
# define _BOOST_COMP_TCC_HAS_VALUE(VALUE) (_BOOST_COMP_TCC_EXPAND(VALUE) != 1)
# define _BOOST_COMP_TCC_EXPAND(VALUE) _BOOST_COMP_TCC_CONCAT(VALUE)
# define _BOOST_COMP_TCC_CONCAT(VALUE) (VALUE ## 1)
/*
TCC version is defined in __TINYC__ as {MINOR}{PATCH},
meaning that 0.9.27 would be 927 (0 for {MAJOR} is skipped).
Before 0.9.26 macro was defined but not set to any value.
Since TCC was always released under versions 0.9.x
we can assume that said macro either ranges between 926 and 999
or that the version is at least 0.9.0.
This will, of course, break if {MAJOR} or {MINOR} changes,
which has never happened (as of January 2025).
*/
# if _BOOST_COMP_TCC_HAS_VALUE(__TINYC__)
# if (__TINYC__ < 926 || __TINYC__ > 999)
# error "Cannot determine TCC version from __TINYC__"
# endif
# define BOOST_COMP_TCC_DETECTION BOOST_VERSION_NUMBER(\
0,\
__TINYC__/100,\
__TINYC__%100)
# else
# define BOOST_COMP_TCC_DETECTION BOOST_VERSION_NUMBER(0,9,0)
# endif
/* We will not need these macros anymore */
# undef _BOOST_COMP_TCC_HAS_VALUE
# undef _BOOST_COMP_TCC_EXPAND
# undef _BOOST_COMP_TCC_CONCAT
#endif
#ifdef BOOST_COMP_TCC_DETECTION
# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
# define BOOST_COMP_TCC_EMULATED BOOST_COMP_TCC_DETECTION
# else
# undef BOOST_COMP_TCC
# define BOOST_COMP_TCC BOOST_COMP_TCC_DETECTION
# endif
# define BOOST_COMP_TCC_AVAILABLE
# include <boost/predef/detail/comp_detected.h>
#endif
#define BOOST_COMP_TCC_NAME "Tiny C Compiler"
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_TCC,BOOST_COMP_TCC_NAME)
#ifdef BOOST_COMP_TCC_EMULATED
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_TCC_EMULATED,BOOST_COMP_TCC_NAME)
#endif

View File

@ -1,5 +1,5 @@
/* /*
Copyright Rene Rivera 2015-2016 Copyright Rene Rivera 2015-2025
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See 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)
@ -10,6 +10,6 @@ http://www.boost.org/LICENSE_1_0.txt)
#include <boost/predef/version_number.h> #include <boost/predef/version_number.h>
#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,15,1) #define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,16,0)
#endif #endif

View File

@ -3,6 +3,7 @@
# (See accompanying file LICENSE_1_0.txt or copy at # (See 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)
import-search ../tools/check ;
import predef : require check : predef-require predef-check ; import predef : require check : predef-require predef-check ;
import common ; import common ;
import path ; import path ;
@ -17,13 +18,22 @@ project
using testing ; using testing ;
test-suite predef-info : alias predef-info-c :
[ run info_as_cpp.cpp : : : <test-info>always_show_run_output ]
[ run info_as_c.c : : : <test-info>always_show_run_output ] [ run info_as_c.c : : : <test-info>always_show_run_output ]
[ run info_as_objcpp.mm : : : <test-info>always_show_run_output <conditional>@objc ]
[ run info_as_objc.m : : : <test-info>always_show_run_output <conditional>@objc ]
; ;
alias predef-info-cpp :
[ run info_as_cpp.cpp : : : <test-info>always_show_run_output ]
;
alias predef-info-objc :
[ run info_as_objcpp.mm : : : <test-info>always_show_run_output ]
[ run info_as_objc.m : : : <test-info>always_show_run_output ]
: <conditional>@objc
;
alias predef-info : predef-info-c predef-info-cpp predef-info-objc ;
rule objc ( props * ) rule objc ( props * )
{ {
if ! ( <target-os>darwin in $(props) ) if ! ( <target-os>darwin in $(props) )
@ -32,7 +42,7 @@ rule objc ( props * )
} }
} }
test-suite predef : alias predef :
[ run version.cpp ] [ run version.cpp ]
[ run make.cpp ] [ run make.cpp ]
[ compile macos_endian.c : [ predef-require "BOOST_OS_MACOS" : cpp ] ] [ compile macos_endian.c : [ predef-require "BOOST_OS_MACOS" : cpp ] ]
@ -46,30 +56,50 @@ test-suite predef :
[ compile platform_windows.cpp ] [ compile platform_windows.cpp ]
; ;
local single_header_c ;
for local h in [ glob-tree-ex ../include/boost/predef : *.h ]
{
local header_include = [ path.relative $(h) ../include ] ;
local header_src = [ regex.replace $(header_include:S=)_c.c "/" "_" ] ;
local header_target = $(header_src:B:S=) ;
.HEADER($(header_target)) = $(header_include) ;
make $(header_src) : : @gen_single_header_c_or_cpp ;
explicit $(header_src) ;
compile $(header_src) : <warnings-as-errors>on <warnings>all : $(header_target) ;
explicit $(header_target) ;
single_header_c += $(header_target) ;
}
local single_header_cpp ; local single_header_cpp ;
for local h in [ glob-tree-ex ../include/boost/predef : *.h ] for local h in [ glob-tree-ex ../include/boost/predef : *.h ]
{ {
local header_include = [ path.relative $(h) ../include ] ; local header_include = [ path.relative $(h) ../include ] ;
local header_cpp = [ regex.replace $(header_include:S=.cpp) "/" "_" ] ; local header_src = [ regex.replace $(header_include:S=)_cpp.cpp "/" "_" ] ;
.HEADER($(header_cpp:B:S=)) = $(header_include) ; local header_target = $(header_src:B:S=) ;
make $(header_cpp) : : @gen_single_header_cpp ; .HEADER($(header_target)) = $(header_include) ;
explicit $(header_cpp) ; make $(header_src) : : @gen_single_header_c_or_cpp ;
compile $(header_cpp) : <warnings-as-errors>on <warnings>all : $(header_cpp:B:S=) ; explicit $(header_src) ;
explicit $(header_cpp:B:S=) ; compile $(header_src) : <warnings-as-errors>on <warnings>all : $(header_target) ;
single_header_cpp += $(header_cpp:B:S=) ; explicit $(header_target) ;
single_header_cpp += $(header_target) ;
} }
test-suite predef-headers : $(single_header_cpp) ; alias predef-headers-c : $(single_header_c) ;
alias predef-headers-cpp : $(single_header_cpp) ;
alias predef-headers : predef-headers-c predef-headers-cpp ;
.file_touch_cmd = [ common.file-touch-command ] ; .file_touch_cmd = [ common.file-touch-command ] ;
rule gen_single_header_cpp ( target * : source * : properties * ) rule gen_single_header_c_or_cpp ( target * : source * : properties * )
{ {
HEADER on $(target) = $(.HEADER($(target[1]:B))) ; TEXT on $(target) = "
#include <$(.HEADER($(target[1]:B)))>
typedef char predef_single_header_test;
" ;
} }
actions gen_single_header_cpp actions gen_single_header_c_or_cpp
{ {
$(.file_touch_cmd) @($(<):<=":>=":O=F:E=#include <$(HEADER)>) $(.file_touch_cmd) @($(<):<=":>=":O=F:E=$(TEXT))
} }
# Minimal testing done for predef for CI. Since # Minimal testing done for predef for CI. Since
@ -82,8 +112,14 @@ alias full : predef predef-info ;
# Extra's target. # Extra's target.
alias extra : predef-headers ; alias extra : predef-headers ;
# Language specific tests only.
alias c : predef-info-c predef-headers-c ;
alias cpp : predef-info-cpp predef-headers-cpp ;
alias all : predef predef-info predef-headers ; alias all : predef predef-info predef-headers ;
explicit minimal ; explicit minimal ;
explicit extra ; explicit extra ;
explicit all ; explicit all ;
explicit c ;
explicit cpp ;

View File

@ -12,31 +12,33 @@ OS_ISSUE=`cat /etc/issue | head -n1 | cut -d " " -f1`
echo ">>>>> OS Issue: ${OS_ISSUE}" echo ">>>>> OS Issue: ${OS_ISSUE}"
PACKAGES=${PACKAGES:-build-essential} PACKAGES=${PACKAGES:-build-essential}
APT_OPT="-o Acquire::Retries=3 -yq"
set -e set -e
echo ">>>>>" echo ">>>>>"
echo ">>>>> APT: UPDATE.." echo ">>>>> APT: UPDATE 1/2.."
echo ">>>>>" echo ">>>>>"
${SUDO} apt-get -o Acquire::Retries=3 update ${SUDO} apt-get ${APT_OPT} update
echo ">>>>>"
echo ">>>>> APT: INSTALL 1/2: wget.."
echo ">>>>>"
${SUDO} apt-get ${APT_OPT} install wget
echo ">>>>>" echo ">>>>>"
echo ">>>>> APT: REPO.." echo ">>>>> APT: REPO.."
echo ">>>>>" echo ">>>>>"
${SUDO} apt-get -o Acquire::Retries=3 -y install software-properties-common ${SUDO} apt-get ${APT_OPT} install software-properties-common
if test "${OS_ISSUE}" = "Ubuntu" ; then
${SUDO} apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
fi
if test -n "${LLVM_OS}" ; then if test -n "${LLVM_OS}" ; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
${SUDO} apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS}-${LLVM_VER} main" ${SUDO} apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS}-${LLVM_VER} main"
fi fi
echo ">>>>>" echo ">>>>>"
echo ">>>>> APT: UPDATE.." echo ">>>>> APT: UPDATE 2/2.."
echo ">>>>>" echo ">>>>>"
${SUDO} apt-get -o Acquire::Retries=3 update ${SUDO} apt-get ${APT_OPT} update
echo ">>>>>" echo ">>>>>"
echo ">>>>> APT: INSTALL ${PACKAGES}.." echo ">>>>> APT: INSTALL 2/2: ${PACKAGES}.."
echo ">>>>>" echo ">>>>>"
${SUDO} apt-get -o Acquire::Retries=3 -yq --no-install-suggests --no-install-recommends install ${PACKAGES} ${SUDO} apt-get ${APT_OPT} install ${PACKAGES}
# Use, modification, and distribution are # Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying # subject to the Boost Software License, Version 1.0. (See accompanying