summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. King III <jking@apache.org>2019-01-11 23:06:08 -0500
committerJames E. King III <jking@apache.org>2019-01-13 09:01:52 -0500
commit17355425429274e7971fff39d7e45279cdf550fa (patch)
treeb616996ebfa0b8e9e06fb962f39887379ec2f6cc
parent278528cf7b1dd5dd977bce882aa126fac8695697 (diff)
downloadthrift-17355425429274e7971fff39d7e45279cdf550fa.tar.gz
THRIFT-4735: Remove Qt4 build support
-rw-r--r--CHANGES.md4
-rw-r--r--build/cmake/DefineOptions.cmake8
-rw-r--r--build/cmake/DefinePlatformSpecifc.cmake12
-rwxr-xr-xbuild/veralign.sh1
-rw-r--r--compiler/cpp/src/thrift/main.cc2
-rwxr-xr-xconfigure.ac15
-rw-r--r--contrib/Vagrantfile2
-rwxr-xr-xlib/cpp/CMakeLists.txt22
-rwxr-xr-xlib/cpp/Makefile.am19
-rwxr-xr-xlib/cpp/README.md6
-rw-r--r--lib/cpp/test/CMakeLists.txt12
-rwxr-xr-xlib/cpp/thrift-qt.pc.in30
-rw-r--r--lib/swift/Tests/ThriftTests/ThriftTests.swift2
13 files changed, 21 insertions, 114 deletions
diff --git a/CHANGES.md b/CHANGES.md
index ef6f240a3..7d76413cc 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -10,6 +10,10 @@
- [THRIFT-4709](https://issues.apache.org/jira/browse/THRIFT-4709) - Java changes to UTF-8 handling require JDK 1.7 at a minimum
- [THRIFT-4712](https://issues.apache.org/jira/browse/THRIFT-4712) - Java class org.apache.thrift.ShortStack is no longer public
- [THRIFT-4720](https://issues.apache.org/jira/browse/THRIFT-4720) - C++03/C++98 support has been removed; also removed boost as a runtime dependency
+- [THRIFT-4730](https://issues.apache.org/jira/browse/THRIFT-4730) - C++: BoostThreadFactory, PosixThreadFactory, StdThreadFactory removed
+- [THRIFT-4732](https://issues.apache.org/jira/browse/THRIFT-4732) - C++: CMake build changed to use BUILD_SHARED_LIBS
+- [THRIFT-4735](https://issues.apache.org/jira/browse/THRIFT-4735] - C++: Removed Qt4 support
+
### Known Isues (Blocker or Critical)
## 0.12.0
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index 19cb104e8..e9b094c7b 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -62,16 +62,9 @@ if(WITH_CPP)
find_package(Libevent QUIET)
CMAKE_DEPENDENT_OPTION(WITH_LIBEVENT "Build with libevent support" ON
"Libevent_FOUND" OFF)
- find_package(Qt4 QUIET COMPONENTS QtCore QtNetwork)
- CMAKE_DEPENDENT_OPTION(WITH_QT4 "Build with Qt4 support" ON
- "QT4_FOUND" OFF)
find_package(Qt5 QUIET COMPONENTS Core Network)
CMAKE_DEPENDENT_OPTION(WITH_QT5 "Build with Qt5 support" ON
"Qt5_FOUND" OFF)
- if(${WITH_QT4} AND ${WITH_QT5} AND ${CMAKE_MAJOR_VERSION} LESS 3)
- # cmake < 3.0.0 causes conflict when building both Qt4 and Qt5
- set(WITH_QT4 OFF)
- endif()
find_package(OpenSSL QUIET)
CMAKE_DEPENDENT_OPTION(WITH_OPENSSL "Build with OpenSSL support" ON
"OPENSSL_FOUND" OFF)
@@ -185,7 +178,6 @@ if (BUILD_CPP)
message(STATUS " Library features:")
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
message(STATUS " Build with libevent support: ${WITH_LIBEVENT}")
- message(STATUS " Build with Qt4 support: ${WITH_QT4}")
message(STATUS " Build with Qt5 support: ${WITH_QT5}")
message(STATUS " Build with ZLIB support: ${WITH_ZLIB}")
endif ()
diff --git a/build/cmake/DefinePlatformSpecifc.cmake b/build/cmake/DefinePlatformSpecifc.cmake
index ac33e2900..298780c97 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -59,22 +59,18 @@ if(MSVC)
foreach(CompilerFlag ${CompilerFlags})
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
endforeach()
- set(THRIFT_RUNTIME_POSTFIX "mt" CACHE STRING "Set static library postfix" FORCE)
+ set(THRIFT_RUNTIME_POSTFIX "mt" CACHE STRING "Set runtime library postfix" FORCE)
else(WITH_MT)
- set(THRIFT_RUNTIME_POSTFIX "md" CACHE STRING "Set static library postfix" FORCE)
+ set(THRIFT_RUNTIME_POSTFIX "md" CACHE STRING "Set runtime library postfix" FORCE)
endif(WITH_MT)
# Disable boost auto linking pragmas - cmake includes the right files
add_definitions("-DBOOST_ALL_NO_LIB")
- # Windows build does not know how to make a shared library yet
- # as there are no __declspec(dllexport) or exports files in the project.
- if (WITH_SHARED_LIB)
- message (FATAL_ERROR "Windows build does not support shared library output yet, please set -DWITH_SHARED_LIB=off")
- endif()
-
add_definitions("/MP") # parallel build
add_definitions("/W3") # warning level 3
+
+ add_definitions("-DUNICODE -D_UNICODE")
elseif(UNIX)
find_program( MEMORYCHECK_COMMAND valgrind )
set( MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all --leak-check=full" )
diff --git a/build/veralign.sh b/build/veralign.sh
index b9c1e71bf..4ed7c5174 100755
--- a/build/veralign.sh
+++ b/build/veralign.sh
@@ -85,6 +85,7 @@ FILES[lib/rb/thrift.gemspec]=simpleReplace
FILES[lib/rs/Cargo.toml]=simpleReplace
FILES[lib/st/package.xml]=simpleReplace
FILES[lib/swift/Sources/Thrift.swift]=simpleReplace
+FILES[lib/swift/Tests/ThriftTests/ThriftTests.swift]=simpleReplace
FILES[package.json]=jsonReplace
FILES[sonar-project.properties]=simpleReplace
FILES[test/csharp/Properties/AssemblyInfo.cs]=simpleReplace
diff --git a/compiler/cpp/src/thrift/main.cc b/compiler/cpp/src/thrift/main.cc
index cdc171c7a..eddbd56b0 100644
--- a/compiler/cpp/src/thrift/main.cc
+++ b/compiler/cpp/src/thrift/main.cc
@@ -171,7 +171,7 @@ char* saferealpath(const char* path, char* resolved_path) {
#ifdef _WIN32
char buf[MAX_PATH];
char* basename;
- DWORD len = GetFullPathName(path, MAX_PATH, buf, &basename);
+ DWORD len = GetFullPathNameA(path, MAX_PATH, buf, &basename);
if (len == 0 || len > MAX_PATH - 1) {
strcpy(resolved_path, path);
} else {
diff --git a/configure.ac b/configure.ac
index 21746292b..d229734a8 100755
--- a/configure.ac
+++ b/configure.ac
@@ -161,18 +161,6 @@ if test "$with_cpp" = "yes"; then
AX_LIB_ZLIB([1.2.3])
have_zlib=$success
- AX_THRIFT_LIB(qt4, [Qt], yes)
- have_qt=no
- if test "$with_qt4" = "yes"; then
- PKG_CHECK_MODULES([QT], [QtCore >= 4.3, QtNetwork >= 4.3], have_qt=yes, have_qt=no)
- fi
- if test "$have_qt" = "yes"; then
- AC_PATH_PROGS([QT_MOC], [moc-qt4 moc], "fail")
- if test "$QT_MOC" = "fail"; then
- have_qt=no
- fi
- fi
-
AX_THRIFT_LIB(qt5, [Qt5], yes)
have_qt5=no
qt_reduce_reloc=""
@@ -191,7 +179,6 @@ fi
AM_CONDITIONAL([WITH_CPP], [test "$have_cpp" = "yes"])
AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$have_libevent" = "yes"])
AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$have_zlib" = "yes"])
-AM_CONDITIONAL([AMX_HAVE_QT], [test "$have_qt" = "yes"])
AM_CONDITIONAL([AMX_HAVE_QT5], [test "$have_qt5" = "yes"])
AM_CONDITIONAL([QT5_REDUCE_RELOCATIONS], [test "x$qt_reduce_reloc" != "x"])
@@ -811,7 +798,6 @@ AC_CONFIG_FILES([
lib/cpp/test/Makefile
lib/cpp/thrift-nb.pc
lib/cpp/thrift-z.pc
- lib/cpp/thrift-qt.pc
lib/cpp/thrift-qt5.pc
lib/cpp/thrift.pc
lib/c_glib/Makefile
@@ -971,7 +957,6 @@ if test "$have_cpp" = "yes" ; then
echo " C++ compiler .............. : $CXX"
echo " Build TZlibTransport ...... : $have_zlib"
echo " Build TNonblockingServer .. : $have_libevent"
- echo " Build TQTcpServer (Qt4) ... : $have_qt"
echo " Build TQTcpServer (Qt5) ... : $have_qt5"
echo " C++ compiler version ...... : $($CXX --version | head -1)"
fi
diff --git a/contrib/Vagrantfile b/contrib/Vagrantfile
index ff53316bb..b34056333 100644
--- a/contrib/Vagrantfile
+++ b/contrib/Vagrantfile
@@ -37,7 +37,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -qq -y
# Install Dependencies
# ---
# General dependencies
-sudo apt-get install -qq automake libtool flex bison pkg-config g++ libssl-dev make libqt4-dev git debhelper
+sudo apt-get install -qq automake libtool flex bison pkg-config g++ libssl-dev make git debhelper
# C++ dependencies
sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libboost-filesystem-dev libboost-system-dev libevent-dev
diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt
index 8e5ebcf61..90a6c2885 100755
--- a/lib/cpp/CMakeLists.txt
+++ b/lib/cpp/CMakeLists.txt
@@ -94,8 +94,7 @@ else()
)
endif()
-# If OpenSSL is not found just ignore the OpenSSL stuff
-find_package(OpenSSL)
+# If OpenSSL is not found or disabled just ignore the OpenSSL stuff
if(OPENSSL_FOUND AND WITH_OPENSSL)
list( APPEND thriftcpp_SOURCES
src/thrift/transport/TSSLSocket.cpp
@@ -128,7 +127,7 @@ set( thriftcppnb_SOURCES
src/thrift/async/TEvhttpClientChannel.cpp
)
-# Thrift zlib server
+# Thrift zlib transport
set( thriftcppz_SOURCES
src/thrift/transport/TZlibTransport.cpp
src/thrift/protocol/THeaderProtocol.cpp
@@ -137,12 +136,6 @@ set( thriftcppz_SOURCES
src/thrift/transport/THeaderTransport.cpp
)
-# Thrift Qt4 server
-set( thriftcppqt_SOURCES
- src/thrift/qt/TQIODeviceTransport.cpp
- src/thrift/qt/TQTcpServer.cpp
-)
-
# Contains the thrift specific ADD_LIBRARY_THRIFT and TARGET_LINK_LIBRARIES_THRIFT
include(ThriftMacros)
@@ -171,16 +164,7 @@ if(WITH_ZLIB)
TARGET_LINK_LIBRARIES_THRIFT_AGAINST_THRIFT_LIBRARY(thriftz thrift)
endif()
-if(WITH_QT4)
- set(CMAKE_AUTOMOC ON)
- find_package(Qt4 REQUIRED COMPONENTS QtCore QtNetwork)
- ADD_LIBRARY_THRIFT(thriftqt ${thriftcppqt_SOURCES})
- TARGET_LINK_LIBRARIES_THRIFT(thriftqt ${SYSLIBS} Qt4::QtCore Qt4::QtNetwork)
- TARGET_LINK_LIBRARIES_THRIFT_AGAINST_THRIFT_LIBRARY(thriftqt thrift)
-endif()
-
if(WITH_QT5)
- # Qt5 has its own directory to avoid conflict with Qt4 caused by CMAKE_AUTOMOC
add_subdirectory(src/thrift/qt)
endif()
@@ -188,8 +172,6 @@ if(MSVC)
add_definitions("-DUNICODE -D_UNICODE")
endif()
-add_definitions("-D__STDC_LIMIT_MACROS")
-
# Install the headers
install(DIRECTORY "src/thrift" DESTINATION "${INCLUDE_INSTALL_DIR}"
FILES_MATCHING PATTERN "*.h" PATTERN "*.tcc")
diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am
index 19bedd753..de0c058c1 100755
--- a/lib/cpp/Makefile.am
+++ b/lib/cpp/Makefile.am
@@ -19,9 +19,6 @@
AUTOMAKE_OPTIONS = subdir-objects
-moc_%.cpp: %.h
- $(QT_MOC) $(QT_CFLAGS) $< -o $@
-
moc__%.cpp: %.h
$(QT5_MOC) $(QT5_CFLAGS) $< -o $@
@@ -52,10 +49,6 @@ if AMX_HAVE_ZLIB
lib_LTLIBRARIES += libthriftz.la
pkgconfig_DATA += thrift-z.pc
endif
-if AMX_HAVE_QT
-lib_LTLIBRARIES += libthriftqt.la
-pkgconfig_DATA += thrift-qt.pc
-endif
if AMX_HAVE_QT5
lib_LTLIBRARIES += libthriftqt5.la
pkgconfig_DATA += thrift-qt5.pc
@@ -120,33 +113,24 @@ libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp \
src/thrift/protocol/THeaderProtocol.cpp
-libthriftqt_la_MOC = src/thrift/qt/moc_TQTcpServer.cpp
-nodist_libthriftqt_la_SOURCES = $(libthriftqt_la_MOC)
-libthriftqt_la_SOURCES = src/thrift/qt/TQIODeviceTransport.cpp \
- src/thrift/qt/TQTcpServer.cpp
-CLEANFILES = $(libthriftqt_la_MOC)
-
libthriftqt5_la_MOC = src/thrift/qt/moc__TQTcpServer.cpp
nodist_libthriftqt5_la_SOURCES = $(libthriftqt5_la_MOC)
libthriftqt5_la_SOURCES = src/thrift/qt/TQIODeviceTransport.cpp \
src/thrift/qt/TQTcpServer.cpp
-CLEANFILES += $(libthriftqt5_la_MOC)
+CLEANFILES = $(libthriftqt5_la_MOC)
# Flags for the various libraries
libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
libthriftz_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
-libthriftqt_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT_CFLAGS)
libthriftqt5_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT5_CFLAGS)
if QT5_REDUCE_RELOCATIONS
libthriftqt5_la_CPPFLAGS += -fPIC
endif
libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS)
-libthriftqt_la_CXXFLAGS = $(AM_CXXFLAGS)
libthriftqt5_la_CXXFLAGS = $(AM_CXXFLAGS)
libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(ZLIB_LIBS)
-libthriftqt_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT_LIBS)
libthriftqt5_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT5_LIBS)
include_thriftdir = $(includedir)/thrift
@@ -269,7 +253,6 @@ EXTRA_DIST = \
thrift-nb.pc.in \
thrift.pc.in \
thrift-z.pc.in \
- thrift-qt.pc.in \
thrift-qt5.pc.in \
src/thrift/qt/CMakeLists.txt \
$(WINDOWS_DIST)
diff --git a/lib/cpp/README.md b/lib/cpp/README.md
index bc47d2d6d..ce46319b9 100755
--- a/lib/cpp/README.md
+++ b/lib/cpp/README.md
@@ -231,6 +231,7 @@ Support for Boost at runtime was deprecated.
## 1.0.0
+THRIFT-4720:
Support for C++03/C++98 has been dropped. Use version 0.12.0 to support that
language level. As a consequence, boost is no longer required as a runtime
library depenedency, but is is still required to build the runtime library
@@ -239,15 +240,20 @@ build dependency for folks who just want to build the runtime and not
run the tests. This means the header thrift/stdcxx.h has been removed and
anything that relied on it has been changed to directly use C++11 concepts.
+THRIFT-4730:
The classes BoostThreadFactory, PosixThreadFactory, StdThreadFactory, and
PlatformThreadFactory have been removed, and we will use a ThreadFactory
based on C++11 (essentially StdThreadFactory was renamed ThreadFactory).
+THRIFT-4732:
The CMake build options WITH_SHARED_LIBS and WITH_STATIC_LIBS are deprecated.
The project no longer performs a side-by-side static and shared build; you
tell CMake through BUILD_SHARED_LIBS whether to make shared or static
libraries now. This is CMake standard behavior.
+THRIFT-4735:
+Qt4 support was removed.
+
## 0.11.0
Older versions of thrift depended on the <boost/smart_ptr.hpp> classes which
diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt
index 8a8aadad1..ef08dbce2 100644
--- a/lib/cpp/test/CMakeLists.txt
+++ b/lib/cpp/test/CMakeLists.txt
@@ -336,18 +336,6 @@ add_test(NAME SecurityTest COMMAND SecurityTest -- "${CMAKE_CURRENT_SOURCE_DIR}/
endif()
-if(WITH_QT4)
-set(CMAKE_AUTOMOC ON)
-find_package(Qt4 REQUIRED COMPONENTS QtTest)
-set(TQTcpServerTest_SOURCES
- qt/TQTcpServerTest.cpp
-)
-add_executable(TQTcpServerTest ${TQTcpServerTest_SOURCES})
-target_link_libraries(TQTcpServerTest testgencpp_cob thriftqt Qt4::QtTest)
-LINK_AGAINST_THRIFT_LIBRARY(TQTcpServerTest thrift)
-add_test(NAME TQTcpServerTest COMMAND TQTcpServerTest)
-endif()
-
if(WITH_QT5)
add_subdirectory(qt)
endif()
diff --git a/lib/cpp/thrift-qt.pc.in b/lib/cpp/thrift-qt.pc.in
deleted file mode 100755
index 5e60d840d..000000000
--- a/lib/cpp/thrift-qt.pc.in
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: Thrift
-Description: Thrift Qt API
-Version: @VERSION@
-Requires: thrift = @VERSION@
-Libs: -L${libdir} -lthriftqt
-Cflags: -I${includedir}
diff --git a/lib/swift/Tests/ThriftTests/ThriftTests.swift b/lib/swift/Tests/ThriftTests/ThriftTests.swift
index 931610018..8f0b1fe18 100644
--- a/lib/swift/Tests/ThriftTests/ThriftTests.swift
+++ b/lib/swift/Tests/ThriftTests/ThriftTests.swift
@@ -3,7 +3,7 @@ import XCTest
class ThriftTests: XCTestCase {
func testVersion() {
- XCTAssertEqual(Thrift().version, "1.1.0")
+ XCTAssertEqual(Thrift().version, "1.0.0")
}
func test_in_addr_extension() {