Add PLAT_ANDROID and deprecate OS_ANDROID.

Fixes #41 #81
This commit is contained in:
Rene Rivera
2019-01-10 13:27:41 -06:00
parent 48d9231a1b
commit a340a52605
5 changed files with 52 additions and 1 deletions

View File

@ -9,6 +9,9 @@ http://www.boost.org/LICENSE_1_0.txt)
[heading 1.10]
* Add `BOOST_PLAT_ANDROID` to resolve conflict between Linux and Android
OS predefs. The `BOOST_OS_ANDROID` predef is now deprecated and will be
removed in a future release.
* Add support for consuming Predef as a CMake project.
[heading 1.9]

View File

@ -13,7 +13,6 @@ http://www.boost.org/LICENSE_1_0.txt)
#include <boost/predef/os/aix.h>
#include <boost/predef/os/amigaos.h>
#include <boost/predef/os/android.h>
#include <boost/predef/os/beos.h>
#include <boost/predef/os/bsd.h>
#include <boost/predef/os/cygwin.h>
@ -30,4 +29,6 @@ http://www.boost.org/LICENSE_1_0.txt)
#include <boost/predef/os/vms.h>
#include <boost/predef/os/windows.h>
#include <boost/predef/os/android.h>
#endif

View File

@ -14,6 +14,9 @@ http://www.boost.org/LICENSE_1_0.txt)
/*`
[heading `BOOST_OS_ANDROID`]
NOTE: `BOOST_OS_ANDROID` is deprecated, and will be removed in a following release.
Please use `BOOST_PLAT_ANDROID` instead.
[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] operating system.
[table

View File

@ -11,6 +11,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_PREDEF_PLATFORM_H
#endif
#include <boost/predef/platform/android.h>
#include <boost/predef/platform/cloudabi.h>
#include <boost/predef/platform/mingw.h>
#include <boost/predef/platform/mingw32.h>

View File

@ -0,0 +1,43 @@
/*
Copyright Rene Rivera 2015-2019
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 BOOST_PREDEF_PLAT_ANDROID_H
#define BOOST_PREDEF_PLAT_ANDROID_H
#include <boost/predef/version_number.h>
#include <boost/predef/make.h>
/*`
[heading `BOOST_PLAT_ANDROID`]
[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] platform.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__ANDROID__`] [__predef_detection__]]
]
*/
#define BOOST_PLAT_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__ANDROID__)
# undef BOOST_PLAT_ANDROID
# define BOOST_PLAT_ANDROID BOOST_VERSION_NUMBER_AVAILABLE
#endif
#if BOOST_PLAT_ANDROID
# define BOOST_PLAT_ANDROID_AVAILABLE
# include <boost/predef/detail/platform_detected.h>
#endif
#define BOOST_PLAT_ANDROID_NAME "Android"
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_ANDROID,BOOST_PLAT_ANDROID_NAME)