Adobe Source Libraries
2.0.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2008 Adobe Systems Incorporated
3
Distributed under the Boost Software License - Version 1.0 (see the accompanying file LICENSE
4
or a copy at https://stlab.github.io/adobe_source_libraries/licenses.html)
5
*/
6
7
/**************************************************************************************************/
8
9
#ifndef ADOBE_CONFIG_HPP
10
#define ADOBE_CONFIG_HPP
11
12
/**************************************************************************************************/
13
14
#include <boost/config.hpp>
15
16
/**************************************************************************************************/
17
18
/*
19
Caution:
20
This is the only ASL header that is guaranteed to change with every release. Including
21
this header will cause a recompile every time a new ASL version is released.
22
23
ADOBE_VERSION % 100 is the sub-minor version
24
ADOBE_VERSION / 100 % 1000 is the minor version
25
ADOBE_VERSION / 100000 is the major version
26
*/
27
28
#define ADOBE_VERSION_MAJOR 1
29
#define ADOBE_VERSION_MINOR 0
30
#define ADOBE_VERSION_SUBMINOR 46
31
32
#define ADOBE_VERSION \
33
(ADOBE_VERSION_MAJOR * 100000 + ADOBE_VERSION_MINOR * 100 + ADOBE_VERSION_SUBMINOR)
34
35
/**************************************************************************************************/
36
37
#define ADOBE_IS_DEPRECATED_ERROR(version) \
38
((ADOBE_VERSION - version) > 0 || defined(ADOBE_NO_DEPRECATED))
39
40
/**************************************************************************************************/
41
42
// Big thanks to Boost here for doing a majority of the work for us.
43
44
#if defined(__CYGWIN__)
45
// Cygwin is not Win32
46
#define ADOBE_PLATFORM_CYGWIN 1
47
48
#elif defined(BOOST_WINDOWS) || defined(__MINGW32__)
49
// Win32
50
#define ADOBE_PLATFORM_WIN 1
51
52
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
53
// MacOS
54
#define ADOBE_PLATFORM_MAC 1
55
56
#elif defined(__BEOS__)
57
// BeOS
58
#define ADOBE_PLATFORM_BEOS 1
59
60
#elif defined(__IBMCPP__)
61
// IBM
62
#define ADOBE_PLATFORM_AIX 1
63
64
#elif defined(__amigaos__)
65
// AmigaOS
66
#define ADOBE_PLATFORM_AMIGA 1
67
68
#elif defined(sun) || defined(__sun)
69
// Solaris
70
#define ADOBE_PLATFORM_SOLARIS 1
71
72
#elif defined(__sgi)
73
// SGI Irix
74
#define ADOBE_PLATFORM_IRIX 1
75
76
#elif defined(__hpux)
77
// HP Unix
78
#define ADOBE_PLATFORM_HPUX 1
79
80
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
81
// BSD
82
#define ADOBE_PLATFORM_BSD 1
83
84
#elif defined(linux) || defined(__linux) || defined(__linux__)
85
// Linux
86
#define ADOBE_PLATFORM_LINUX 1
87
88
#elif defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
89
// Generic Unix
90
#define ADOBE_PLATFORM_UNIX 1
91
92
#else
93
// Unknown
94
#error "Unknown platform - please configure and report the results to stlab.adobe.com"
95
96
#endif
97
98
/**************************************************************************************************/
99
100
#include <
adobe/config/select_compiler.hpp
>
101
102
/**************************************************************************************************/
103
104
#define ASL_CPP_VERSION(X) (ASL_CPP_VERSION_PRIVATE() == (X))
105
#define ASL_CPP_VERSION_LESS_THAN(X) (ASL_CPP_VERSION_PRIVATE() < (X))
106
#define ASL_CPP_VERSION_AT_LEAST(X) (ASL_CPP_VERSION_PRIVATE() >= (X))
107
108
// Check C++ language standard, e.g. C++17 vs. C++20/23.
109
//
110
// Note that on Windows the value for __cplusplus is only set properly if /Zc:__cplusplus is set.
111
// This should be the case with the most projects setup but we're not taking any chances.
112
// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
113
//
114
// For MSVS for now there is no c++23 only /std:c++latest which is
115
// "It's set to a higher, unspecified value when the /std:c++latest option is specified."
116
// Newer compiler has /std:c++23preview, but we are not using it yet.
117
#if (defined(__cplusplus) && __cplusplus >= 202302L) || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L)
118
#define ASL_CPP_VERSION_PRIVATE() 23
119
#elif (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
120
#define ASL_CPP_VERSION_PRIVATE() 20
121
#elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
122
#define ASL_CPP_VERSION_PRIVATE() 17
123
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)
124
#define ASL_CPP_VERSION_PRIVATE() 14
125
#else
126
// #warning Unknown version of C++, assuming C++23.
127
#define ASL_CPP_VERSION_PRIVATE() 23
128
#endif
// (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)
129
130
/**************************************************************************************************/
131
#endif
// #define ADOBE_CONFIG_HPP
132
133
/**************************************************************************************************/
select_compiler.hpp
adobe
config.hpp
Generated by
1.14.0