Print warnings about unsupported OS/compiler only once.
This commit is contained in:
parent
ed291840d3
commit
e1fc85d610
@ -51,6 +51,7 @@ set(TDUTILS_SOURCE
|
||||
td/utils/port/IPAddress.cpp
|
||||
td/utils/port/MemoryMapping.cpp
|
||||
td/utils/port/path.cpp
|
||||
td/utils/port/platform.cpp
|
||||
td/utils/port/PollFlags.cpp
|
||||
td/utils/port/rlimit.cpp
|
||||
td/utils/port/ServerSocketFd.cpp
|
||||
|
23
tdutils/td/utils/port/platform.cpp
Normal file
23
tdutils/td/utils/port/platform.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
//
|
||||
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
#include "td/utils/port/platform.h"
|
||||
|
||||
#if !TD_MSVC
|
||||
|
||||
#if TD_DARWIN_UNKNOWN
|
||||
#warning "Probably unsupported Apple operating system. Feel free to try to compile"
|
||||
#endif
|
||||
|
||||
#if TD_UNIX_UNKNOWN
|
||||
#warning "Probably unsupported Unix operating system. Feel free to try to compile"
|
||||
#endif
|
||||
|
||||
#if TD_COMPILER_UNKNOWN
|
||||
#warning "Probably unsupported compiler. Feel free to try to compile"
|
||||
#endif
|
||||
|
||||
#endif
|
@ -20,7 +20,7 @@
|
||||
#elif defined(__APPLE__)
|
||||
#include "TargetConditionals.h"
|
||||
#if TARGET_OS_IPHONE
|
||||
// iOS/watchOS/tvOS
|
||||
// iOS/iPadOS/watchOS/tvOS
|
||||
#if TARGET_OS_IOS
|
||||
#define TD_DARWIN_IOS 1
|
||||
#elif TARGET_OS_TV
|
||||
@ -28,13 +28,13 @@
|
||||
#elif TARGET_OS_WATCH
|
||||
#define TD_DARWIN_WATCH_OS 1
|
||||
#else
|
||||
#warning "Probably unsupported Apple iPhone platform. Feel free to try to compile"
|
||||
#define TD_DARWIN_UNKNOWN 1
|
||||
#endif
|
||||
#elif TARGET_OS_MAC
|
||||
// Other kinds of macOS
|
||||
#define TD_DARWIN_MAC 1
|
||||
#else
|
||||
#warning "Probably unsupported Apple platform. Feel free to try to compile"
|
||||
#define TD_DARWIN_UNKNOWN 1
|
||||
#endif
|
||||
#define TD_DARWIN 1
|
||||
#elif defined(ANDROID) || defined(__ANDROID__)
|
||||
@ -55,7 +55,7 @@
|
||||
#define TD_EMSCRIPTEN 1
|
||||
#elif defined(TD_ILLUMOS)
|
||||
#elif defined(__unix__) // all unices not caught above
|
||||
#warning "Probably unsupported Unix platform. Feel free to try to compile"
|
||||
#define TD_UNIX_UNKNOWN 1
|
||||
#define TD_CYGWIN 1
|
||||
#else
|
||||
#error "Probably unsupported platform. Feel free to remove the error and try to recompile"
|
||||
@ -70,7 +70,7 @@
|
||||
#elif defined(_MSC_VER)
|
||||
#define TD_MSVC 1
|
||||
#else
|
||||
#warning "Probably unsupported compiler. Feel free to try to compile"
|
||||
#define TD_COMPILER_UNKNOWN 1
|
||||
#endif
|
||||
|
||||
#if TD_GCC || TD_CLANG || TD_INTEL
|
||||
|
Loading…
Reference in New Issue
Block a user