mirror of
https://github.com/boostorg/config.git
synced 2025-07-30 04:17:16 +02:00
Define BOOST_CLANG_VERSION
This commit is contained in:
@ -351,3 +351,5 @@
|
||||
// Macro used to identify the Clang compiler.
|
||||
#define BOOST_CLANG 1
|
||||
|
||||
// BOOST_CLANG_VERSION
|
||||
#include <boost/config/compiler/clang_version.hpp>
|
||||
|
77
include/boost/config/compiler/clang_version.hpp
Normal file
77
include/boost/config/compiler/clang_version.hpp
Normal file
@ -0,0 +1,77 @@
|
||||
// Copyright 2021 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#if !defined(__APPLE)
|
||||
|
||||
# define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
||||
|
||||
#else
|
||||
# define BOOST_CLANG_REPORTED_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
||||
|
||||
// https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
|
||||
|
||||
# if BOOST_CLANG_REPORTED_VERSION >= 130000
|
||||
# define BOOST_CLANG_VERSION 120000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 120005
|
||||
# define BOOST_CLANG_VERSION 110100
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 120000
|
||||
# define BOOST_CLANG_VERSION 100000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 110003
|
||||
# define BOOST_CLANG_VERSION 90000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 110000
|
||||
# define BOOST_CLANG_VERSION 80000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 100001
|
||||
# define BOOST_CLANG_VERSION 70000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 100000
|
||||
# define BOOST_CLANG_VERSION 60001
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 90100
|
||||
# define BOOST_CLANG_VERSION 50002
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 90000
|
||||
# define BOOST_CLANG_VERSION 40000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 80000
|
||||
# define BOOST_CLANG_VERSION 30900
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 70300
|
||||
# define BOOST_CLANG_VERSION 30800
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 70000
|
||||
# define BOOST_CLANG_VERSION 30700
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 60100
|
||||
# define BOOST_CLANG_VERSION 30600
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 60000
|
||||
# define BOOST_CLANG_VERSION 30500
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 50100
|
||||
# define BOOST_CLANG_VERSION 30400
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 50000
|
||||
# define BOOST_CLANG_VERSION 30300
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 40200
|
||||
# define BOOST_CLANG_VERSION 30200
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 30100
|
||||
# define BOOST_CLANG_VERSION 30100
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 20100
|
||||
# define BOOST_CLANG_VERSION 30000
|
||||
|
||||
# else
|
||||
# define BOOST_CLANG_VERSION 20900
|
||||
|
||||
# endif
|
||||
|
||||
# undef BOOST_CLANG_REPORTED_VERSION
|
||||
#endif
|
@ -288,3 +288,4 @@
|
||||
// Macro used to identify the Clang compiler.
|
||||
#define BOOST_CLANG 1
|
||||
|
||||
#define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
||||
|
Reference in New Issue
Block a user