Remove TD_EXPERIMENTAL_WATCH_OS.

This commit is contained in:
levlam 2021-09-24 13:41:22 +03:00
parent a1d1d2160b
commit 61c3a2bcf5
9 changed files with 13 additions and 17 deletions

View File

@ -48,9 +48,9 @@ endif (CMAKE_UNAME)
# Force the compilers to gcc for iOS
set (CMAKE_C_COMPILER /usr/bin/gcc)
set (CMAKE_CXX_COMPILER /usr/bin/g++)
set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
set(PKG_CONFIG_EXECUTABLE pkg-config CACHE FILEPATH "" FORCE)
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
set (CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
set (PKG_CONFIG_EXECUTABLE pkg-config CACHE FILEPATH "" FORCE)
# Setup iOS platform unless specified manually with IOS_PLATFORM
if (NOT DEFINED IOS_PLATFORM)

View File

@ -41,7 +41,6 @@ prevent_in_source_build()
option(TD_ENABLE_JNI "Use \"ON\" to enable JNI-compatible TDLib API.")
option(TD_ENABLE_DOTNET "Use \"ON\" to enable generation of C++/CLI or C++/CX TDLib API bindings.")
option(TD_EXPERIMENTAL_WATCH_OS "Use \"ON\" to enable watch os support.")
if (TD_ENABLE_DOTNET AND (CMAKE_VERSION VERSION_LESS "3.1.0"))
message(FATAL_ERROR "CMake 3.1.0 or higher is required. You are running version ${CMAKE_VERSION}.")

View File

@ -36,10 +36,8 @@ do
if [[ $platform = "macOS" ]]; then
other_options="-DCMAKE_OSX_ARCHITECTURES='x86_64;arm64'"
else
watchos=""
if [[ $platform = "watchOS" ]]; then
ios_platform="WATCH"
watchos="-DTD_EXPERIMENTAL_WATCH_OS=ON"
elif [[ $platform = "tvOS" ]]; then
ios_platform="TV"
else
@ -54,7 +52,7 @@ do
fi
echo "iOS platform = ${ios_platform}"
other_options="${watchos} -DIOS_PLATFORM=${ios_platform} -DCMAKE_TOOLCHAIN_FILE=${td_path}/CMake/iOS.cmake"
other_options="-DIOS_PLATFORM=${ios_platform} -DCMAKE_TOOLCHAIN_FILE=${td_path}/CMake/iOS.cmake"
fi
set_cmake_options $platform

View File

@ -11,7 +11,7 @@
#include "td/mtproto/ProxySecret.h"
#include "td/mtproto/Transport.h"
#if TD_EXPERIMENTAL_WATCH_OS
#if TD_DARWIN_WATCH_OS
#include "td/net/DarwinHttp.h"
#endif
@ -259,7 +259,7 @@ class RawConnectionDefault final : public RawConnection {
}
};
#if TD_EXPERIMENTAL_WATCH_OS
#if TD_DARWIN_WATCH_OS
class RawConnectionHttp final : public RawConnection {
public:
RawConnectionHttp(IPAddress ip_address, unique_ptr<StatsCallback> stats_callback)
@ -452,7 +452,7 @@ class RawConnectionHttp final : public RawConnection {
unique_ptr<RawConnection> RawConnection::create(IPAddress ip_address, SocketFd socket_fd, TransportType transport_type,
unique_ptr<StatsCallback> stats_callback) {
#if TD_EXPERIMENTAL_WATCH_OS
#if TD_DARWIN_WATCH_OS
return td::make_unique<RawConnectionHttp>(ip_address, std::move(stats_callback));
#else
return td::make_unique<RawConnectionDefault>(std::move(socket_fd), transport_type, std::move(stats_callback));

View File

@ -705,7 +705,7 @@ Result<SocketFd> ConnectionCreator::find_connection(const Proxy &proxy, const IP
bool prefer_ipv6 =
G()->shared_config().get_option_boolean("prefer_ipv6") || (proxy.use_proxy() && proxy_ip_address.is_ipv6());
bool only_http = proxy.use_http_caching_proxy();
#if TD_EXPERIMENTAL_WATCH_OS
#if TD_DARWIN_WATCH_OS
only_http = true;
#endif
TRY_RESULT(info, dc_options_set_.find_connection(

View File

@ -48,7 +48,7 @@ set(TDNET_SOURCE
td/net/Wget.h
)
if (TD_EXPERIMENTAL_WATCH_OS)
if (APPLE_WATCH)
set(TDNET_SOURCE
${TDNET_SOURCE}
td/net/DarwinHttp.mm
@ -77,7 +77,7 @@ if (WIN32)
endif()
endif()
if (TD_EXPERIMENTAL_WATCH_OS)
if (APPLE_WATCH)
find_library(FOUNDATION_LIBRARY Foundation REQUIRED)
target_link_libraries(tdnet PRIVATE ${FOUNDATION_LIBRARY})
endif()

View File

@ -6,4 +6,3 @@
#cmakedefine01 TD_HAVE_COROUTINES
#cmakedefine01 TD_HAVE_ABSL
#cmakedefine01 TD_FD_DEBUG
#cmakedefine01 TD_EXPERIMENTAL_WATCH_OS

View File

@ -622,7 +622,7 @@ Result<SocketFd> SocketFd::from_native_fd(NativeFd fd) {
}
Result<SocketFd> SocketFd::open(const IPAddress &address) {
#if TD_EXPERIMENTAL_WATCH_OS
#if TD_DARWIN_WATCH_OS
return SocketFd{};
#endif

View File

@ -6,7 +6,7 @@
//
#include "data.h"
#if TD_EXPERIMENTAL_WATCH_OS
#if TD_DARWIN_WATCH_OS
#include "td/net/DarwinHttp.h"
#endif
@ -468,7 +468,7 @@ TEST(Http, gzip_bomb_with_limit) {
ASSERT_TRUE(ok);
}
#if TD_EXPERIMENTAL_WATCH_OS
#if TD_DARWIN_WATCH_OS
struct Baton {
std::mutex mutex;
std::condition_variable cond;