Merge pull request #444 from boostorg/pr/boost-clang-version

Update Clang version detection
This commit is contained in:
Peter Dimov
2022-08-29 23:20:49 +03:00
committed by GitHub

View File

@ -4,14 +4,20 @@
#if !defined(__APPLE__)
# define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
# define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__ % 100)
#else
# define BOOST_CLANG_REPORTED_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
# define BOOST_CLANG_REPORTED_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__ % 100)
// https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
# if BOOST_CLANG_REPORTED_VERSION >= 130000
# if BOOST_CLANG_REPORTED_VERSION >= 140000
# define BOOST_CLANG_VERSION 140000
# elif BOOST_CLANG_REPORTED_VERSION >= 130100
# define BOOST_CLANG_VERSION 130000
# elif BOOST_CLANG_REPORTED_VERSION >= 130000
# define BOOST_CLANG_VERSION 120000
# elif BOOST_CLANG_REPORTED_VERSION >= 120005