ios.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #ifndef BOOST_PREDEF_PLAT_IOS_H
  9. #define BOOST_PREDEF_PLAT_IOS_H
  10. #include <boost/predef/os/ios.h> // BOOST_OS_IOS
  11. #include <boost/predef/version_number.h> // BOOST_VERSION_NUMBER_NOT_AVAILABLE
  12. /*`
  13. [heading `BOOST_PLAT_IOS_DEVICE`]
  14. [heading `BOOST_PLAT_IOS_SIMULATOR`]
  15. [table
  16. [[__predef_symbol__] [__predef_version__]]
  17. [[`TARGET_IPHONE_SIMULATOR`] [__predef_detection__]]
  18. ]
  19. */
  20. #define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_NOT_AVAILABLE
  21. #define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_NOT_AVAILABLE
  22. // https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h
  23. #if BOOST_OS_IOS
  24. # include <TargetConditionals.h>
  25. # if TARGET_IPHONE_SIMULATOR == 1
  26. # undef BOOST_PLAT_IOS_SIMULATOR
  27. # define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE
  28. # else
  29. # undef BOOST_PLAT_IOS_DEVICE
  30. # define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_AVAILABLE
  31. # endif
  32. #endif
  33. #if BOOST_PLAT_IOS_SIMULATOR
  34. # define BOOST_PLAT_IOS_SIMULATOR_AVAILABLE
  35. # include <boost/predef/detail/platform_detected.h>
  36. #endif
  37. #if BOOST_PLAT_IOS_DEVICE
  38. # define BOOST_PLAT_IOS_DEVICE_AVAILABLE
  39. # include <boost/predef/detail/platform_detected.h>
  40. #endif
  41. #define BOOST_PLAT_IOS_SIMULATOR_NAME "iOS Simulator"
  42. #define BOOST_PLAT_IOS_DEVICE_NAME "iOS Device"
  43. #endif // BOOST_PREDEF_PLAT_IOS_H
  44. #include <boost/predef/detail/test.h>
  45. BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_SIMULATOR,BOOST_PLAT_IOS_SIMULATOR_NAME)
  46. BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_DEVICE,BOOST_PLAT_IOS_DEVICE_NAME)