mirror of
https://github.com/boostorg/predef.git
synced 2025-08-01 04:34:26 +02:00
Addressing feedback from Rene Rivera for adding BOOST macros for detecting the Windows Runtime being targeted.
Now there are new predefs for desktop, store, phone, and the Windows Runtime (store/phone) in general. These can easily be used throughout Boost to detect the Windows platform being targeted.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright Rene Rivera 2013
|
Copyright Rene Rivera 2013
|
||||||
|
Copyright (c) Microsoft Corporation 2014
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
http://www.boost.org/LICENSE_1_0.txt)
|
http://www.boost.org/LICENSE_1_0.txt)
|
||||||
@@ -9,6 +10,10 @@ http://www.boost.org/LICENSE_1_0.txt)
|
|||||||
#define BOOST_PREDEF_PLATFORM_H
|
#define BOOST_PREDEF_PLATFORM_H
|
||||||
|
|
||||||
#include <boost/predef/platform/mingw.h>
|
#include <boost/predef/platform/mingw.h>
|
||||||
|
#include <boost/predef/platform/windows_desktop.h>
|
||||||
|
#include <boost/predef/platform/windows_store.h>
|
||||||
|
#include <boost/predef/platform/windows_phone.h>
|
||||||
|
#include <boost/predef/platform/windows_runtime.h>
|
||||||
/*#include <boost/predef/platform/.h>*/
|
/*#include <boost/predef/platform/.h>*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
42
include/boost/predef/platform/windows_desktop.h
Normal file
42
include/boost/predef/platform/windows_desktop.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) Microsoft Corporation 2014
|
||||||
|
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_WINDOWS_DESKTOP_H
|
||||||
|
#define BOOST_PREDEF_PLAT_WINDOWS_DESKTOP_H
|
||||||
|
|
||||||
|
#include <boost/predef/version_number.h>
|
||||||
|
#include <boost/predef/make.h>
|
||||||
|
|
||||||
|
/*`
|
||||||
|
[heading `BOOST_PLAT_WINDOWS_DESKTOP`]
|
||||||
|
|
||||||
|
[table
|
||||||
|
[[__predef_symbol__] [__predef_version__]]
|
||||||
|
|
||||||
|
[[`!WINAPI_FAMILY`] [__predef_detection__]]
|
||||||
|
[[`WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP`] [__predef_detection__]]
|
||||||
|
]
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||||
|
|
||||||
|
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
|
||||||
|
# undef BOOST_PLAT_WINDOWS_DESKTOP
|
||||||
|
# define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_AVAILABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_PLAT_WINDOWS_DESKTOP
|
||||||
|
# define BOOST_PLAT_WINDOWS_DESKTOP_AVALIABLE
|
||||||
|
# include <boost/predef/detail/platform_detected.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BOOST_PLAT_WINDOWS_DESKTOP_NAME "Windows Desktop"
|
||||||
|
|
||||||
|
#include <boost/predef/detail/test.h>
|
||||||
|
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_DESKTOP,BOOST_PLAT_WINDOWS_DESKTOP_NAME)
|
||||||
|
|
||||||
|
#endif
|
41
include/boost/predef/platform/windows_phone.h
Normal file
41
include/boost/predef/platform/windows_phone.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) Microsoft Corporation 2014
|
||||||
|
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_WINDOWS_PHONE_H
|
||||||
|
#define BOOST_PREDEF_PLAT_WINDOWS_PHONE_H
|
||||||
|
|
||||||
|
#include <boost/predef/version_number.h>
|
||||||
|
#include <boost/predef/make.h>
|
||||||
|
|
||||||
|
/*`
|
||||||
|
[heading `BOOST_PLAT_WINDOWS_PHONE`]
|
||||||
|
|
||||||
|
[table
|
||||||
|
[[__predef_symbol__] [__predef_version__]]
|
||||||
|
|
||||||
|
[[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]]
|
||||||
|
]
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||||
|
|
||||||
|
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||||
|
# undef BOOST_PLAT_WINDOWS_PHONE
|
||||||
|
# define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_AVAILABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_PLAT_WINDOWS_PHONE
|
||||||
|
# define BOOST_PLAT_WINDOWS_PHONE_AVALIABLE
|
||||||
|
# include <boost/predef/detail/platform_detected.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BOOST_PLAT_WINDOWS_PHONE_NAME "Windows Phone"
|
||||||
|
|
||||||
|
#include <boost/predef/detail/test.h>
|
||||||
|
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_PHONE,BOOST_PLAT_WINDOWS_PHONE_NAME)
|
||||||
|
|
||||||
|
#endif
|
42
include/boost/predef/platform/windows_runtime.h
Normal file
42
include/boost/predef/platform/windows_runtime.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) Microsoft Corporation 2014
|
||||||
|
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_WINDOWS_RUNTIME_H
|
||||||
|
#define BOOST_PREDEF_PLAT_WINDOWS_RUNTIME_H
|
||||||
|
|
||||||
|
#include <boost/predef/version_number.h>
|
||||||
|
#include <boost/predef/make.h>
|
||||||
|
|
||||||
|
/*`
|
||||||
|
[heading `BOOST_PLAT_WINDOWS_RUNTIME`]
|
||||||
|
|
||||||
|
[table
|
||||||
|
[[__predef_symbol__] [__predef_version__]]
|
||||||
|
|
||||||
|
[[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]]
|
||||||
|
[[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]]
|
||||||
|
]
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||||
|
|
||||||
|
#if WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||||
|
# undef BOOST_PLAT_WINDOWS_RUNTIME
|
||||||
|
# define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_AVAILABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_PLAT_WINDOWS_RUNTIME
|
||||||
|
# define BOOST_PLAT_WINDOWS_RUNTIME_AVALIABLE
|
||||||
|
# include <boost/predef/detail/platform_detected.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BOOST_PLAT_WINDOWS_RUNTIME_NAME "Windows Runtime"
|
||||||
|
|
||||||
|
#include <boost/predef/detail/test.h>
|
||||||
|
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_RUNTIME,BOOST_PLAT_WINDOWS_RUNTIME_NAME)
|
||||||
|
|
||||||
|
#endif
|
41
include/boost/predef/platform/windows_store.h
Normal file
41
include/boost/predef/platform/windows_store.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) Microsoft Corporation 2014
|
||||||
|
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_WINDOWS_STORE_H
|
||||||
|
#define BOOST_PREDEF_PLAT_WINDOWS_STORE_H
|
||||||
|
|
||||||
|
#include <boost/predef/version_number.h>
|
||||||
|
#include <boost/predef/make.h>
|
||||||
|
|
||||||
|
/*`
|
||||||
|
[heading `BOOST_PLAT_WINDOWS_STORE`]
|
||||||
|
|
||||||
|
[table
|
||||||
|
[[__predef_symbol__] [__predef_version__]]
|
||||||
|
|
||||||
|
[[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]]
|
||||||
|
]
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||||
|
|
||||||
|
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
|
||||||
|
# undef BOOST_PLAT_WINDOWS_STORE
|
||||||
|
# define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_AVAILABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_PLAT_WINDOWS_STORE
|
||||||
|
# define BOOST_PLAT_WINDOWS_STORE_AVALIABLE
|
||||||
|
# include <boost/predef/detail/platform_detected.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BOOST_PLAT_WINDOWS_STORE_NAME "Windows Store"
|
||||||
|
|
||||||
|
#include <boost/predef/detail/test.h>
|
||||||
|
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_STORE,BOOST_PLAT_WINDOWS_STORE_NAME)
|
||||||
|
|
||||||
|
#endif
|
Reference in New Issue
Block a user