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)
9 #ifndef BOOST_PREDEF_PLAT_IOS_H
10 #define BOOST_PREDEF_PLAT_IOS_H
12 #include <boost/predef/os/ios.h> // BOOST_OS_IOS
13 #include <boost/predef/version_number.h> // BOOST_VERSION_NUMBER_NOT_AVAILABLE
16 [heading `BOOST_PLAT_IOS_DEVICE`]
17 [heading `BOOST_PLAT_IOS_SIMULATOR`]
20 [[__predef_symbol__] [__predef_version__]]
22 [[`TARGET_IPHONE_SIMULATOR`] [__predef_detection__]]
23 [[`TARGET_OS_SIMULATOR`] [__predef_detection__]]
27 #define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_NOT_AVAILABLE
28 #define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_NOT_AVAILABLE
30 // https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h
32 # include <TargetConditionals.h>
33 # if defined(TARGET_OS_SIMULATOR) && (TARGET_OS_SIMULATOR == 1)
34 # undef BOOST_PLAT_IOS_SIMULATOR
35 # define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE
36 # elif defined(TARGET_IPHONE_SIMULATOR) && (TARGET_IPHONE_SIMULATOR == 1)
37 # undef BOOST_PLAT_IOS_SIMULATOR
38 # define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE
40 # undef BOOST_PLAT_IOS_DEVICE
41 # define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_AVAILABLE
45 #if BOOST_PLAT_IOS_SIMULATOR
46 # define BOOST_PLAT_IOS_SIMULATOR_AVAILABLE
47 # include <boost/predef/detail/platform_detected.h>
50 #if BOOST_PLAT_IOS_DEVICE
51 # define BOOST_PLAT_IOS_DEVICE_AVAILABLE
52 # include <boost/predef/detail/platform_detected.h>
55 #define BOOST_PLAT_IOS_SIMULATOR_NAME "iOS Simulator"
56 #define BOOST_PLAT_IOS_DEVICE_NAME "iOS Device"
58 #endif // BOOST_PREDEF_PLAT_IOS_H
60 #include <boost/predef/detail/test.h>
61 BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_SIMULATOR,BOOST_PLAT_IOS_SIMULATOR_NAME)
62 BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_DEVICE,BOOST_PLAT_IOS_DEVICE_NAME)