1 | /* |
2 | Copyright Ruslan Baratov 2017 |
3 | Copyright Rene Rivera 2017 |
4 | Distributed under the Boost Software License, Version 1.0. |
5 | (See accompanying file LICENSE_1_0.txt or copy at |
6 | http://www.boost.org/LICENSE_1_0.txt) |
7 | */ |
8 | |
9 | #ifndef BOOST_PREDEF_PLAT_IOS_H |
10 | #define BOOST_PREDEF_PLAT_IOS_H |
11 | |
12 | #include <boost/predef/os/ios.h> // BOOST_OS_IOS |
13 | #include <boost/predef/version_number.h> // BOOST_VERSION_NUMBER_NOT_AVAILABLE |
14 | |
15 | /*` |
16 | [heading `BOOST_PLAT_IOS_DEVICE`] |
17 | [heading `BOOST_PLAT_IOS_SIMULATOR`] |
18 | |
19 | [table |
20 | [[__predef_symbol__] [__predef_version__]] |
21 | |
22 | [[`TARGET_IPHONE_SIMULATOR`] [__predef_detection__]] |
23 | ] |
24 | */ |
25 | |
26 | #define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_NOT_AVAILABLE |
27 | #define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_NOT_AVAILABLE |
28 | |
29 | // https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h |
30 | #if BOOST_OS_IOS |
31 | # include <TargetConditionals.h> |
32 | # if TARGET_IPHONE_SIMULATOR == 1 |
33 | # undef BOOST_PLAT_IOS_SIMULATOR |
34 | # define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE |
35 | # else |
36 | # undef BOOST_PLAT_IOS_DEVICE |
37 | # define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_AVAILABLE |
38 | # endif |
39 | #endif |
40 | |
41 | #if BOOST_PLAT_IOS_SIMULATOR |
42 | # define BOOST_PLAT_IOS_SIMULATOR_AVAILABLE |
43 | # include <boost/predef/detail/platform_detected.h> |
44 | #endif |
45 | |
46 | #if BOOST_PLAT_IOS_DEVICE |
47 | # define BOOST_PLAT_IOS_DEVICE_AVAILABLE |
48 | # include <boost/predef/detail/platform_detected.h> |
49 | #endif |
50 | |
51 | #define BOOST_PLAT_IOS_SIMULATOR_NAME "iOS Simulator" |
52 | #define BOOST_PLAT_IOS_DEVICE_NAME "iOS Device" |
53 | |
54 | #endif // BOOST_PREDEF_PLAT_IOS_H |
55 | |
56 | #include <boost/predef/detail/test.h> |
57 | BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_SIMULATOR,BOOST_PLAT_IOS_SIMULATOR_NAME) |
58 | BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_DEVICE,BOOST_PLAT_IOS_DEVICE_NAME) |
59 | |