Path: blob/master/dep/googletest/include/gtest/internal/gtest-port-arch.h
4808 views
// Copyright 2015, Google Inc.1// All rights reserved.2//3// Redistribution and use in source and binary forms, with or without4// modification, are permitted provided that the following conditions are5// met:6//7// * Redistributions of source code must retain the above copyright8// notice, this list of conditions and the following disclaimer.9// * Redistributions in binary form must reproduce the above10// copyright notice, this list of conditions and the following disclaimer11// in the documentation and/or other materials provided with the12// distribution.13// * Neither the name of Google Inc. nor the names of its14// contributors may be used to endorse or promote products derived from15// this software without specific prior written permission.16//17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT19// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR20// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT21// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,22// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT23// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,24// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY25// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT26// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE27// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.2829// The Google C++ Testing and Mocking Framework (Google Test)30//31// This header file defines the GTEST_OS_* macro.32// It is separate from gtest-port.h so that custom/gtest-port.h can include it.3334#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_35#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_3637// Determines the platform on which Google Test is compiled.38#ifdef __CYGWIN__39#define GTEST_OS_CYGWIN 140#elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)41#define GTEST_OS_WINDOWS_MINGW 142#define GTEST_OS_WINDOWS 143#elif defined _WIN3244#define GTEST_OS_WINDOWS 145#ifdef _WIN32_WCE46#define GTEST_OS_WINDOWS_MOBILE 147#elif defined(WINAPI_FAMILY)48#include <winapifamily.h>49#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)50#define GTEST_OS_WINDOWS_DESKTOP 151#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)52#define GTEST_OS_WINDOWS_PHONE 153#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)54#define GTEST_OS_WINDOWS_RT 155#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE)56#define GTEST_OS_WINDOWS_PHONE 157#define GTEST_OS_WINDOWS_TV_TITLE 158#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_GAMES)59#define GTEST_OS_WINDOWS_GAMES 160#else61// WINAPI_FAMILY defined but no known partition matched.62// Default to desktop.63#define GTEST_OS_WINDOWS_DESKTOP 164#endif65#else66#define GTEST_OS_WINDOWS_DESKTOP 167#endif // _WIN32_WCE68#elif defined __OS2__69#define GTEST_OS_OS2 170#elif defined __APPLE__71#define GTEST_OS_MAC 172#include <TargetConditionals.h>73#if TARGET_OS_IPHONE74#define GTEST_OS_IOS 175#endif76#elif defined __DragonFly__77#define GTEST_OS_DRAGONFLY 178#elif defined __FreeBSD__79#define GTEST_OS_FREEBSD 180#elif defined __Fuchsia__81#define GTEST_OS_FUCHSIA 182#elif defined(__GNU__)83#define GTEST_OS_GNU_HURD 184#elif defined(__GLIBC__) && defined(__FreeBSD_kernel__)85#define GTEST_OS_GNU_KFREEBSD 186#elif defined __linux__87#define GTEST_OS_LINUX 188#if defined __ANDROID__89#define GTEST_OS_LINUX_ANDROID 190#endif91#elif defined __MVS__92#define GTEST_OS_ZOS 193#elif defined(__sun) && defined(__SVR4)94#define GTEST_OS_SOLARIS 195#elif defined(_AIX)96#define GTEST_OS_AIX 197#elif defined(__hpux)98#define GTEST_OS_HPUX 199#elif defined __native_client__100#define GTEST_OS_NACL 1101#elif defined __NetBSD__102#define GTEST_OS_NETBSD 1103#elif defined __OpenBSD__104#define GTEST_OS_OPENBSD 1105#elif defined __QNX__106#define GTEST_OS_QNX 1107#elif defined(__HAIKU__)108#define GTEST_OS_HAIKU 1109#elif defined ESP8266110#define GTEST_OS_ESP8266 1111#elif defined ESP32112#define GTEST_OS_ESP32 1113#elif defined(__XTENSA__)114#define GTEST_OS_XTENSA 1115#elif defined(__hexagon__)116#define GTEST_OS_QURT 1117#elif defined(CPU_QN9090) || defined(CPU_QN9090HN)118#define GTEST_OS_NXP_QN9090 1119#elif defined(NRF52)120#define GTEST_OS_NRF52 1121#endif // __CYGWIN__122123#endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_124125126