diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a3d6c4..379b0ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,9 @@ # Copyright Mike Dev 2018 -# Copyright René Ferdinand Rivera Morell 2018-2021 +# Copyright René Ferdinand Rivera Morell 2018-2023 # 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 -# NOTE: -# CMake support for Boost.Predef is currently experimental at best and the -# interface is likely to change in the future -# # This file provides minimal cmake support (no unit-tests, # no installation) for integration into a "host" cmake project # via the "add_subdirectory( )" command. @@ -20,12 +16,12 @@ # Only need the basic minimum of project, add_library, and # target_include_directories commands. -cmake_minimum_required( VERSION 3.0 ) +cmake_minimum_required( VERSION 3.5...3.999 ) -# Don't set VERSION, as that's a pita to keep up to date with the version -# header. And don't set LANGUAGES as we are multi-language and header -# only, so it's irrelevant. -project( BoostPredef LANGUAGES NONE ) +# Don't set LANGUAGES as we are multi-language and header only, so it's +# irrelevant. +set( BOOST_PREDEF_VERSION "1.15" ) +project( boost_predef VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES NONE ) # Simple INTERFACE, and header only, library target. add_library( boost_predef INTERFACE ) diff --git a/appveyor.yml b/appveyor.yml index 693e8f8..ccaadf6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -63,20 +63,20 @@ for: choco install vswhere echo ">>>>> INSTALL B2 .." cd %APPVEYOR_BUILD_FOLDER%/.. - curl "https://github.com/boostorg/build/archive/develop.zip" -L -o b2.zip + curl "https://github.com/bfgroup/b2/archive/refs/heads/release.zip" -L -o b2.zip 7z x b2.zip -r echo using %TOOLSET% ^: %TOOLSET_VERSION% ^: %CXXPATH% ^; > %HOMEDRIVE%%HOMEPATH%/user-config.jam - cd %APPVEYOR_BUILD_FOLDER%/../build-develop + cd %APPVEYOR_BUILD_FOLDER%/../b2-release cmd.exe /c bootstrap.bat build_script: - cmd: | echo ">>>>>" echo ">>>>> TEST .." echo ">>>>>" - set BOOST_BUILD_PATH=%APPVEYOR_BUILD_FOLDER%/../build-develop + set BOOST_BUILD_PATH=%APPVEYOR_BUILD_FOLDER%/../b2-release cd %APPVEYOR_BUILD_FOLDER%/test - %APPVEYOR_BUILD_FOLDER%/../build-develop/b2.exe --verbose-test -a toolset=%TOOLSET% %B2_ARGS% predef-info - %APPVEYOR_BUILD_FOLDER%/../build-develop/b2.exe --debug-configuration -a toolset=%TOOLSET% %B2_ARGS% predef predef-headers + %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 # Windows MinGW & Cygwin job steps. - matrix: only: @@ -85,17 +85,17 @@ for: - cmd: | echo ">>>>> INSTALL B2 .." cd %APPVEYOR_BUILD_FOLDER%/.. - curl "https://github.com/boostorg/build/archive/develop.zip" -L -o b2.zip + curl "https://github.com/bfgroup/b2/archive/refs/heads/release.zip" -L -o b2.zip 7z x b2.zip -r echo using %TOOLSET% ^: %TOOLSET_VERSION% ^: %CXXPATH% ^; > %HOMEDRIVE%%HOMEPATH%/user-config.jam - cd %APPVEYOR_BUILD_FOLDER%/../build-develop + cd %APPVEYOR_BUILD_FOLDER%/../b2-release cmd.exe /c bootstrap.bat build_script: # The build itself just calls the compiler directly. - cmd: | echo ">>>>> TEST .." set PATH=%CXXPATH%\..\;%PATH% - set BOOST_BUILD_PATH=%APPVEYOR_BUILD_FOLDER%/../build-develop + set BOOST_BUILD_PATH=%APPVEYOR_BUILD_FOLDER%/../b2-release cd %APPVEYOR_BUILD_FOLDER%/test - %APPVEYOR_BUILD_FOLDER%/../build-develop/b2.exe --verbose-test -a toolset=%TOOLSET% %B2_ARGS% predef-info - %APPVEYOR_BUILD_FOLDER%/../build-develop/b2.exe --debug-configuration -a toolset=%TOOLSET% %B2_ARGS% predef predef-headers + %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 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 13377a0..6a63894 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -41,25 +41,26 @@ stages: - job: 'Linux' strategy: matrix: - GCC 11 (GNU): { CXX: g++-11, PACKAGES: g++-11, VM_IMAGE: 'ubuntu-20.04', TOOLSET: gcc, B2_ARGS: 'cxxstd=03,11,14,17,20 cxxstd-dialect=gnu' } - GCC 11 (ISO): { CXX: g++-11, PACKAGES: g++-11, VM_IMAGE: 'ubuntu-20.04', TOOLSET: gcc, B2_ARGS: 'cxxstd=03,11,14,17,20 cxxstd-dialect=iso' } - GCC 11: { CXX: g++-11, PACKAGES: g++-11, VM_IMAGE: 'ubuntu-20.04', TOOLSET: gcc } - GCC 10: { CXX: g++-10, PACKAGES: g++-10, VM_IMAGE: 'ubuntu-20.04', TOOLSET: gcc } - GCC 9: { CXX: g++-9, PACKAGES: g++-9, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc } - GCC 8: { CXX: g++-8, PACKAGES: g++-8, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc } - GCC 7: { CXX: g++-7, PACKAGES: g++-7, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc } - GCC 6: { CXX: g++-6, PACKAGES: g++-6, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc } - GCC 5: { CXX: g++-5, PACKAGES: g++-5, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc } - Clang 13: { CXX: clang++-13, PACKAGES: clang-13, LLVM_OS: focal, LLVM_VER: 13, VM_IMAGE: 'ubuntu-20.04', TOOLSET: clang } + 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 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 12: { CXX: g++-12, PACKAGES: g++-12, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc } + GCC 11: { CXX: g++-11, PACKAGES: g++-11, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc } + GCC 10: { CXX: g++-10, PACKAGES: g++-10, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc } + GCC 9: { CXX: g++-9, PACKAGES: g++-9, VM_IMAGE: 'ubuntu-22.04', TOOLSET: gcc } + GCC 8: { CXX: g++-8, PACKAGES: g++-8, VM_IMAGE: 'ubuntu-20.04', TOOLSET: gcc } + GCC 7: { CXX: g++-7, PACKAGES: g++-7, VM_IMAGE: 'ubuntu-20.04', TOOLSET: gcc } + Clang 15: { CXX: clang++-15, PACKAGES: clang-15, LLVM_OS: jammy, LLVM_VER: 13, VM_IMAGE: 'ubuntu-22.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: bionic, LLVM_VER: 10, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang } - Clang 9: { CXX: clang++-9, PACKAGES: clang-9, LLVM_OS: bionic, LLVM_VER: 9, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang } - 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 } - Clang 4.0: { CXX: clang++-4.0, PACKAGES: clang-4.0, LLVM_OS: xenial, LLVM_VER: 4.0, VM_IMAGE: 'ubuntu-18.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: vmImage: $(VM_IMAGE) steps: @@ -91,20 +92,24 @@ stages: - job: 'macOS' strategy: matrix: + Xcode 13.4.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.4.1.app, VM_IMAGE: 'macOS-12'} + Xcode 13.3.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.3.1.app, VM_IMAGE: 'macOS-12'} Xcode 13.2.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.2.1.app, VM_IMAGE: 'macOS-11'} - Xcode 13.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.1.app, VM_IMAGE: 'macOS-11'} + Xcode 13.1: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.1.app, VM_IMAGE: 'macOS-12'} Xcode 13.0: {TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.0.app, VM_IMAGE: 'macOS-11'} + 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'} - 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'} + # 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: vmImage: $(VM_IMAGE) steps: @@ -217,9 +222,6 @@ stages: pool: vmImage: 'ubuntu-latest' steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '2.x' - task: UseRubyVersion@0 - bash: | gem install asciidoctor diff --git a/build.jam b/build.jam index 0f39f9d..f3847b9 100644 --- a/build.jam +++ b/build.jam @@ -1,38 +1,32 @@ -# Copyright René Ferdinand Rivera Morell 2014-2019 +# Copyright René Ferdinand Rivera Morell 2014-2023 # 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) #| This B2 project provides support for using the Predef library externally as -a standalone project or by embedding in your B2 project tree. To use -externally you would need a `use-project` declaration and to use the -project as a dependency where needed: +a standalone project. To use externally you would need a `use-project` +declaration and to use the project as a dependency where needed: ---- -use-project /hash-predef : /path/to/hash-predef/root ; +use-project /boost/predef : /path/to/boost/predef/root ; -exe my_thing : main.cpp : /hash-predef ; ----- - -To use in your project tree you would only need to place the Predef tree -in a subdirectory and reference the project location as a dependency where -needed. - ----- -exe my_thin : main.cpp : libs/hash-predef ; +exe my_thing : main.cpp : /boost/predef ; ---- |# import project ; +import modules ; -path-constant BOOST_PREDEF_ROOT : . ; -path-constant BOOST_PREDEF_INCLUDE : include ; -constant PREDEF_DIST : boost ; +path-constant PREDEF_ROOT : . ; + +modules.poke : BOOST_BUILD_PATH + : $(PREDEF_ROOT)/tools/check [ modules.peek : BOOST_BUILD_PATH ] ; project /boost/predef - : usage-requirements - $(BOOST_PREDEF_INCLUDE) ; + : common-requirements + include + ; if [ project.is-jamroot-module $(__name__) ] { @@ -40,4 +34,19 @@ if [ project.is-jamroot-module $(__name__) ] $(attributes).set "build-dir" : .bin ; } -alias libs ; +explicit + [ alias boost_predef ] + [ alias all : boost_predef test//all tools/check ] + [ install install-global-headers + : [ glob-tree-ex include : *.h ] + : include (includedir) ] + [ install install-data + : build.jam [ glob-tree-ex tools/check : * ] [ glob-tree-ex include : *.h ] + : . (datadir)/boost_predef ] + [ alias install : + install-global-headers install-data ] + ; + +call-if + : boost-library predef + ; diff --git a/doc/build.jam b/doc/build.jam index 3a87acc..cb3212f 100644 --- a/doc/build.jam +++ b/doc/build.jam @@ -14,7 +14,7 @@ project predefdoc ; doc-dir = [ MATCH "--doc-dir=(.*)" : [ modules.peek : ARGV ] ] ; doc-dir ?= . ; -local headers = [ glob-tree-ex $(BOOST_PREDEF_INCLUDE) : *.h ] ; +local headers = [ glob-tree-ex ../include/boost : *.h ] ; html index : predef.adoc : : diff --git a/doc/history.adoc b/doc/history.adoc index 07176dc..608487f 100644 --- a/doc/history.adoc +++ b/doc/history.adoc @@ -7,6 +7,10 @@ http://www.boost.org/LICENSE_1_0.txt) = History +== 1.15.0 + +* Add detection of Microsoft STL (from Henrik Gaßmann). + == 1.14.0 * Add detection of LoongArch (from Zhang Na). diff --git a/doc/index.html b/doc/index.html index aabf09b..109695b 100644 --- a/doc/index.html +++ b/doc/index.html @@ -4,7 +4,7 @@ - + Boost.Predef