Files

64 lines
2.2 KiB
C

/*
Copyright Ruslan Baratov 2017
Copyright Rene Rivera 2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef ACTIV_BOOST_PREDEF_PLAT_IOS_H
#define ACTIV_BOOST_PREDEF_PLAT_IOS_H
#include <ActivBoost/predef/os/ios.h> // ACTIV_BOOST_OS_IOS
#include <ActivBoost/predef/version_number.h> // ACTIV_BOOST_VERSION_NUMBER_NOT_AVAILABLE
/* tag::reference[]
= `ACTIV_BOOST_PLAT_IOS_DEVICE`
= `ACTIV_BOOST_PLAT_IOS_SIMULATOR`
[options="header"]
|===
| {predef_symbol} | {predef_version}
| `TARGET_IPHONE_SIMULATOR` | {predef_detection}
| `TARGET_OS_SIMULATOR` | {predef_detection}
|===
*/ // end::reference[]
#define ACTIV_BOOST_PLAT_IOS_DEVICE ACTIV_BOOST_VERSION_NUMBER_NOT_AVAILABLE
#define ACTIV_BOOST_PLAT_IOS_SIMULATOR ACTIV_BOOST_VERSION_NUMBER_NOT_AVAILABLE
// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h
#if ACTIV_BOOST_OS_IOS
# include <TargetConditionals.h>
# if defined(TARGET_OS_SIMULATOR) && (TARGET_OS_SIMULATOR == 1)
# undef ACTIV_BOOST_PLAT_IOS_SIMULATOR
# define ACTIV_BOOST_PLAT_IOS_SIMULATOR ACTIV_BOOST_VERSION_NUMBER_AVAILABLE
# elif defined(TARGET_IPHONE_SIMULATOR) && (TARGET_IPHONE_SIMULATOR == 1)
# undef ACTIV_BOOST_PLAT_IOS_SIMULATOR
# define ACTIV_BOOST_PLAT_IOS_SIMULATOR ACTIV_BOOST_VERSION_NUMBER_AVAILABLE
# else
# undef ACTIV_BOOST_PLAT_IOS_DEVICE
# define ACTIV_BOOST_PLAT_IOS_DEVICE ACTIV_BOOST_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if ACTIV_BOOST_PLAT_IOS_SIMULATOR
# define ACTIV_BOOST_PLAT_IOS_SIMULATOR_AVAILABLE
# include <ActivBoost/predef/detail/platform_detected.h>
#endif
#if ACTIV_BOOST_PLAT_IOS_DEVICE
# define ACTIV_BOOST_PLAT_IOS_DEVICE_AVAILABLE
# include <ActivBoost/predef/detail/platform_detected.h>
#endif
#define ACTIV_BOOST_PLAT_IOS_SIMULATOR_NAME "iOS Simulator"
#define ACTIV_BOOST_PLAT_IOS_DEVICE_NAME "iOS Device"
#endif // ACTIV_BOOST_PREDEF_PLAT_IOS_H
#include <ActivBoost/predef/detail/test.h>
ACTIV_BOOST_PREDEF_DECLARE_TEST(ACTIV_BOOST_PLAT_IOS_SIMULATOR,ACTIV_BOOST_PLAT_IOS_SIMULATOR_NAME)
ACTIV_BOOST_PREDEF_DECLARE_TEST(ACTIV_BOOST_PLAT_IOS_DEVICE,ACTIV_BOOST_PLAT_IOS_DEVICE_NAME)