Upgrading dependency to Thrift 0.12.0
This commit is contained in:
parent
3e4590dcc0
commit
356978cb42
1302 changed files with 101701 additions and 26784 deletions
146
vendor/git.apache.org/thrift.git/.gitignore
generated
vendored
146
vendor/git.apache.org/thrift.git/.gitignore
generated
vendored
|
@ -21,28 +21,41 @@
|
|||
*.swp
|
||||
*.hi
|
||||
*~
|
||||
tags
|
||||
|
||||
.*project
|
||||
.classpath
|
||||
.dub
|
||||
.settings
|
||||
.checkstyle
|
||||
junit*.properties
|
||||
.idea
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
gen-*
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
acinclude.m4
|
||||
apache-thrift-test-library
|
||||
autom4te.cache
|
||||
cmake-*
|
||||
dub.selections.json
|
||||
libapache-thrift.a
|
||||
node_modules
|
||||
compile
|
||||
test-driver
|
||||
erl_crash.dump
|
||||
project.lock.json
|
||||
|
||||
.sonar
|
||||
.DS_Store
|
||||
.svn
|
||||
.vagrant
|
||||
.vscode
|
||||
.vs
|
||||
|
||||
/contrib/.vagrant/
|
||||
/aclocal/libtool.m4
|
||||
/aclocal/lt*.m4
|
||||
/autoscan.log
|
||||
|
@ -77,6 +90,7 @@ erl_crash.dump
|
|||
/configure
|
||||
/configure.lineno
|
||||
/configure.scan
|
||||
/contrib/.vagrant/
|
||||
/contrib/fb303/config.cache
|
||||
/contrib/fb303/config.log
|
||||
/contrib/fb303/config.status
|
||||
|
@ -91,6 +105,13 @@ erl_crash.dump
|
|||
/contrib/fb303/py/fb303/ttypes.py
|
||||
/depcomp
|
||||
/install-sh
|
||||
/lib/cl/backport-update.zip
|
||||
/lib/cl/lib
|
||||
/lib/cl/run-tests
|
||||
/lib/cl/quicklisp.lisp
|
||||
/lib/cl/externals/
|
||||
/lib/cl/run-tests
|
||||
/lib/cl/quicklisp/
|
||||
/lib/cpp/Debug/
|
||||
/lib/cpp/Debug-mt/
|
||||
/lib/cpp/Release/
|
||||
|
@ -101,6 +122,7 @@ erl_crash.dump
|
|||
/lib/cpp/src/thrift/stamp-h2
|
||||
/lib/cpp/test/Benchmark
|
||||
/lib/cpp/test/AllProtocolsTest
|
||||
/lib/cpp/test/AnnotationTest
|
||||
/lib/cpp/test/DebugProtoTest
|
||||
/lib/cpp/test/DenseProtoTest
|
||||
/lib/cpp/test/EnumTest
|
||||
|
@ -108,12 +130,14 @@ erl_crash.dump
|
|||
/lib/cpp/test/OptionalRequiredTest
|
||||
/lib/cpp/test/SecurityTest
|
||||
/lib/cpp/test/SpecializationTest
|
||||
/lib/cpp/test/ReflectionTest
|
||||
/lib/cpp/test/RecursiveTest
|
||||
/lib/cpp/test/ReflectionTest
|
||||
/lib/cpp/test/RenderedDoubleConstantsTest
|
||||
/lib/cpp/test/TFDTransportTest
|
||||
/lib/cpp/test/TFileTransportTest
|
||||
/lib/cpp/test/TInterruptTest
|
||||
/lib/cpp/test/TNonblockingServerTest
|
||||
/lib/cpp/test/TNonblockingSSLServerTest
|
||||
/lib/cpp/test/TPipedTransportTest
|
||||
/lib/cpp/test/TServerIntegrationTest
|
||||
/lib/cpp/test/TSocketInterruptTest
|
||||
|
@ -149,6 +173,7 @@ erl_crash.dump
|
|||
/lib/c_glib/test/testframedtransport
|
||||
/lib/c_glib/test/testmemorybuffer
|
||||
/lib/c_glib/test/testoptionalrequired
|
||||
/lib/c_glib/test/testtransportsslsocket
|
||||
/lib/c_glib/test/testsimpleserver
|
||||
/lib/c_glib/test/teststruct
|
||||
/lib/c_glib/test/testthrifttest
|
||||
|
@ -175,46 +200,35 @@ erl_crash.dump
|
|||
/lib/dart/**/packages
|
||||
/lib/dart/**/.pub/
|
||||
/lib/dart/**/pubspec.lock
|
||||
/lib/delphi/src/*.dcu
|
||||
/lib/delphi/test/*.identcache
|
||||
/lib/delphi/test/*.local
|
||||
/lib/delphi/test/*.dcu
|
||||
/lib/delphi/test/*.2007
|
||||
/lib/delphi/test/*.dproj
|
||||
/lib/delphi/test/*.dproj
|
||||
/lib/delphi/test/codegen/*.bat
|
||||
/lib/delphi/test/skip/*.local
|
||||
/lib/delphi/test/skip/*.identcache
|
||||
/lib/delphi/test/skip/*.identcache
|
||||
/lib/delphi/test/skip/*.dproj
|
||||
/lib/delphi/test/skip/*.dproj
|
||||
/lib/delphi/test/skip/*.2007
|
||||
/lib/delphi/test/serializer/*.identcache
|
||||
/lib/delphi/test/serializer/*.dproj
|
||||
/lib/delphi/test/serializer/*.local
|
||||
/lib/delphi/test/serializer/*.2007
|
||||
/lib/delphi/test/serializer/*.dcu
|
||||
/lib/delphi/test/multiplexed/*.dproj
|
||||
/lib/delphi/test/multiplexed/*.2007
|
||||
/lib/delphi/test/multiplexed/*.local
|
||||
/lib/delphi/test/multiplexed/*.identcache
|
||||
/lib/delphi/test/multiplexed/*.dcu
|
||||
/lib/delphi/test/typeregistry/*.2007
|
||||
/lib/delphi/test/typeregistry/*.dproj
|
||||
/lib/delphi/test/typeregistry/*.identcache
|
||||
/lib/delphi/test/typeregistry/*.local
|
||||
/lib/delphi/test/typeregistry/*.dcu
|
||||
/lib/erl/.generated
|
||||
/lib/delphi/test/skip/*.request
|
||||
/lib/delphi/test/skip/*.response
|
||||
/lib/delphi/**/*.identcache
|
||||
/lib/delphi/**/*.local
|
||||
/lib/delphi/**/*.dcu
|
||||
/lib/delphi/**/*.2007
|
||||
/lib/delphi/**/*.dproj
|
||||
/lib/delphi/**/codegen/*.bat
|
||||
/lib/erl/.eunit
|
||||
/lib/erl/ebin
|
||||
/lib/erl/.generated
|
||||
/lib/erl/.rebar/
|
||||
/lib/erl/deps/
|
||||
/lib/erl/ebin
|
||||
/lib/erl/src/thrift.app.src
|
||||
/lib/erl/test/*.hrl
|
||||
/lib/erl/test/*.beam
|
||||
/lib/erl/test/*.hrl
|
||||
/lib/erl/test/Thrift_omit_without.thrift
|
||||
/lib/haxe/test/bin
|
||||
/lib/haxe/test/data.tmp
|
||||
/lib/hs/dist
|
||||
/lib/java/.gradle
|
||||
/lib/java/android/.gradle
|
||||
/lib/java/build
|
||||
/lib/java/target
|
||||
/lib/js/dist
|
||||
/lib/js/doc
|
||||
/lib/js/test/build
|
||||
/lib/netcore/**/bin
|
||||
/lib/netcore/**/obj
|
||||
/lib/nodejs/coverage
|
||||
/lib/nodejs/node_modules/
|
||||
/lib/perl/MANIFEST
|
||||
|
@ -238,6 +252,7 @@ erl_crash.dump
|
|||
/lib/php/src/ext/thrift_protocol/build/
|
||||
/lib/php/src/ext/thrift_protocol/config.*
|
||||
/lib/php/src/ext/thrift_protocol/configure
|
||||
/lib/php/src/ext/thrift_protocol/configure.ac
|
||||
/lib/php/src/ext/thrift_protocol/configure.in
|
||||
/lib/php/src/ext/thrift_protocol/install-sh
|
||||
/lib/php/src/ext/thrift_protocol/libtool
|
||||
|
@ -254,21 +269,41 @@ erl_crash.dump
|
|||
/lib/php/test/packages/
|
||||
/lib/py/dist/
|
||||
/lib/erl/logs/
|
||||
/lib/go/pkg
|
||||
/lib/go/src
|
||||
/lib/go/test/gopath/
|
||||
/lib/go/test/ThriftTest.thrift
|
||||
/lib/rs/target/
|
||||
/lib/rs/Cargo.lock
|
||||
/lib/rs/test/Cargo.lock
|
||||
/lib/rs/test/target/
|
||||
/lib/rs/test/bin/
|
||||
/lib/rs/test/src/base_one.rs
|
||||
/lib/rs/test/src/base_two.rs
|
||||
/lib/rs/test/src/midlayer.rs
|
||||
/lib/rs/test/src/recursive.rs
|
||||
/lib/rs/test/src/ultimate.rs
|
||||
/lib/rs/*.iml
|
||||
/lib/rs/**/*.iml
|
||||
/libtool
|
||||
/ltmain.sh
|
||||
/missing
|
||||
/node_modules/
|
||||
/vendor/
|
||||
/composer.lock
|
||||
/stamp-h1
|
||||
/test/features/results.json
|
||||
/test/results.json
|
||||
/test/c_glib/test_client
|
||||
/test/c_glib/test_server
|
||||
/test/cl/TestServer
|
||||
/test/cl/TestClient
|
||||
/test/cpp/StressTest
|
||||
/test/cpp/StressTestNonBlocking
|
||||
/test/cpp/TestClient
|
||||
/test/cpp/TestServer
|
||||
/test/csharp/obj
|
||||
/test/csharp/bin
|
||||
/test/dart/**/.packages
|
||||
/test/dart/**/packages
|
||||
/test/dart/**/.pub/
|
||||
|
@ -276,20 +311,36 @@ erl_crash.dump
|
|||
/test/log/
|
||||
/test/test.log
|
||||
/test/erl/.generated
|
||||
/test/erl/.rebar
|
||||
/test/erl/ebin
|
||||
/test/go/bin/
|
||||
/test/go/ThriftTest.thrift
|
||||
/test/go/gopath
|
||||
/test/go/pkg/
|
||||
/test/go/src/code.google.com/
|
||||
/test/go/src/common/mock_handler.go
|
||||
/test/go/src/github.com/golang/
|
||||
/test/go/src/golang.org/
|
||||
/test/go/src/gen/
|
||||
/test/go/src/thrift
|
||||
/test/haxe/bin
|
||||
/test/hs/TestClient
|
||||
/test/hs/TestServer
|
||||
/test/php/php_ext_dir/
|
||||
/test/py.twisted/_trial_temp/
|
||||
/test/rb/Gemfile.lock
|
||||
/test/netcore/**/bin
|
||||
/test/netcore/**/obj
|
||||
/test/netcore/Thrift
|
||||
/test/php/php_ext_dir/
|
||||
/test/rs/Cargo.lock
|
||||
/test/rs/src/thrift_test.rs
|
||||
/test/rs/bin/
|
||||
/test/rs/target/
|
||||
/test/rs/*.iml
|
||||
/test/rs/**/*.iml
|
||||
/tutorial/cl/TutorialClient
|
||||
/tutorial/cl/TutorialServer
|
||||
/tutorial/cpp/TutorialClient
|
||||
/tutorial/cpp/TutorialServer
|
||||
/tutorial/c_glib/tutorial_client
|
||||
|
@ -305,22 +356,31 @@ erl_crash.dump
|
|||
/tutorial/dart/**/packages
|
||||
/tutorial/dart/**/.pub/
|
||||
/tutorial/dart/**/pubspec.lock
|
||||
/tutorial/delphi/*.dsk
|
||||
/tutorial/delphi/*.local
|
||||
/tutorial/delphi/*.tvsconfig
|
||||
/tutorial/delphi/DelphiClient/dcu
|
||||
/tutorial/delphi/DelphiServer/dcu
|
||||
/tutorial/delphi/DelphiClient/*.local
|
||||
/tutorial/delphi/DelphiClient/*.identcache
|
||||
/tutorial/delphi/DelphiServer/*.identcache
|
||||
/tutorial/delphi/DelphiServer/*.local
|
||||
/tutorial/delphi/**/*.dsk
|
||||
/tutorial/delphi/**/*.local
|
||||
/tutorial/delphi/**/*.tvsconfig
|
||||
/tutorial/delphi/**/dcu
|
||||
/tutorial/delphi/**/*.local
|
||||
/tutorial/delphi/**/*.identcache
|
||||
/tutorial/go/gopath
|
||||
/tutorial/go/go-tutorial
|
||||
/tutorial/go/calculator-remote
|
||||
/tutorial/go/src/shared
|
||||
/tutorial/go/src/tutorial
|
||||
/tutorial/go/src/git.apache.org
|
||||
/tutorial/go/src/golang.org
|
||||
/tutorial/haxe/bin
|
||||
/tutorial/hs/dist/
|
||||
/tutorial/java/build/
|
||||
/tutorial/js/build/
|
||||
/tutorial/netcore/**/bin
|
||||
/tutorial/netcore/**/obj
|
||||
/tutorial/netcore/Thrift
|
||||
/tutorial/rs/*.iml
|
||||
/tutorial/rs/src/shared.rs
|
||||
/tutorial/rs/src/tutorial.rs
|
||||
/tutorial/rs/bin
|
||||
/tutorial/rs/target
|
||||
/tutorial/rs/Cargo.lock
|
||||
/ylwrap
|
||||
|
||||
|
|
7
vendor/git.apache.org/thrift.git/.rustfmt.toml
generated
vendored
Normal file
7
vendor/git.apache.org/thrift.git/.rustfmt.toml
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
max_width = 100
|
||||
fn_args_layout = "Block"
|
||||
array_layout = "Block"
|
||||
where_style = "Rfc"
|
||||
generics_indent = "Block"
|
||||
fn_call_style = "Block"
|
||||
reorder_imported_names = true
|
304
vendor/git.apache.org/thrift.git/.travis.yml
generated
vendored
304
vendor/git.apache.org/thrift.git/.travis.yml
generated
vendored
|
@ -19,181 +19,163 @@
|
|||
|
||||
# build Apache Thrift on Travis CI - https://travis-ci.org/
|
||||
|
||||
#
|
||||
# Docker Integration
|
||||
# see: build/docker/README.md
|
||||
#
|
||||
|
||||
sudo: required
|
||||
dist: trusty
|
||||
language: cpp
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
install:
|
||||
- (travis_wait ./build/docker/check_unmodified.sh $DISTRO && touch .unmodified) || true
|
||||
- if [ ! -f .unmodified ]; then travis_retry travis_wait docker build -q -t thrift-build:$DISTRO build/docker/$DISTRO; fi
|
||||
- if [[ `uname` == "Linux" ]]; then build/docker/refresh.sh; fi
|
||||
|
||||
script:
|
||||
- docker run --net=host -e BUILD_LIBS="$BUILD_LIBS" $BUILD_ENV -v $(pwd):/thrift/src -it thrift-build:$DISTRO build/docker/scripts/$SCRIPT $BUILD_ARG
|
||||
stages:
|
||||
- docker # docker images
|
||||
- thrift # thrift build jobs
|
||||
|
||||
env:
|
||||
global:
|
||||
- TEST_NAME=""
|
||||
- SCRIPT="cmake.sh"
|
||||
- BUILD_ARG=""
|
||||
- BUILD_ENV="-e CC=clang -e CXX=clang++"
|
||||
- DISTRO=ubuntu
|
||||
- BUILD_ENV="-e CC=gcc -e CXX=g++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
|
||||
- DISTRO=ubuntu-bionic
|
||||
- BUILD_LIBS="CPP C_GLIB HASKELL JAVA PYTHON TESTING TUTORIALS" # only meaningful for CMake builds
|
||||
- TRAVIS_BUILD_STAGE=test
|
||||
# DOCKER_REPO (this works for all builds as a source for docker images - you can override for fork builds in your Travis settings)
|
||||
- DOCKER_REPO="thrift/thrift-build"
|
||||
# DOCKER_USER (provide in your Travis settings if you want to build and update docker images once, instead of on every job)
|
||||
# DOCKER_PASS (same)
|
||||
|
||||
matrix:
|
||||
- TEST_NAME="Cross Language Tests (Binary and Header Protocols)"
|
||||
SCRIPT="cross-test.sh"
|
||||
BUILD_ARG="-'(binary|header)'"
|
||||
BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
|
||||
|
||||
- TEST_NAME="Cross Language Tests (Debian) (Binary and Header Protocols)"
|
||||
SCRIPT="cross-test.sh"
|
||||
BUILD_ARG="-'(binary|header)'"
|
||||
BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
|
||||
DISTRO=debian
|
||||
|
||||
- TEST_NAME="Cross Language Tests (Compact and JSON Protocols)"
|
||||
SCRIPT="cross-test.sh"
|
||||
BUILD_ARG="-'(compact|json)'"
|
||||
BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
|
||||
|
||||
- TEST_NAME="Cross Language Tests (Debian) (Compact and JSON Protocols)"
|
||||
SCRIPT="cross-test.sh"
|
||||
BUILD_ARG="-'(compact|json)'"
|
||||
BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
|
||||
DISTRO=debian
|
||||
|
||||
# TODO: Remove them once migrated to CMake
|
||||
# Autotools builds
|
||||
- TEST_NAME="C C++ C# D Erlang Haxe Go (automake)"
|
||||
SCRIPT="autotools.sh"
|
||||
BUILD_ARG="--without-dart --without-haskell --without-java --without-lua --without-nodejs --without-perl --without-php --without-php_extension --without-python --without-ruby"
|
||||
|
||||
- TEST_NAME="C C++ - GCC (automake)"
|
||||
SCRIPT="autotools.sh"
|
||||
BUILD_ARG="--without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-dart --without-ruby --without-haskell --without-go --without-haxe --without-d"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
|
||||
- TEST_NAME="Java Lua PHP Ruby Dart (automake)"
|
||||
SCRIPT="autotools.sh"
|
||||
BUILD_ARG="--without-cpp --without-haskell --without-c_glib --without-csharp --without-d --without-erlang --without-go --without-haxe --without-nodejs --without-python --without-perl"
|
||||
|
||||
# These are flaky (due to cabal and npm network/server failures) and also have lengthy output
|
||||
- TEST_NAME="Haskell Node.js Python Perl (automake)"
|
||||
SCRIPT="autotools.sh"
|
||||
BUILD_ARG="--without-cpp --without-c_glib --without-csharp --without-d --without-dart --without-erlang --without-go --without-haxe --without-java --without-lua --without-php --without-php_extension --without-ruby"
|
||||
|
||||
# CMake build
|
||||
- TEST_NAME="All"
|
||||
|
||||
- TEST_NAME="All (Debian)"
|
||||
DISTRO=debian
|
||||
|
||||
- TEST_NAME="C C++ - GCC"
|
||||
BUILD_LIBS="CPP C_GLIB TESTING TUTORIALS"
|
||||
BUILD_ARG="-DWITH_PYTHON=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
|
||||
- TEST_NAME="C++ (Boost Thread)"
|
||||
BUILD_LIBS="CPP TESTING TUTORIALS"
|
||||
BUILD_ARG="-DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
|
||||
|
||||
- TEST_NAME="C++ (Boost Thread - GCC)"
|
||||
BUILD_LIBS="CPP TESTING TUTORIALS"
|
||||
BUILD_ARG="-DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
|
||||
- TEST_NAME="C++ (Std Thread)"
|
||||
BUILD_LIBS="CPP TESTING TUTORIALS"
|
||||
BUILD_ARG="-DWITH_STDTHREADS=ON -DCMAKE_CXX_FLAGS='-std=c++11' -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
|
||||
|
||||
- TEST_NAME="C++ (Std Thread - GCC)"
|
||||
BUILD_LIBS="CPP TESTING TUTORIALS"
|
||||
BUILD_ARG="-DWITH_STDTHREADS=ON -DCMAKE_CXX_FLAGS='-std=c++11' -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
|
||||
- TEST_NAME="Compiler (mingw)"
|
||||
BUILD_LIBS=""
|
||||
BUILD_ARG="-DCMAKE_TOOLCHAIN_FILE=../build/cmake/mingw32-toolchain.cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF"
|
||||
BUILD_ENV=""
|
||||
|
||||
- TEST_NAME="All - GCC (CentOS)"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
DISTRO=centos
|
||||
|
||||
- TEST_NAME="C C++ - Clang (CentOS)"
|
||||
BUILD_LIBS="CPP C_GLIB TESTING TUTORIALS"
|
||||
BUILD_ARG="-DWITH_PYTHON=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
|
||||
DISTRO=centos
|
||||
|
||||
- TEST_NAME="Python 2.6 (CentOS 6)"
|
||||
BUILD_LIBS="PYTHON TESTING TUTORIALS"
|
||||
BUILD_ARG="-DWITH_PYTHON=ON -DWITH_CPP=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
DISTRO=centos6
|
||||
|
||||
# Distribution
|
||||
- TEST_NAME="make dist"
|
||||
SCRIPT="make-dist.sh"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
|
||||
- TEST_NAME="Debian Packages"
|
||||
SCRIPT="dpkg.sh"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
|
||||
- TEST_NAME="make dist (Debian)"
|
||||
SCRIPT="make-dist.sh"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
DISTRO=debian
|
||||
|
||||
- TEST_NAME="Debian Packages (Debian)"
|
||||
SCRIPT="dpkg.sh"
|
||||
BUILD_ENV="-e CC=gcc -e CXX=g++"
|
||||
DISTRO=debian
|
||||
|
||||
matrix:
|
||||
jobs:
|
||||
include:
|
||||
# ========================= stage: docker =========================
|
||||
- stage: docker
|
||||
script: true
|
||||
env:
|
||||
- JOB="Docker Build ubuntu-xenial 16.04 LTS"
|
||||
- DISTRO=ubuntu-xenial
|
||||
- TRAVIS_BUILD_STAGE=docker
|
||||
- script: true
|
||||
env:
|
||||
- JOB="Docker Build ubuntu-bionic 18.04 LTS"
|
||||
- DISTRO=ubuntu-bionic
|
||||
- TRAVIS_BUILD_STAGE=docker
|
||||
|
||||
# ========================= stage: thrift =======================
|
||||
# ------------------------- phase: cross ------------------------
|
||||
# apache/thrift official PR builds can exceed 50 minutes per job so combine all cross tests
|
||||
- stage: thrift
|
||||
script: build/docker/run.sh
|
||||
if: repo = apache/thrift
|
||||
env:
|
||||
- JOB="Cross Language Tests"
|
||||
- SCRIPT="cross-test.sh"
|
||||
|
||||
# fork based PR builds cannot exceed 50 minutes per job
|
||||
- stage: thrift
|
||||
script: build/docker/run.sh
|
||||
if: repo != apache/thrift
|
||||
env:
|
||||
- JOB="Cross Language Tests (Binary Protocol)"
|
||||
- SCRIPT="cross-test.sh"
|
||||
- BUILD_ARG="-'(binary)'"
|
||||
|
||||
- stage: thrift
|
||||
script: build/docker/run.sh
|
||||
if: repo != apache/thrift
|
||||
env:
|
||||
- JOB="Cross Language Tests (Header, JSON Protocols)"
|
||||
- SCRIPT="cross-test.sh"
|
||||
- BUILD_ARG="-'(header|json)'"
|
||||
|
||||
- stage: thrift
|
||||
script: build/docker/run.sh
|
||||
if: repo != apache/thrift
|
||||
env:
|
||||
- JOB="Cross Language Tests (Compact and Multiplexed Protocols)"
|
||||
- SCRIPT="cross-test.sh"
|
||||
- BUILD_ARG="-'(compact|multiplexed)'"
|
||||
|
||||
# ------------------------- phase: sca --------------------------
|
||||
# QA jobs for code analytics and metrics
|
||||
#
|
||||
# C/C++ static code analysis with cppcheck
|
||||
# add --error-exitcode=1 to --enable=all as soon as everything is fixed
|
||||
#
|
||||
# Python code style check with flake8
|
||||
#
|
||||
# search for TODO etc within source tree
|
||||
# some statistics about the code base
|
||||
# some info about the build machine
|
||||
- env: TEST_NAME="cppcheck, flake8, TODO FIXME HACK, LoC and system info"
|
||||
install:
|
||||
- travis_retry sudo apt-get update
|
||||
- travis_retry sudo apt-get install -ym cppcheck sloccount python-flake8
|
||||
script:
|
||||
# Compiler cppcheck (All)
|
||||
- cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src
|
||||
# C++ cppcheck (All)
|
||||
- cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
|
||||
# C Glib cppcheck (All)
|
||||
- cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
|
||||
# Silent error checks
|
||||
- cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 compiler/cpp/src
|
||||
- cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
|
||||
- cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
|
||||
# Python code style
|
||||
- flake8 --ignore=E501 lib/py
|
||||
- flake8 tutorial/py
|
||||
- flake8 --ignore=E501 test/py
|
||||
- flake8 test/py.twisted
|
||||
- flake8 test/py.tornado
|
||||
- flake8 --ignore=E501 test/test.py
|
||||
- flake8 --ignore=E501 test/crossrunner
|
||||
- flake8 test/features
|
||||
# TODO etc
|
||||
- grep -r TODO *
|
||||
- grep -r FIXME *
|
||||
- grep -r HACK *
|
||||
# LoC
|
||||
- sloccount .
|
||||
# System Info
|
||||
- dpkg -l
|
||||
- uname -a
|
||||
- stage: thrift
|
||||
script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="Static Code Analysis"
|
||||
- SCRIPT="sca.sh"
|
||||
|
||||
# C and C++ undefined behavior.
|
||||
# A binary crashes if undefined behavior occurs and produces a stack trace.
|
||||
# python is disabled, see: THRIFT-4360
|
||||
- script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="UBSan"
|
||||
- SCRIPT="ubsan.sh"
|
||||
- BUILD_ARG="--without-python --without-py3"
|
||||
|
||||
# ------------------------- phase: autotools --------------------
|
||||
# TODO: Remove them once migrated to CMake
|
||||
- script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="Autotools (Ubuntu Bionic)"
|
||||
- SCRIPT="autotools.sh"
|
||||
|
||||
- script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="Autotools (Ubuntu Xenial)"
|
||||
- DISTRO=ubuntu-xenial
|
||||
- SCRIPT="autotools.sh"
|
||||
|
||||
# ------------------------- phase: cmake ------------------------
|
||||
- script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="CMake"
|
||||
|
||||
# C++ specific options: compiler plug-in, threading model
|
||||
- script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="C++98 (Boost Thread)"
|
||||
- SCRIPT="cmake.sh"
|
||||
- BUILD_LIBS="CPP TESTING TUTORIALS"
|
||||
- BUILD_ARG="-DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_CXX_EXTENSIONS=OFF --DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
|
||||
- BUILD_ENV="-e CC=clang -e CXX=clang++"
|
||||
|
||||
- script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="C++ (Std Thread) and Plugin"
|
||||
- SCRIPT="cmake.sh"
|
||||
- BUILD_LIBS="CPP TESTING TUTORIALS"
|
||||
- BUILD_ARG="-DWITH_PLUGIN=ON -DWITH_STDTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
|
||||
- BUILD_ENV="-e CC=clang -e CXX=clang++"
|
||||
|
||||
# ------------------------- phase: dist -------------------------
|
||||
- script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="make dist"
|
||||
- SCRIPT="make-dist.sh"
|
||||
|
||||
- script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="Debian Packages"
|
||||
- SCRIPT="dpkg.sh"
|
||||
|
||||
# ------------------------- phase: coverity ---------------------
|
||||
# We build the coverity scan build once monthly using a travis cron job
|
||||
- if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (master)) AND (type IN (cron))
|
||||
script: build/docker/run.sh
|
||||
env:
|
||||
- JOB="Coverity Scan"
|
||||
- SCRIPT="covscan.sh"
|
||||
|
||||
|
||||
### ------------------------- phase: osx --------------------------
|
||||
# disabled due to the time delays it imposes on build jobs
|
||||
# - os: osx
|
||||
# osx_image: xcode9
|
||||
# script: build/docker/scripts/autotools.sh
|
||||
|
||||
|
|
298
vendor/git.apache.org/thrift.git/CHANGES
generated
vendored
298
vendor/git.apache.org/thrift.git/CHANGES
generated
vendored
|
@ -1,5 +1,303 @@
|
|||
Apache Thrift Changelog
|
||||
|
||||
Breaking Changes since 0.11.0 [for 0.12.0]:
|
||||
--------------------------------------------------------------------------------
|
||||
* [THRIFT-4448] - Support for golang 1.6 and earlier has been dropped.
|
||||
* [THRIFT-4474] - PHP now uses the PSR-4 loader by default instead of class maps.
|
||||
* [THRIFT-4532] - method signatures changed in the compiler's t_oop_generator.
|
||||
* [THRIFT-4648] - The C (GLib) compiler's handling of namespaces has been improved.
|
||||
|
||||
|
||||
Thrift 0.11.0
|
||||
--------------------------------------------------------------------------------
|
||||
## Sub-task
|
||||
* [THRIFT-2733] - Erlang coding standards
|
||||
* [THRIFT-2740] - Perl coding standards
|
||||
* [THRIFT-3610] - Streamline exception handling in Python server handler
|
||||
* [THRIFT-3686] - Java processor should report internal error on uncaught exception
|
||||
* [THRIFT-4049] - Skip() should throw TProtocolException.INVALID_DATA on unknown data types
|
||||
* [THRIFT-4053] - Skip() should throw TProtocolException.INVALID_DATA on unknown data types
|
||||
* [THRIFT-4136] - Align is_binary() method with is_string() to simplify those checks
|
||||
* [THRIFT-4137] - Fix remaining undefined behavior invalid vptr casts in Thrift Compiler
|
||||
* [THRIFT-4138] - Fix remaining undefined behavior invalid vptr casts in C++ library
|
||||
* [THRIFT-4296] - Fix Ubuntu Xenial build environment for the python language
|
||||
* [THRIFT-4298] - Fix Ubuntu Xenial build environment for the go 1.6 language
|
||||
* [THRIFT-4299] - Fix Ubuntu Xenial build environment for the D language
|
||||
* [THRIFT-4300] - Fix make cross in Ubuntu Xenial docker environment, once all language support issues are fixed
|
||||
* [THRIFT-4302] - Fix Ubuntu Xenial make cross testing for lua and php7
|
||||
* [THRIFT-4398] - Update EXTRA_DIST for "make dist"
|
||||
|
||||
## Bug
|
||||
* [THRIFT-381] - Fail fast if configure detects C++ problems
|
||||
* [THRIFT-1677] - MinGW support broken
|
||||
* [THRIFT-1805] - Thrift should not swallow ALL exceptions
|
||||
* [THRIFT-2026] - Fix TCompactProtocol 64 bit builds
|
||||
* [THRIFT-2642] - Recursive structs don't work in python
|
||||
* [THRIFT-2889] - stable release 0.9.2, erlang tutorial broken
|
||||
* [THRIFT-2913] - Ruby Server Thrift::ThreadPoolServer should serve inside a thread
|
||||
* [THRIFT-2998] - Node.js: Missing header from http request
|
||||
* [THRIFT-3000] - .NET implementation has trouble with mixed IP modes
|
||||
* [THRIFT-3281] - Travis CI build passed but the log says BUILD FAILED
|
||||
* [THRIFT-3358] - Makefile:1362: *** missing separator. Stop.
|
||||
* [THRIFT-3600] - Make TTwisted server send exception on unexpected handler error
|
||||
* [THRIFT-3602] - Make Tornado server send exception on unexpected handler error
|
||||
* [THRIFT-3657] - D TFileWriterTransport close should use non-priority send
|
||||
* [THRIFT-3700] - Go Map has wrong default value when optional
|
||||
* [THRIFT-3703] - Unions Field Count Does Not Consider Map/Set/List Fields
|
||||
* [THRIFT-3730] - server log error twice
|
||||
* [THRIFT-3778] - go client can not pass method parameter to server of other language if no field_id is given
|
||||
* [THRIFT-3784] - thrift-maven-plugin generates invalid include directories for IDL in dependency JARs
|
||||
* [THRIFT-3801] - Node Thrift client throws exception with multiplexer and responses that are bigger than a single buffer
|
||||
* [THRIFT-3821] - TMemoryBuffer buffer may overflow when resizing
|
||||
* [THRIFT-3832] - Thrift version 0.9.3 example on Windows, Visual Studio, linking errors during compiling
|
||||
* [THRIFT-3847] - thrift/config.h includes a #define for VERSION which will likely conflict with existing user environment or code
|
||||
* [THRIFT-3873] - Fix various build warnings when using Visual Studio
|
||||
* [THRIFT-3891] - TNonblockingServer configured with more than one IO threads does not always return from serve() upon stop()
|
||||
* [THRIFT-3892] - Thrift uses TLS SNI extension provided by OpenSSL library. Older version of OpenSSL(< 0.9.8f) may create problem because they do not support 'SSL_set_tlsext_host_name()'.
|
||||
* [THRIFT-3895] - Build fails using Java 1.8 with Ant < 1.9
|
||||
* [THRIFT-3896] - map<string,string> data with number string key cannot access that deserialized by php extension
|
||||
* [THRIFT-3938] - Python TNonblockingServer does not work with SSL
|
||||
* [THRIFT-3944] - TSSLSocket has dead code in checkHandshake
|
||||
* [THRIFT-3946] - Java 1.5 compatibility broken for binary fields (java5 option)
|
||||
* [THRIFT-3960] - Inherited services in Lua generator are not named correctly
|
||||
* [THRIFT-3962] - Ant build.xml broken on Windows for Java library
|
||||
* [THRIFT-3963] - Thrift.cabal filename does not match module name
|
||||
* [THRIFT-3967] - gobject/gparam.h:166:33: warning: enumerator value for ‘G_PARAM_DEPRECATED’ is not an integer constant expression
|
||||
* [THRIFT-3968] - Deserializing empty string/binary fields
|
||||
* [THRIFT-3974] - Using clang-3.8 and ThreadSanitizer on the concurrency_test claims bad PThread behavior
|
||||
* [THRIFT-3984] - PHP7 extension causes segfault
|
||||
* [THRIFT-4008] - broken ci due to upstream dependency versioning break
|
||||
* [THRIFT-4009] - Use @implementer instead of implements in TTwisted.py
|
||||
* [THRIFT-4010] - Q.fcall messing up with *this* pointer inside called function
|
||||
* [THRIFT-4011] - Sets of Thrift structs generate Go code that can't be serialized to JSON
|
||||
* [THRIFT-4012] - Python Twisted implementation uses implements, not compatible with Py3
|
||||
* [THRIFT-4014] - align C# meta data in AssemblyInfo.cs
|
||||
* [THRIFT-4015] - Fix wrongly spelled "Thirft"s
|
||||
* [THRIFT-4016] - testInsanity() impl does not conform to test spec in ThriftTest.thrift
|
||||
* [THRIFT-4023] - Skip unexpected field types on read/write
|
||||
* [THRIFT-4024] - Skip() should throw on unknown data types
|
||||
* [THRIFT-4026] - TSSLSocket doesn't work with Python < 2.7.9
|
||||
* [THRIFT-4029] - Accelerated protocols do not build from thrift-py 0.10.0 on PyPI
|
||||
* [THRIFT-4031] - Go plugin generates invalid code for lists of typedef'ed built-in types
|
||||
* [THRIFT-4033] - Default build WITH_PLUGIN=ON for all builds results in packaging errors
|
||||
* [THRIFT-4034] - CMake doesn't work to build compiler on MacOS
|
||||
* [THRIFT-4036] - Add .NET Core environment/build support to the docker image
|
||||
* [THRIFT-4038] - socket check: checking an unsigned number against >= 0 never fails
|
||||
* [THRIFT-4042] - ExtractionError when using accelerated thrift in a multiprocess test
|
||||
* [THRIFT-4043] - thrift perl debian package is placing files in the wrong place
|
||||
* [THRIFT-4044] - Build job 17 failing on every pull request; hspec core (haskell) 2.4 issue
|
||||
* [THRIFT-4046] - MinGW with gcc 6.2 does not compile on Windows
|
||||
* [THRIFT-4060] - Thrift printTo ostream overload mechanism breaks down when types are nested
|
||||
* [THRIFT-4062] - Remove debug print from TServiceClient
|
||||
* [THRIFT-4065] - Document Perl ForkingServer signal restriction imposed by THRIFT-3848 and remove unnecessary code
|
||||
* [THRIFT-4068] - A code comment in Java ServerSocket is wrong around accept()
|
||||
* [THRIFT-4073] - enum files are still being generated with unused imports
|
||||
* [THRIFT-4076] - Appveyor builds failing because ant 1.9.8 was removed from apache servers
|
||||
* [THRIFT-4077] - AI_ADDRCONFIG redefined after recent change to PlatformSocket header
|
||||
* [THRIFT-4079] - Generated perl code that returns structures from included thrift files is missing a necessary use clause
|
||||
* [THRIFT-4087] - Spurious exception destroying TThreadedServer because of incorrect join() call
|
||||
* [THRIFT-4102] - TBufferedTransport performance issue since 0.10.0
|
||||
* [THRIFT-4106] - concurrency_test fails randomly
|
||||
* [THRIFT-4108] - c_glib thrift ssl has multiple bugs and deprecated functions
|
||||
* [THRIFT-4109] - Configure Script uses string comparison for versions
|
||||
* [THRIFT-4129] - C++ TNonblockingServer fd leak when failing to dispatch new connections
|
||||
* [THRIFT-4131] - Javascript with WebSocket handles oneway methods wrong
|
||||
* [THRIFT-4134] - Fix remaining undefined behavior invalid vptr casts
|
||||
* [THRIFT-4140] - Use of non-thread-safe function gmtime()
|
||||
* [THRIFT-4141] - Installation of haxe in docker files refers to a redirect link and fails
|
||||
* [THRIFT-4147] - Rust: protocol should accept transports with non-static lifetime
|
||||
* [THRIFT-4148] - [maven-thrift-plugin] compile error while import a thrift in dependency jar file.
|
||||
* [THRIFT-4149] - System.out pollutes log files
|
||||
* [THRIFT-4154] - PHP close() of a TSocket needs to close any type of socket
|
||||
* [THRIFT-4158] - minor issue in README-MSYS2.md
|
||||
* [THRIFT-4159] - Building tests fails on MSYS2 (MinGW64) due to a (small?) linker error
|
||||
* [THRIFT-4160] - TNonblocking server fix use of closed/freed connections
|
||||
* [THRIFT-4161] - TNonBlocking server using uninitialized event in error paths
|
||||
* [THRIFT-4162] - TNonBlocking handling of TSockets in error state is incorrect after fd is closed
|
||||
* [THRIFT-4164] - Core in TSSLSocket cleanupOpenSSL when destroying a mutex used by openssl
|
||||
* [THRIFT-4165] - C++ build has many warnings under c++03 due to recent changes, cmake needs better platform-independent language level control
|
||||
* [THRIFT-4166] - Recent fix to remove boost::lexical_cast usage broke VS2010
|
||||
* [THRIFT-4167] - Missing compile flag
|
||||
* [THRIFT-4170] - Support lua 5.1 or earlier properly for object length determination
|
||||
* [THRIFT-4172] - node.js tutorial client does not import assert, connection issues are not handled properly
|
||||
* [THRIFT-4177] - Java compiler produces deep copy constructor that could make shallow copy instead
|
||||
* [THRIFT-4184] - Building on Appveyor: invalid escape sequence \L
|
||||
* [THRIFT-4185] - fb303 counter encoding fix
|
||||
* [THRIFT-4189] - Framed/buffered transport Dispose() does not dispose the nested transport
|
||||
* [THRIFT-4193] - Lower the default maxReadBufferBytes for non-blocking servers
|
||||
* [THRIFT-4195] - Compilation to GO produces broken code
|
||||
* [THRIFT-4196] - Cannot generate recursive Rust types
|
||||
* [THRIFT-4204] - typo in compact spec
|
||||
* [THRIFT-4206] - Strings in container fields are not decoded properly with py:dynamic and py:utf8strings
|
||||
* [THRIFT-4208] - C# NamedPipesServer not really working in some scenarios
|
||||
* [THRIFT-4211] - Fix GError glib management under Thrift
|
||||
* [THRIFT-4212] - c_glib flush tries to close SSL even if socket is invalid
|
||||
* [THRIFT-4213] - Travis build fails at curl -sSL https://www.npmjs.com/install.sh | sh
|
||||
* [THRIFT-4215] - Golang TTransportFactory Pattern Squelches Errors
|
||||
* [THRIFT-4216] - Golang Http Clients Do Not Respect User Options
|
||||
* [THRIFT-4218] - Set TCP_NODELAY for PHP client socket
|
||||
* [THRIFT-4219] - Golang HTTP clients created with Nil buffer
|
||||
* [THRIFT-4231] - TJSONProtocol throws unexpected non-Thrift-exception on null strings
|
||||
* [THRIFT-4232] - ./configure does bad ant version check
|
||||
* [THRIFT-4234] - Travis build fails cross language tests with "Unsupported security protocol type"
|
||||
* [THRIFT-4237] - Go TServerSocket Race Conditions
|
||||
* [THRIFT-4240] - Go TSimpleServer does not close properly
|
||||
* [THRIFT-4243] - Go TSimpleServer race on wait in Stop() method
|
||||
* [THRIFT-4245] - Golang TFramedTransport's writeBuffer increases if writes to transport failed
|
||||
* [THRIFT-4246] - Sequence number mismatch on multiplexed clients
|
||||
* [THRIFT-4247] - Compile fails with openssl 1.1
|
||||
* [THRIFT-4248] - Compile fails - strncpy, memcmp, memset not declared in src/thrift/transport/TSSLSocket.cpp
|
||||
* [THRIFT-4251] - Java Epoll Selector Bug
|
||||
* [THRIFT-4257] - Typescript async callbacks do not provide the correct types
|
||||
* [THRIFT-4258] - Boost/std thread wrapping faultiness
|
||||
* [THRIFT-4260] - Go context generation issue. Context is parameter in Interface not in implementation
|
||||
* [THRIFT-4261] - Go context generation issue: breaking change in generated code regarding thrift.TProcessorFunction interface
|
||||
* [THRIFT-4262] - Invalid binding to InterlockedCompareExchange64() with 64-bit targets
|
||||
* [THRIFT-4263] - Fix use after free bug for thrown exceptions
|
||||
* [THRIFT-4266] - Erlang library throws during skipping fields of composite type (maps, lists, structs, sets)
|
||||
* [THRIFT-4268] - Erlang library emits debugging output in transport layer
|
||||
* [THRIFT-4273] - erlang:now/0: Deprecated BIF.
|
||||
* [THRIFT-4274] - Python feature tests for SSL/TLS failing
|
||||
* [THRIFT-4279] - Wrong path in include directive in generated Thrift sources
|
||||
* [THRIFT-4283] - TNamedPipeServer race condition in interrupt
|
||||
* [THRIFT-4284] - File contains a NBSP: lib/nodejs/lib/thrift/web_server.js
|
||||
* [THRIFT-4290] - C# nullable option generates invalid code for non-required enum field with default value
|
||||
* [THRIFT-4292] - TimerManager::remove() is not implemented
|
||||
* [THRIFT-4307] - Make ssl-open timeout effective in golang client
|
||||
* [THRIFT-4312] - Erlang client cannot connect to Python server: exception error: econnrefused
|
||||
* [THRIFT-4313] - Program code of the Erlang tutorial files contain syntax errors
|
||||
* [THRIFT-4316] - TByteBuffer.java will read too much data if a previous read returns fewer bytes than requested
|
||||
* [THRIFT-4319] - command line switch for "evhttp" incorrectly resolved to anon pipes
|
||||
* [THRIFT-4323] - range check errors or NPE in edge cases
|
||||
* [THRIFT-4324] - field names can conflict with local vars in generated code
|
||||
* [THRIFT-4328] - Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11
|
||||
* [THRIFT-4329] - c_glib Doesn't have a multiplexed processor
|
||||
* [THRIFT-4331] - C++: TSSLSockets bug in handling huge messages, bug in handling polling
|
||||
* [THRIFT-4332] - Binary protocol has memory leaks
|
||||
* [THRIFT-4334] - Perl indentation incorrect when defaulting field attribute to a struct
|
||||
* [THRIFT-4339] - Thrift Framed Transport in Erlang crashes server when client disconnects
|
||||
* [THRIFT-4340] - Erlang fix a crash on client close
|
||||
* [THRIFT-4355] - Javascript indentation incorrect when defaulting field attribute to a struct
|
||||
* [THRIFT-4356] - thrift_protocol call Transport cause Segmentation fault
|
||||
* [THRIFT-4359] - Haxe compiler looks like it is producing incorrect code for map or set key that is binary type
|
||||
* [THRIFT-4362] - Missing size-check can lead to huge memory allocation
|
||||
* [THRIFT-4364] - Website contributing guide erroneously recommends submitting patches in JIRA
|
||||
* [THRIFT-4365] - Perl generated code uses indirect object syntax, which occasionally causes compilation errors.
|
||||
* [THRIFT-4367] - python TProcessor.process is missing "self"
|
||||
* [THRIFT-4370] - Ubuntu Artful cppcheck and flake8 are more stringent and causing SCA build job failures
|
||||
* [THRIFT-4372] - Pipe write operations across a network are limited to 65,535 bytes per write.
|
||||
* [THRIFT-4374] - cannot load thrift_protocol due to undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
|
||||
* [THRIFT-4376] - Coverity high impact issue resolution
|
||||
* [THRIFT-4377] - haxe. socket handles leak in TSimpleServer
|
||||
* [THRIFT-4381] - Wrong isset bitfield value after transmission
|
||||
* [THRIFT-4385] - Go remote client -u flag is broken
|
||||
* [THRIFT-4392] - compiler/..../plugin.thrift structs mis-ordered blows up ocaml generator
|
||||
* [THRIFT-4395] - Unable to build in the ubuntu-xenial docker image: clap 2.28 requires Rust 1.20
|
||||
* [THRIFT-4396] - inconsistent (or plain wrong) version numbers in master/trunk
|
||||
|
||||
## Documentation
|
||||
* [THRIFT-4157] - outdated readme about Haxe installation on Linux
|
||||
|
||||
## Improvement
|
||||
* [THRIFT-105] - make a thrift_spec for a structures with negative tags
|
||||
* [THRIFT-281] - Cocoa library code needs comments, badly
|
||||
* [THRIFT-775] - performance improvements for Perl
|
||||
* [THRIFT-2221] - Generate c++ code with std::shared_ptr instead of boost::shared_ptr.
|
||||
* [THRIFT-2364] - OCaml: Use Oasis exclusively for build process
|
||||
* [THRIFT-2504] - TMultiplexedProcessor should allow registering default processor called if no service name is present
|
||||
* [THRIFT-3207] - Enable build with OpenSSL 1.1.0 series
|
||||
* [THRIFT-3272] - Perl SSL Authentication Support
|
||||
* [THRIFT-3357] - Generate EnumSet/EnumMap where elements/keys are enums
|
||||
* [THRIFT-3369] - Implement SSL/TLS support on C with c_glib
|
||||
* [THRIFT-3467] - Go Maps for Thrift Sets Should Have Values of Type struct{}
|
||||
* [THRIFT-3580] - THeader for Haskell
|
||||
* [THRIFT-3627] - Missing basic code style consistency of JavaScript.
|
||||
* [THRIFT-3706] - There's no support for Multiplexed protocol on c_glib library
|
||||
* [THRIFT-3766] - Add getUnderlyingTransport() to TZlibTransport
|
||||
* [THRIFT-3776] - Go code from multiple thrift files with the same namespace
|
||||
* [THRIFT-3823] - Escape documentation while generating non escaped documetation
|
||||
* [THRIFT-3854] - allow users to clear read buffers
|
||||
* [THRIFT-3859] - Unix Domain Socket Support in Objective-C
|
||||
* [THRIFT-3921] - C++ code should print enums as strings
|
||||
* [THRIFT-3926] - There should be an error emitted when http status code is not 200
|
||||
* [THRIFT-4007] - Micro-optimization of TTransport.py
|
||||
* [THRIFT-4040] - Add real cause of TNonblockingServerSocket error to exception
|
||||
* [THRIFT-4064] - Update node library dependencies
|
||||
* [THRIFT-4069] - All perl packages should have proper namespace, version syntax, and use proper thrift exceptions
|
||||
* [THRIFT-4071] - Consolidate the Travis CI jobs where possible to put less stress on the Apache Foundation's allocation of CI build slaves
|
||||
* [THRIFT-4072] - Add the possibility to send custom headers in TCurlClient
|
||||
* [THRIFT-4075] - Better MinGW support for headers-only boost (without thread library)
|
||||
* [THRIFT-4081] - Provide a MinGW 64-bit Appveyor CI build for better pull request validation
|
||||
* [THRIFT-4084] - Improve SSL security in thrift by adding a make cross client that checks to make sure SSLv3 protocol cannot be negotiated
|
||||
* [THRIFT-4095] - Add multiplexed protocol to Travis CI for make cross
|
||||
* [THRIFT-4099] - Auto-derive Hash for generated Rust structs
|
||||
* [THRIFT-4110] - The debian build files do not produce a "-dbg" package for debug symbols of libthrift0
|
||||
* [THRIFT-4114] - Space after '///' in doc comments
|
||||
* [THRIFT-4126] - Validate objects in php extension
|
||||
* [THRIFT-4130] - Ensure Apache Http connection is released back to pool after use
|
||||
* [THRIFT-4151] - Thrift Mutex Contention Profiling (pthreads) should be disabled by default
|
||||
* [THRIFT-4176] - Implement a threaded and threadpool server type for Rust
|
||||
* [THRIFT-4183] - Named pipe client blocks forever on Open() when there is no server at the other end
|
||||
* [THRIFT-4190] - improve C# TThreadPoolServer defaults
|
||||
* [THRIFT-4197] - Implement transparent gzip compression for HTTP transport
|
||||
* [THRIFT-4198] - Ruby should log Thrift internal errors to global logger
|
||||
* [THRIFT-4203] - thrift server stop gracefully
|
||||
* [THRIFT-4205] - c_glib is not linking against glib + gobject
|
||||
* [THRIFT-4209] - warning CS0414 in T[TLS]ServerSocket.cs
|
||||
* [THRIFT-4210] - include Thrift.45.csproj into CI runs
|
||||
* [THRIFT-4217] - HttpClient should support gzip and deflate
|
||||
* [THRIFT-4222] - Support Unix Domain Sockets in Golang TServerSocket
|
||||
* [THRIFT-4233] - Make THsHaServer.invoker available (get method only) in inherited classes
|
||||
* [THRIFT-4236] - Support context in go generated code.
|
||||
* [THRIFT-4238] - JSON generator: make annotation-aware
|
||||
* [THRIFT-4269] - Don't append '.' to Erlang namespace if it ends in '_'.
|
||||
* [THRIFT-4270] - Generate Erlang mapping functions for const maps and lists
|
||||
* [THRIFT-4275] - Add support for zope.interface only, apart from twisted support.
|
||||
* [THRIFT-4285] - Pull generated send/recv into library to allow behaviour to be customised
|
||||
* [THRIFT-4287] - Add c++ compiler "no_skeleton" flag option
|
||||
* [THRIFT-4288] - Implement logging levels properly for node.js
|
||||
* [THRIFT-4295] - Refresh the Docker image file suite for Ubuntu, Debian, and CentOS
|
||||
* [THRIFT-4305] - Emit ddoc for generated items
|
||||
* [THRIFT-4306] - Thrift imports not replicated to D service output
|
||||
* [THRIFT-4315] - Add default message for TApplicationException
|
||||
* [THRIFT-4318] - Delphi performance improvements
|
||||
* [THRIFT-4325] - Simplify automake cross compilation by relying on one global THRIFT compiler path
|
||||
* [THRIFT-4327] - Improve TimerManager API to allow removing specific task
|
||||
* [THRIFT-4330] - Allow unused crates in Rust files
|
||||
* [THRIFT-4333] - Erlang tutorial examples are using a different port (9999)
|
||||
* [THRIFT-4343] - Change CI builds to use node.js 8.x LTS once available
|
||||
* [THRIFT-4345] - Create a docker build environment that uses the minimum supported language levels
|
||||
* [THRIFT-4346] - Allow Zlib transport factory to wrap other transports
|
||||
* [THRIFT-4348] - Perl HTTP Client custom HTTP headers
|
||||
* [THRIFT-4350] - Update netcore build for dotnet 2.0 sdk and make cross validation
|
||||
* [THRIFT-4351] - Use Travis CI Build Stages to optimize the CI build
|
||||
* [THRIFT-4353] - cannot read via thrift_protocol at server side
|
||||
* [THRIFT-4378] - add set stopTimeoutUnit method to TThreadPoolServer
|
||||
|
||||
## New Feature
|
||||
* [THRIFT-750] - C++ Compiler Virtual Function Option
|
||||
* [THRIFT-2945] - Implement support for Rust language
|
||||
* [THRIFT-3857] - thrift js:node complier support an object as parameter not an instance of struct
|
||||
* [THRIFT-3933] - Port official C# .NET library for Thrift to C# .NET Core libary
|
||||
* [THRIFT-4039] - Update of Apache Thrift .Net Core lib
|
||||
* [THRIFT-4113] - Provide a buffer transport for reading/writing in memory byte stream
|
||||
|
||||
## Question
|
||||
* [THRIFT-2956] - autoconf - possibly undefined macro - AC_PROG_BISON
|
||||
* [THRIFT-4223] - Add support to the isServing() method for the C++ library
|
||||
|
||||
## Task
|
||||
* [THRIFT-3622] - Fix deprecated uses of std::auto_ptr
|
||||
* [THRIFT-4028] - Please remove System.out.format from the source code
|
||||
* [THRIFT-4186] - Build and test rust client in Travis
|
||||
|
||||
## Test
|
||||
* [THRIFT-4264] - PHP - Support both shared & static linking of sockets library
|
||||
|
||||
## Wish
|
||||
* [THRIFT-4344] - Define and maintain the minimum language level for all languages in one place
|
||||
|
||||
|
||||
Thrift 0.10.0
|
||||
--------------------------------------------------------------------------------
|
||||
## Bug
|
||||
|
|
9
vendor/git.apache.org/thrift.git/CMakeLists.txt
generated
vendored
9
vendor/git.apache.org/thrift.git/CMakeLists.txt
generated
vendored
|
@ -17,7 +17,14 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# CMake 3.1 supports C++ standards selection with CMAKE_CXX_STANDARD
|
||||
# If you need CMake 3.1+ for Ubuntu 14.04, try
|
||||
# https://launchpad.net/~george-edison55/+archive/ubuntu/cmake-3.x
|
||||
# If you need CMake 3.1+ for debian "jessie", get it from jessie-backports
|
||||
# Otherwise
|
||||
# http://cmake.org
|
||||
|
||||
project("Apache Thrift")
|
||||
|
||||
|
|
155
vendor/git.apache.org/thrift.git/CONTRIBUTING.md
generated
vendored
155
vendor/git.apache.org/thrift.git/CONTRIBUTING.md
generated
vendored
|
@ -1,49 +1,116 @@
|
|||
## How to contribute
|
||||
1. Help to review and verify existing patches
|
||||
1. Make sure your issue is not all ready in the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT)
|
||||
1. If not, create a ticket describing the change you're proposing in the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT)
|
||||
1. Contribute your patch using one of the two methods below
|
||||
# How to Contribute #
|
||||
|
||||
### Contributing via a patch
|
||||
|
||||
1. Check out the latest version of the source code
|
||||
|
||||
* git clone https://git-wip-us.apache.org/repos/asf/thrift.git thrift
|
||||
|
||||
1. Modify the source to include the improvement/bugfix
|
||||
|
||||
* Remember to provide *tests* for all submited changes
|
||||
* When bugfixing: add test that will isolate bug *before* applying change that fixes it
|
||||
* Verify that you follow [Thrift Coding Standards](/docs/coding_standards) (you can run 'make style', which ensures proper format for some languages)
|
||||
|
||||
1. Create a patch from project root directory (e.g. you@dev:~/thrift $ ):
|
||||
|
||||
* git diff > ../thrift-XXX-my-new-feature.patch
|
||||
|
||||
1. Attach the newly generated patch to the issue
|
||||
1. Wait for other contributors or committers to review your new addition
|
||||
1. Wait for a committer to commit your patch
|
||||
|
||||
### Contributing via GitHub pull requests
|
||||
|
||||
1. Create a fork for http://github.com/apache/thrift
|
||||
1. Create a branch for your changes(best practice is issue as branch name, e.g. THRIFT-9999)
|
||||
1. Modify the source to include the improvement/bugfix
|
||||
|
||||
* Remember to provide *tests* for all submited changes
|
||||
* When bugfixing: add test that will isolate bug *before* applying change that fixes it
|
||||
* Verify that you follow [Thrift Coding Standards](/docs/coding_standards) (you can run 'make style', which ensures proper format for some languages)
|
||||
* Verify that your change works on other platforms by adding a GitHub service hook to [Travis CI](http://docs.travis-ci.com/user/getting-started/#Step-one%3A-Sign-in) and [AppVeyor](http://www.appveyor.com/docs)
|
||||
|
||||
1. Commit and push changes to your branch (please use issue name and description as commit title, e.g. THRIFT-9999 make it perfect)
|
||||
1. Issue a pull request with the jira ticket number you are working on in it's name
|
||||
1. Wait for other contributors or committers to review your new addition
|
||||
1. Wait for a committer to commit your patch
|
||||
|
||||
### More info
|
||||
|
||||
Plenty of information on why and how to contribute is available on the Apache Software Foundation (ASF) web site. In particular, we recommend the following:
|
||||
Thank you for your interest in contributing to the Apache Thrift project! Information on why and how to contribute is available on the Apache Software Foundation (ASF) web site. In particular, we recommend the following to become acquainted with Apache Contributions:
|
||||
|
||||
* [Contributors Tech Guide](http://www.apache.org/dev/contributors)
|
||||
* [Get involved!](http://www.apache.org/foundation/getinvolved.html)
|
||||
* [Legal aspects on Submission of Contributions (Patches)](http://www.apache.org/licenses/LICENSE-2.0.html#contributions)
|
||||
|
||||
## GitHub pull requests ##
|
||||
|
||||
This is the preferred method of submitting changes. When you submit a pull request through github,
|
||||
it activates the continuous integration (CI) build systems at Appveyor and Travis to build your changesxi
|
||||
on a variety of Linux and Windows configurations and run all the test suites. Follow these requirements
|
||||
for a successful pull request:
|
||||
|
||||
1. All code changes require an [Apache Jira THRIFT Issue](http://issues.apache.org/jira/browse/THRIFT) ticket.
|
||||
|
||||
1. All pull requests should contain a single commit per issue, or we will ask you to squash it.
|
||||
1. The pull request title must begin with the Jira THRIFT ticket identifier, for example:
|
||||
|
||||
THRIFT-9999: an example pull request title
|
||||
|
||||
1. Commit messages must follow this pattern for code changes (deviations will not be merged):
|
||||
|
||||
THRIFT-9999: [summary of fix, one line if possible]
|
||||
Client: [language(s) affected, comma separated, use lib/ directory names please]
|
||||
|
||||
Instructions:
|
||||
|
||||
1. Create a fork in your GitHub account of http://github.com/apache/thrift
|
||||
1. Clone the fork to your development system.
|
||||
1. Create a branch for your changes (best practice is issue as branch name, e.g. THRIFT-9999).
|
||||
1. Modify the source to include the improvement/bugfix, and:
|
||||
|
||||
* Remember to provide *tests* for all submitted changes!
|
||||
* Use test-driven development (TDD): add a test that will isolate the bug *before* applying the change that fixes it.
|
||||
* Verify that you follow [Thrift Coding Standards](/docs/coding_standards) (you can run 'make style', which ensures proper format for some languages).
|
||||
* [*optional*] Verify that your change works on other platforms by adding a GitHub service hook to [Travis CI](http://docs.travis-ci.com/user/getting-started/#Step-one%3A-Sign-in) and [AppVeyor](http://www.appveyor.com/docs). You can use this technique to run the Thrift CI jobs in your account to check your changes before they are made public. Every GitHub pull request into Thrift will run the full CI build and test suite on your changes.
|
||||
|
||||
1. Squash your changes to a single commit. This maintains clean change history.
|
||||
1. Commit and push changes to your branch (please use issue name and description as commit title, e.g. "THRIFT-9999: make it perfect"), with the affected languages on the next line of the description.
|
||||
1. Use GitHub to create a pull request going from your branch to apache:master. Ensure that the Jira ticket number is at the beginning of the title of your pull request, same as the commit title.
|
||||
1. Wait for other contributors or committers to review your new addition, and for a CI build to complete.
|
||||
1. Wait for a committer to commit your patch. You can nudge the committers if necessary by sending a message to the [Apache Thrift mailing list](https://thrift.apache.org/mailing).
|
||||
|
||||
## If you want to build the project locally ##
|
||||
|
||||
For Windows systems, see our detailed instructions on the [CMake README](/build/cmake/README.md).
|
||||
|
||||
For Windows Native C++ builds, see our detailed instructions on the [WinCPP README](/build/wincpp/README.md).
|
||||
|
||||
For unix systems, see our detailed instructions on the [Docker README](/build/docker/README.md).
|
||||
|
||||
## If you want to review open issues... ##
|
||||
|
||||
1. Review the [GitHub Pull Request Backlog](https://github.com/apache/thrift/pulls). Code reviews are open to all.
|
||||
2. Review the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT). You can search for tickets relating to languages you are interested in or currently using with thrift, for example a Jira search (Issues -> Search For Issues) query of ``project = THRIFT AND component in ("Erlang - Library") and status not in (resolved, closed)`` will locate all the open Erlang Library issues.
|
||||
|
||||
## If you discovered a defect... ##
|
||||
|
||||
1. Check to see if the issue is already in the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT).
|
||||
1. If not, create a ticket describing the change you're proposing in the Jira issue tracker.
|
||||
1. Contribute your code changes using the GitHub pull request method:
|
||||
|
||||
## Contributing via Patch ##
|
||||
|
||||
Some changes do not require a build, for example in documentation. For changes that are not code or build related, you can submit a patch on Jira for review. To create a patch from changes in your local directory:
|
||||
|
||||
git diff > ../THRIFT-NNNN.patch
|
||||
|
||||
then wait for contributors or committers to review your changes, and then for a committer to apply your patch.
|
||||
|
||||
## GitHub recipes for Pull Requests ##
|
||||
|
||||
Sometimes commmitters may ask you to take actions in your pull requests. Here are some recipes that will help you accomplish those requests. These examples assume you are working on Jira issue THRIFT-9999. You should also be familiar with the [upstream](https://help.github.com/articles/syncing-a-fork/) repository concept.
|
||||
|
||||
### Squash your changes ###
|
||||
|
||||
If you have not submitted a pull request yet, or if you have not yet rebased your existing pull request, you can squash all your commits down to a single commit. This makes life easier for the committers. If your pull request on GitHub has more than one commit, you should do this.
|
||||
|
||||
1. Use the command ``git log`` to identify how many commits you made since you began.
|
||||
2. Use the command ``git rebase -i HEAD~N`` where N is the number of commits.
|
||||
3. Leave "pull" in the first line.
|
||||
4. Change all other lines from "pull" to "fixup".
|
||||
5. All your changes are now in a single commit.
|
||||
|
||||
If you already have a pull request outstanding, you will need to do a "force push" to overwrite it since you changed your commit history:
|
||||
|
||||
git push -u origin THRIFT-9999 --force
|
||||
|
||||
A more detailed walkthrough of a squash can be found at [Git Ready](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html).
|
||||
|
||||
### Rebase your pull request ###
|
||||
|
||||
If your pull request has a conflict with master, it needs to be rebased:
|
||||
|
||||
git checkout THRIFT-9999
|
||||
git rebase upstream master
|
||||
(resolve any conflicts, make sure it builds)
|
||||
git push -u origin THRIFT-9999 --force
|
||||
|
||||
### Fix a bad merge ###
|
||||
|
||||
If your pull request contains commits that are not yours, then you should use the following technique to fix the bad merge in your branch:
|
||||
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
git checkout -b THRIFT-9999-take-2
|
||||
git cherry-pick ...
|
||||
(pick only your commits from your original pull request in ascending chronological order)
|
||||
squash your changes to a single commit if there is more than one (see above)
|
||||
git push -u origin THRIFT-9999-take-2:THRIFT-9999
|
||||
|
||||
This procedure will apply only your commits in order to the current master, then you will squash them to a single commit, and then you force push your local THRIFT-9999-take-2 into remote THRIFT-9999 which represents your pull request, replacing all the commits with the new one.
|
||||
|
||||
|
||||
|
|
61
vendor/git.apache.org/thrift.git/Dockerfile
generated
vendored
61
vendor/git.apache.org/thrift.git/Dockerfile
generated
vendored
|
@ -1,61 +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.
|
||||
#
|
||||
|
||||
# Goal: provide a thrift-compiler Docker image
|
||||
#
|
||||
# Usage:
|
||||
# docker run -v "${PWD}:/data" thrift/thrift-compiler -gen cpp -o /data/ /data/test/ThriftTest.thrift
|
||||
#
|
||||
# further details on docker for thrift is here build/docker/
|
||||
#
|
||||
# TODO: push to apache/thrift-compiler instead of thrift/thrift-compiler
|
||||
|
||||
FROM debian:jessie
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
ADD . /thrift
|
||||
|
||||
RUN buildDeps=" \
|
||||
flex \
|
||||
bison \
|
||||
g++ \
|
||||
make \
|
||||
cmake \
|
||||
curl \
|
||||
"; \
|
||||
apt-get update && apt-get install -y --no-install-recommends $buildDeps \
|
||||
&& mkdir /tmp/cmake-build && cd /tmp/cmake-build \
|
||||
&& cmake \
|
||||
-DBUILD_COMPILER=ON \
|
||||
-DBUILD_LIBRARIES=OFF \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
/thrift \
|
||||
&& cmake --build . --config Release \
|
||||
&& make install \
|
||||
&& curl -k -sSL "https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz" -o /tmp/go.tar.gz \
|
||||
&& tar xzf /tmp/go.tar.gz -C /tmp \
|
||||
&& cp /tmp/go/bin/gofmt /usr/bin/gofmt \
|
||||
&& apt-get purge -y --auto-remove $buildDeps \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /tmp/* \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENTRYPOINT ["thrift"]
|
344
vendor/git.apache.org/thrift.git/LANGUAGES.md
generated
vendored
Normal file
344
vendor/git.apache.org/thrift.git/LANGUAGES.md
generated
vendored
Normal file
|
@ -0,0 +1,344 @@
|
|||
# Apache Thrift Language Support #
|
||||
|
||||
Last Modified: 2018-07-06
|
||||
|
||||
Guidance For: 0.11.0 or later
|
||||
|
||||
Thrift supports many programming languages and has an impressive test suite that exercises most of the languages, protocols, and transports that represents a matrix of thousands of possible combinations. Each language typically has a minimum required version as well as support libraries - some mandatory and some optional. All of this information is provided below to help you assess whether you can use Apache Thrift with your project. Obviously this is a complex matrix to maintain and may not be correct in all cases - if you spot an error please inform the developers using the mailing list.
|
||||
|
||||
Apache Thrift has a choice of two build systems. The `autoconf` build system is the most complete build and is used to build all supported languages. The `cmake` build system has been designated by the project to replace `autoconf` however this transition will take quite some time to complete.
|
||||
|
||||
The Language/Library Levels indicate the minimum and maximum versions that are used in the [continuous integration environments](build/docker/README.md) (Appveyor, Travis) for Apache Thrift. Other language levels may be supported for each language, however tested less thoroughly; check the README file inside each lib directory for additional details. Note that while a language may contain support for protocols, transports, and servers, the extent to which each is tested as part of the overall build process varies. The definitive integration test for the project is called the "cross" test which executes a test matrix with clients and servers communicating across languages.
|
||||
|
||||
<table style="font-size: 60%; padding: 1px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan=2>Language</th>
|
||||
<th rowspan=2 align=center>Since</th>
|
||||
<th colspan=2 align=center>Build Systems</th>
|
||||
<th colspan=2 align=center>Lang/Lib Levels (Tested)</th>
|
||||
<th colspan=6 align=center>Low-Level Transports</th>
|
||||
<th colspan=3 align=center>Transport Wrappers</th>
|
||||
<th colspan=4 align=center>Protocols</th>
|
||||
<th colspan=5 align=center>Servers</th>
|
||||
<th rowspan=2>Open Issues</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<!-- Build Systems ---------><th>autoconf</th><th>cmake</th>
|
||||
<!-- Lang/Lib Levels -------><th>Min</th><th>Max</th>
|
||||
<!-- Low-Level Transports --><th><a href="https://en.wikipedia.org/wiki/Unix_domain_socket">Domain</a></th><th> File </th><th>Memory</th><th> Pipe </th><th>Socket</th><th> TLS </th>
|
||||
<!-- Transport Wrappers ----><th>Framed</th><th> http </th><th> zlib </th>
|
||||
<!-- Protocols -------------><th><a href="doc/specs/thrift-binary-protocol.md">Binary</a></th><th><a href="doc/specs/thrift-compact-protocol.md">Compact</a></th><th> JSON </th><th>Multiplex</th>
|
||||
<!-- Servers ---------------><th>Forking</th><th>Nonblocking</th><th>Simple</th><th>Threaded</th><th>ThreadPool</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/as3/README.md">ActionScript</a></td>
|
||||
<!-- Since -----------------><td>0.3.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td colspan=2>ActionScript 3</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313722">ActionScript</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/c_glib/README.md">C (glib)</a></td>
|
||||
<!-- Since -----------------><td>0.6.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Language Levels -------><td>2.48.2</td><td>2.54.0</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313854">C (glib)</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/cpp/README.md">C++</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Language Levels -------><td colspan=2>C++98</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312313">C++</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/csharp/README.md">C#</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>.NET 3.5 / mono 3.2.8.0</td><td>.NET 4.6.1 / mono 4.6.2.7</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312362">C# (.NET)</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/cocoa/README.md">Cocoa</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td colspan=2>unknown</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312398">Cocoa</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/cl/README.md">Common Lisp</a></td>
|
||||
<!-- Since -----------------><td>0.12.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>SBCL 1.4.5</td><td>SBCL 1.4.9</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT-82">Common Lisp</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/d/README.md">Dlang</a></td>
|
||||
<!-- Since -----------------><td>0.9.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>2.075.1</td><td>2.081.0</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12317904">D</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/dart/README.md">Dart</a></td>
|
||||
<!-- Since -----------------><td>0.10.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>1.22.1</td><td>1.24.3</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12328006">Dart</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/delphi/README.md">Delphi</a></td>
|
||||
<!-- Since -----------------><td>0.8.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>2010</td><td>unknown</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12316601">Delphi</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/netcore/README.md">.NET Core</a></td>
|
||||
<!-- Since -----------------><td>0.11.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td colspan=2>2.1.4</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12331176">.NET Core</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/erl/README.md">Erlang</a></td>
|
||||
<!-- Since -----------------><td>0.3.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>18.3</td><td>20.0.4</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312390">Erlang</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/go/README.md">Go</a></td>
|
||||
<!-- Since -----------------><td>0.7.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>1.7.6</td><td>1.10.3</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12314307">Go</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/hs/README.md">Haskell</a></td>
|
||||
<!-- Since -----------------><td>0.5.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Language Levels -------><td>7.10.3</td><td>8.0.2</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312704">Haskell</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/haxe/README.md">Haxe</a></td>
|
||||
<!-- Since -----------------><td>0.9.3</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>3.2.1</td><td>3.4.4</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12324347">Haxe</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/java/README.md">Java (SE)</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Language Levels -------><td colspan=2>1.8.0_151</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312314">Java SE</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/javame/README.md">Java (ME)</a></td>
|
||||
<!-- Since -----------------><td>0.5.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td colspan=2>unknown</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313759">Java ME</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/js/README.md">Javascript</a></td>
|
||||
<!-- Since -----------------><td>0.3.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td colspan=2>unknown</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313418">Javascript</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/lua/README.md">Lua</a></td>
|
||||
<!-- Since -----------------><td>0.9.2</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>5.1.5</td><td>5.2.4</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12322659">Lua</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/nodejs/README.md">node.js</a></td>
|
||||
<!-- Since -----------------><td>0.6.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>6.x</td><td>8.11.3</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12314320">node.js</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/ocaml/README.md">OCaml</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td colspan=2>4.04.0</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313660">OCaml</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/perl/README.md">Perl</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>5.22.1</td><td>5.26.0</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312312">Perl</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/php/README.md">PHP</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>7.0.22</td><td>7.1.8</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312431">PHP</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/py/README.md">Python</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Language Levels -------><td>2.7.12, 3.5.2</td><td>2.7.14, 3.6.3</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312315">Python</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/rb/README.md">Ruby</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>2.3.1p112</td><td>2.3.3p222</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312316">Ruby</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/rs/README.md">Rust</a></td>
|
||||
<!-- Since -----------------><td>0.11.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td>1.17.0</td><td>1.21.0</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12331420">Rust</a></td>
|
||||
</tr>
|
||||
<tr align=center>
|
||||
<td align=left><a href="lib/st/README.md">Smalltalk</a></td>
|
||||
<!-- Since -----------------><td>0.2.0</td>
|
||||
<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Language Levels -------><td colspan=2>unknown</td>
|
||||
<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
|
||||
<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313861">Smalltalk</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th rowspan=2>Language</th>
|
||||
<th rowspan=2 align=center>Since</th>
|
||||
<!-- Build Systems ---------><th>autoconf</th><th>cmake</th>
|
||||
<!-- Lang/Lib Levels -------><th>Min</th><th>Max</th>
|
||||
<!-- Low-Level Transports --><th><a href="https://en.wikipedia.org/wiki/Unix_domain_socket">Domain</a></th></th><th> File </th><th>Memory</th><th> Pipe </th><th>Socket</th><th> TLS </th>
|
||||
<!-- Transport Wrappers ----><th>Framed</th><th> http </th><th> zlib </th>
|
||||
<!-- Protocols -------------><th><a href="doc/specs/thrift-binary-protocol.md">Binary</a></th><th><a href="doc/specs/thrift-compact-protocol.md">Compact</a></th><th> JSON </th><th>Multiplex</th>
|
||||
<!-- Servers ---------------><th>Forking</th><th>Nonblocking</th><th>Simple</th><th>Threaded</th><th>ThreadPool</th>
|
||||
<th rowspan=2>Open Issues</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 align=center>Build Systems</th>
|
||||
<th colspan=2 align=center>Lang/Lib Levels (Tested)</th>
|
||||
<th colspan=6 align=center>Low-Level Transports</th>
|
||||
<th colspan=3 align=center>Transport Wrappers</th>
|
||||
<th colspan=4 align=center>Protocols</th>
|
||||
<th colspan=5 align=center>Servers</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
14
vendor/git.apache.org/thrift.git/Makefile.am
generated
vendored
14
vendor/git.apache.org/thrift.git/Makefile.am
generated
vendored
|
@ -43,7 +43,7 @@ dist-hook:
|
|||
find $(distdir) -type d \( -iname ".svn" -or -iname ".git" \) | xargs rm -rf
|
||||
|
||||
print-version:
|
||||
@echo $(VERSION)
|
||||
@echo $(PACKAGE_VERSION)
|
||||
|
||||
.PHONY: precross cross
|
||||
precross-%: all
|
||||
|
@ -54,7 +54,7 @@ empty :=
|
|||
space := $(empty) $(empty)
|
||||
comma := ,
|
||||
|
||||
CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_D@ @MAYBE_JAVA@ @MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_HASKELL@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ @MAYBE_LUA@
|
||||
CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_CL@ @MAYBE_D@ @MAYBE_JAVA@ @MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_HASKELL@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ @MAYBE_LUA@ @MAYBE_RS@ @MAYBE_DOTNETCORE@
|
||||
CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS))
|
||||
|
||||
if WITH_PY3
|
||||
|
@ -65,14 +65,14 @@ endif
|
|||
|
||||
if WITH_PYTHON
|
||||
crossfeature: precross
|
||||
$(CROSS_PY) test/test.py --retry-count 3 --features .* --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED)
|
||||
$(CROSS_PY) test/test.py --retry-count 5 --features .* --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED)
|
||||
else
|
||||
# feature test needs python build
|
||||
crossfeature:
|
||||
endif
|
||||
|
||||
cross-%: precross crossfeature
|
||||
$(CROSS_PY) test/test.py --retry-count 3 --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED) --client $(CROSS_LANGS_COMMA_SEPARATED) --regex "$*"
|
||||
$(CROSS_PY) test/test.py --retry-count 5 --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED) --client $(CROSS_LANGS_COMMA_SEPARATED) --regex "$*"
|
||||
|
||||
cross: cross-.*
|
||||
|
||||
|
@ -111,9 +111,13 @@ EXTRA_DIST = \
|
|||
.clang-format \
|
||||
.editorconfig \
|
||||
.travis.yml \
|
||||
.rustfmt.toml \
|
||||
.dockerignore \
|
||||
appveyor.yml \
|
||||
bower.json \
|
||||
build \
|
||||
bootstrap.sh \
|
||||
cleanup.sh \
|
||||
CMakeLists.txt \
|
||||
composer.json \
|
||||
contrib \
|
||||
|
@ -123,7 +127,7 @@ EXTRA_DIST = \
|
|||
doap.rdf \
|
||||
package.json \
|
||||
sonar-project.properties \
|
||||
Dockerfile \
|
||||
LANGUAGES.md \
|
||||
LICENSE \
|
||||
CHANGES \
|
||||
NOTICE \
|
||||
|
|
4
vendor/git.apache.org/thrift.git/NOTICE
generated
vendored
4
vendor/git.apache.org/thrift.git/NOTICE
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
Apache Thrift
|
||||
Copyright 2006-2010 The Apache Software Foundation.
|
||||
Copyright 2006-2017 The Apache Software Foundation.
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
|
86
vendor/git.apache.org/thrift.git/README.md
generated
vendored
86
vendor/git.apache.org/thrift.git/README.md
generated
vendored
|
@ -1,29 +1,66 @@
|
|||
Apache Thrift
|
||||
=============
|
||||
|
||||
+[](https://travis-ci.org/apache/thrift)
|
||||
- +[](https://ci.appveyor.com/project/apache/thrift)
|
||||
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
Thrift is a lightweight, language-independent software stack with an
|
||||
associated code generation mechanism for RPC. Thrift provides clean
|
||||
abstractions for data transport, data serialization, and application
|
||||
associated code generation mechanism for point-to-point RPC. Thrift provides
|
||||
clean abstractions for data transport, data serialization, and application
|
||||
level processing. The code generation system takes a simple definition
|
||||
language as its input and generates code across programming languages that
|
||||
language as input and generates code across programming languages that
|
||||
uses the abstracted stack to build interoperable RPC clients and servers.
|
||||
|
||||

|
||||
|
||||
Thrift makes it easy for programs written in different programming
|
||||
languages to share data and call remote procedures. With support
|
||||
for [25 programming languages](LANGUAGES.md), chances are Thrift
|
||||
supports the languages that you currently use.
|
||||
|
||||
Thrift is specifically designed to support non-atomic version changes
|
||||
across client and server code.
|
||||
|
||||
For more details on Thrift's design and implementation, take a gander at
|
||||
the Thrift whitepaper included in this distribution or at the README.md files
|
||||
For more details on Thrift's design and implementation, see the Thrift
|
||||
whitepaper included in this distribution, or at the README.md file
|
||||
in your particular subdirectory of interest.
|
||||
|
||||
Hierarchy
|
||||
=========
|
||||
Status
|
||||
======
|
||||
|
||||
| Branch | Travis | Appveyor | Coverity Scan | codecov.io | Website |
|
||||
| :----- | :----- | :------- | :------------ | :--------- | :------ |
|
||||
| [`master`](https://github.com/apache/thrift/tree/master) | [](https://travis-ci.org/apache/thrift) | [](https://ci.appveyor.com/project/ApacheSoftwareFoundation/thrift/history) | [](https://scan.coverity.com/projects/thrift) | | [](https://thrift.apache.org/) |
|
||||
|
||||
Releases
|
||||
========
|
||||
|
||||
Thrift does not maintain a specific release calendar at this time.
|
||||
|
||||
We strive to release twice yearly. Download the [current release](http://thrift.apache.org/download).
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
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.
|
||||
|
||||
Project Hierarchy
|
||||
=================
|
||||
|
||||
thrift/
|
||||
|
||||
|
@ -42,6 +79,7 @@ thrift/
|
|||
php/
|
||||
py/
|
||||
rb/
|
||||
...
|
||||
|
||||
test/
|
||||
|
||||
|
@ -53,10 +91,16 @@ thrift/
|
|||
Contains a basic tutorial that will teach you how to develop software
|
||||
using Thrift.
|
||||
|
||||
Development
|
||||
===========
|
||||
|
||||
To build the same way Travis CI builds the project you should use docker.
|
||||
We have [comprehensive building instructions for docker](build/docker/README.md).
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
See http://thrift.apache.org/docs/install for an up-to-date list of build requirements.
|
||||
See http://thrift.apache.org/docs/install for a list of build requirements (may be stale). Alternatively see the docker build environments for a list of prerequisites.
|
||||
|
||||
Resources
|
||||
=========
|
||||
|
@ -145,22 +189,4 @@ To run the cross-language test suite, please run:
|
|||
This will run a set of tests that use different language clients and
|
||||
servers.
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
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.
|
||||
|
|
16
vendor/git.apache.org/thrift.git/Thrift-swift3.podspec
generated
vendored
Normal file
16
vendor/git.apache.org/thrift.git/Thrift-swift3.podspec
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "Thrift-swift3"
|
||||
s.version = "1.1.0"
|
||||
s.summary = "Apache Thrift is a lightweight, language-independent software stack with an associated code generation mechanism for RPC."
|
||||
s.description = <<-DESC
|
||||
The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
|
||||
DESC
|
||||
s.homepage = "http://thrift.apache.org"
|
||||
s.license = { :type => 'Apache License, Version 2.0', :url => 'https://raw.github.com/apache/thrift/thrift-0.9.0/LICENSE' }
|
||||
s.author = { "The Apache Software Foundation" => "apache@apache.org" }
|
||||
s.ios.deployment_target = '9.0'
|
||||
s.osx.deployment_target = '10.10'
|
||||
s.requires_arc = true
|
||||
s.source = { :git => "https://github.com/apache/thrift.git", :tag => "thrift-1.0.0" }
|
||||
s.source_files = "lib/swift/Sources/*.swift"
|
||||
end
|
4
vendor/git.apache.org/thrift.git/Thrift.podspec
generated
vendored
4
vendor/git.apache.org/thrift.git/Thrift.podspec
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "Thrift"
|
||||
s.version = "0.10.0"
|
||||
s.version = "1.0.0"
|
||||
s.summary = "Apache Thrift is a lightweight, language-independent software stack with an associated code generation mechanism for RPC."
|
||||
s.description = <<-DESC
|
||||
The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
|
||||
|
@ -13,6 +13,6 @@ The Apache Thrift software framework, for scalable cross-language services devel
|
|||
s.osx.deployment_target = '10.8'
|
||||
s.ios.framework = 'CFNetwork'
|
||||
s.osx.framework = 'CoreServices'
|
||||
s.source = { :git => "https://github.com/apache/thrift.git", :tag => "thrift-0.10.0" }
|
||||
s.source = { :git => "https://github.com/apache/thrift.git", :tag => "thrift-1.0.0" }
|
||||
s.source_files = 'lib/cocoa/src/**/*.{h,m,swift}'
|
||||
end
|
247
vendor/git.apache.org/thrift.git/aclocal/ax_boost_base.m4
generated
vendored
247
vendor/git.apache.org/thrift.git/aclocal/ax_boost_base.m4
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
|
@ -33,7 +33,15 @@
|
|||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 23
|
||||
#serial 42
|
||||
|
||||
# example boost program (need to pass version)
|
||||
m4_define([_AX_BOOST_BASE_PROGRAM],
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <boost/version.hpp>
|
||||
]],[[
|
||||
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));
|
||||
]])])
|
||||
|
||||
AC_DEFUN([AX_BOOST_BASE],
|
||||
[
|
||||
|
@ -44,101 +52,121 @@ AC_ARG_WITH([boost],
|
|||
or disable it (ARG=no)
|
||||
@<:@ARG=yes@:>@ ])],
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ac_boost_path=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ac_boost_path="$withval"
|
||||
fi
|
||||
AS_CASE([$withval],
|
||||
[no],[want_boost="no";_AX_BOOST_BASE_boost_path=""],
|
||||
[yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""],
|
||||
[want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"])
|
||||
],
|
||||
[want_boost="yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([boost-libdir],
|
||||
AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
|
||||
[
|
||||
if test -d "$withval"
|
||||
then
|
||||
ac_boost_lib_path="$withval"
|
||||
else
|
||||
AC_MSG_ERROR(--with-boost-libdir expected directory name)
|
||||
fi
|
||||
],
|
||||
[ac_boost_lib_path=""]
|
||||
)
|
||||
[AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries.
|
||||
Note that this will override library path detection,
|
||||
so use this parameter only if default library detection fails
|
||||
and you know exactly where your boost libraries are located.])],
|
||||
[
|
||||
AS_IF([test -d "$withval"],
|
||||
[_AX_BOOST_BASE_boost_lib_path="$withval"],
|
||||
[AC_MSG_ERROR([--with-boost-libdir expected directory name])])
|
||||
],
|
||||
[_AX_BOOST_BASE_boost_lib_path=""])
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
|
||||
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
|
||||
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
|
||||
boost_lib_version_req_sub_minor="0"
|
||||
fi
|
||||
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
|
||||
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
|
||||
BOOST_LDFLAGS=""
|
||||
BOOST_CPPFLAGS=""
|
||||
AS_IF([test "x$want_boost" = "xyes"],
|
||||
[_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
])
|
||||
|
||||
|
||||
# convert a version string in $2 to numeric and affect to polymorphic var $1
|
||||
AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[
|
||||
AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'`
|
||||
AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"],
|
||||
[AC_MSG_ERROR([You should at least specify libboost major version])])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||
AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"],
|
||||
[_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||
AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"],
|
||||
[_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
|
||||
AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET)
|
||||
])
|
||||
|
||||
dnl Run the detection of boost should be run only if $want_boost
|
||||
AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
_AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1])
|
||||
succeeded=no
|
||||
|
||||
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
dnl On 64-bit systems check for system libraries in both lib64 and lib.
|
||||
dnl The former is specified by FHS, but e.g. Debian does not adhere to
|
||||
dnl this (as it rises problems for generic multi-arch support).
|
||||
dnl The last entry in the list is chosen by default when no libraries
|
||||
dnl are found, e.g. when only header-only libraries are installed!
|
||||
libsubdirs="lib"
|
||||
ax_arch=`uname -m`
|
||||
case $ax_arch in
|
||||
x86_64|ppc64|s390x|sparc64|aarch64)
|
||||
libsubdirs="lib64 lib lib64"
|
||||
;;
|
||||
esac
|
||||
AS_CASE([${host_cpu}],
|
||||
[x86_64],[libsubdirs="lib64 libx32 lib lib64"],
|
||||
[ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"],
|
||||
[libsubdirs="lib"],
|
||||
)
|
||||
|
||||
dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
|
||||
dnl them priority over the other paths since, if libs are found there, they
|
||||
dnl are almost assuredly the ones desired.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
|
||||
|
||||
case ${host_cpu} in
|
||||
i?86)
|
||||
libsubdirs="lib/i386-${host_os} $libsubdirs"
|
||||
;;
|
||||
esac
|
||||
AS_CASE([${host_cpu}],
|
||||
[i?86],[multiarch_libsubdir="lib/i386-${host_os}"],
|
||||
[multiarch_libsubdir="lib/${host_cpu}-${host_os}"]
|
||||
)
|
||||
|
||||
dnl first we check the system location for boost libraries
|
||||
dnl this location ist chosen if boost libraries are installed with the --layout=system option
|
||||
dnl or if you install boost with RPM
|
||||
if test "$ac_boost_path" != ""; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include"
|
||||
for ac_boost_path_tmp in $libsubdirs; do
|
||||
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
|
||||
break
|
||||
fi
|
||||
done
|
||||
elif test "$cross_compiling" != yes; then
|
||||
for ac_boost_path_tmp in $lt_sysroot/usr $lt_sysroot/usr/local $lt_sysroot/opt $lt_sysroot/opt/local ; do
|
||||
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"])
|
||||
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[
|
||||
AC_MSG_RESULT([yes])
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
|
||||
for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
|
||||
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
|
||||
AC_MSG_RESULT([yes])
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
|
||||
break;
|
||||
],
|
||||
[AC_MSG_RESULT([no])])
|
||||
done],[
|
||||
AC_MSG_RESULT([no])])
|
||||
],[
|
||||
if test X"$cross_compiling" = Xyes; then
|
||||
search_libsubdirs=$multiarch_libsubdir
|
||||
else
|
||||
search_libsubdirs="$multiarch_libsubdir $libsubdirs"
|
||||
fi
|
||||
for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
|
||||
for libsubdir in $search_libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
dnl overwrite ld flags if we have required special directory with
|
||||
dnl --with-boost-libdir parameter
|
||||
if test "$ac_boost_lib_path" != ""; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_lib_path"
|
||||
fi
|
||||
AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
|
||||
[BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
|
||||
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
@ -149,15 +177,7 @@ if test "x$want_boost" = "xyes"; then
|
|||
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
|
@ -169,30 +189,50 @@ if test "x$want_boost" = "xyes"; then
|
|||
|
||||
dnl if we found no boost with system layout we search for boost libraries
|
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version
|
||||
if test "x$succeeded" != "xyes"; then
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
BOOST_CPPFLAGS=
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
BOOST_LDFLAGS=
|
||||
fi
|
||||
_version=0
|
||||
if test "$ac_boost_path" != ""; then
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
if test -n "$_AX_BOOST_BASE_boost_path" ; then
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
|
||||
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
_version=$_version_tmp
|
||||
fi
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
done
|
||||
dnl if nothing found search for layout used in Windows distributions
|
||||
if test -z "$BOOST_CPPFLAGS"; then
|
||||
if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
|
||||
fi
|
||||
fi
|
||||
dnl if we found something and BOOST_LDFLAGS was unset before
|
||||
dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
|
||||
if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "$cross_compiling" != yes; then
|
||||
for ac_boost_path in $lt_sysroot/usr $lt_sysroot/usr/local $lt_sysroot/opt $lt_sysroot/opt/local ; do
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
if test "x$cross_compiling" != "xyes" ; then
|
||||
for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
|
||||
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
_version=$_version_tmp
|
||||
best_path=$ac_boost_path
|
||||
best_path=$_AX_BOOST_BASE_boost_path
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -200,7 +240,7 @@ if test "x$want_boost" = "xyes"; then
|
|||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
||||
if test "$ac_boost_lib_path" = ""; then
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
|
@ -208,7 +248,7 @@ if test "x$want_boost" = "xyes"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "x$BOOST_ROOT" != "x"; then
|
||||
if test -n "$BOOST_ROOT" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
|
@ -217,7 +257,7 @@ if test "x$want_boost" = "xyes"; then
|
|||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
|
||||
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version`
|
||||
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
|
||||
if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
|
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT"
|
||||
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
|
||||
|
@ -232,15 +272,7 @@ if test "x$want_boost" = "xyes"; then
|
|||
export LDFLAGS
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
|
@ -249,17 +281,15 @@ if test "x$want_boost" = "xyes"; then
|
|||
AC_LANG_POP([C++])
|
||||
fi
|
||||
|
||||
if test "$succeeded" != "yes" ; then
|
||||
if test "$_version" = "0" ; then
|
||||
AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
if test "x$_version" = "x0" ; then
|
||||
AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
|
||||
else
|
||||
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
|
||||
fi
|
||||
# execute ACTION-IF-NOT-FOUND (if present):
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
|
||||
# execute ACTION-IF-FOUND (if present):
|
||||
ifelse([$2], , :, [$2])
|
||||
|
@ -267,6 +297,5 @@ if test "x$want_boost" = "xyes"; then
|
|||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
|
||||
])
|
||||
|
|
6
vendor/git.apache.org/thrift.git/aclocal/ax_check_openssl.m4
generated
vendored
6
vendor/git.apache.org/thrift.git/aclocal/ax_check_openssl.m4
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
|
@ -32,7 +32,7 @@
|
|||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 8
|
||||
#serial 10
|
||||
|
||||
AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
|
||||
AC_DEFUN([AX_CHECK_OPENSSL], [
|
||||
|
@ -51,7 +51,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [
|
|||
], [
|
||||
# if pkg-config is installed and openssl has installed a .pc file,
|
||||
# then use that information and don't search ssldirs
|
||||
AC_PATH_PROG([PKG_CONFIG], [pkg-config])
|
||||
AC_CHECK_TOOL([PKG_CONFIG], [pkg-config])
|
||||
if test x"$PKG_CONFIG" != x""; then
|
||||
OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
|
||||
if test $? = 0; then
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
|
@ -79,7 +79,7 @@
|
|||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 11
|
||||
#serial 12
|
||||
|
||||
dnl #########################################################################
|
||||
AC_DEFUN([AX_COMPARE_VERSION], [
|
982
vendor/git.apache.org/thrift.git/aclocal/ax_cxx_compile_stdcxx.m4
generated
vendored
Normal file
982
vendor/git.apache.org/thrift.git/aclocal/ax_cxx_compile_stdcxx.m4
generated
vendored
Normal file
|
@ -0,0 +1,982 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the specified
|
||||
# version of the C++ standard. If necessary, add switches to CXX and
|
||||
# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
|
||||
# or '14' (for the C++14 standard).
|
||||
#
|
||||
# The second argument, if specified, indicates whether you insist on an
|
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||
# -std=c++11). If neither is specified, you get whatever works, with
|
||||
# preference for an extended mode.
|
||||
#
|
||||
# The third argument, if specified 'mandatory' or if left unspecified,
|
||||
# indicates that baseline support for the specified C++ standard is
|
||||
# required and that the macro should error out if no mode with that
|
||||
# support is found. If specified 'optional', then configuration proceeds
|
||||
# regardless, after defining HAVE_CXX${VERSION} if and only if a
|
||||
# supporting mode is found.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
# Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 7
|
||||
|
||||
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
|
||||
dnl (serial version number 13).
|
||||
|
||||
AX_REQUIRE_DEFINED([AC_MSG_WARN])
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
||||
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
|
||||
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
|
||||
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
|
||||
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$2], [], [],
|
||||
[$2], [ext], [],
|
||||
[$2], [noext], [],
|
||||
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
|
||||
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
|
||||
ax_cv_cxx_compile_cxx$1,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[ax_cv_cxx_compile_cxx$1=yes],
|
||||
[ax_cv_cxx_compile_cxx$1=no])])
|
||||
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
|
||||
ac_success=yes
|
||||
fi
|
||||
|
||||
m4_if([$2], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
switch="-std=gnu++${alternative}"
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
m4_if([$2], [ext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
dnl HP's aCC needs +std=c++11 according to:
|
||||
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
|
||||
dnl Cray's crayCC needs "-h std=c++11"
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test x$ac_success = xyes; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
|
||||
fi
|
||||
fi
|
||||
if test x$ac_success = xno; then
|
||||
HAVE_CXX$1=0
|
||||
AC_MSG_NOTICE([No compiler with C++$1 support was found])
|
||||
else
|
||||
HAVE_CXX$1=1
|
||||
AC_DEFINE(HAVE_CXX$1,1,
|
||||
[define if the compiler supports basic C++$1 syntax])
|
||||
fi
|
||||
AC_SUBST(HAVE_CXX$1)
|
||||
m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
|
||||
])
|
||||
|
||||
|
||||
dnl Test body for checking C++11 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
)
|
||||
|
||||
|
||||
dnl Test body for checking C++14 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
)
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
|
||||
)
|
||||
|
||||
dnl Tests for new features in C++11
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++11, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201103L
|
||||
|
||||
#error "This is not a C++11 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx11
|
||||
{
|
||||
|
||||
namespace test_static_assert
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct check
|
||||
{
|
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_final_override
|
||||
{
|
||||
|
||||
struct Base
|
||||
{
|
||||
virtual void f() {}
|
||||
};
|
||||
|
||||
struct Derived : public Base
|
||||
{
|
||||
virtual void f() override {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_double_right_angle_brackets
|
||||
{
|
||||
|
||||
template < typename T >
|
||||
struct check {};
|
||||
|
||||
typedef check<void> single_type;
|
||||
typedef check<check<void>> double_type;
|
||||
typedef check<check<check<void>>> triple_type;
|
||||
typedef check<check<check<check<void>>>> quadruple_type;
|
||||
|
||||
}
|
||||
|
||||
namespace test_decltype
|
||||
{
|
||||
|
||||
int
|
||||
f()
|
||||
{
|
||||
int a = 1;
|
||||
decltype(a) b = 2;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_type_deduction
|
||||
{
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
auto
|
||||
add(T1 a1, T2 a2) -> decltype(a1 + a2)
|
||||
{
|
||||
return a1 + a2;
|
||||
}
|
||||
|
||||
int
|
||||
test(const int c, volatile int v)
|
||||
{
|
||||
static_assert(is_same<int, decltype(0)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(c)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(v)>::value == false, "");
|
||||
auto ac = c;
|
||||
auto av = v;
|
||||
auto sumi = ac + av + 'x';
|
||||
auto sumf = ac + av + 1.0;
|
||||
static_assert(is_same<int, decltype(ac)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(av)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumi)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumf)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
|
||||
return (sumf > 0.0) ? sumi : add(c, v);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_noexcept
|
||||
{
|
||||
|
||||
int f() { return 0; }
|
||||
int g() noexcept { return 0; }
|
||||
|
||||
static_assert(noexcept(f()) == false, "");
|
||||
static_assert(noexcept(g()) == true, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
|
||||
{
|
||||
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
|
||||
}
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
return strlen_c_r(s, 0UL);
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("1") == 1UL, "");
|
||||
static_assert(strlen_c("example") == 7UL, "");
|
||||
static_assert(strlen_c("another\0example") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_rvalue_references
|
||||
{
|
||||
|
||||
template < int N >
|
||||
struct answer
|
||||
{
|
||||
static constexpr int value = N;
|
||||
};
|
||||
|
||||
answer<1> f(int&) { return answer<1>(); }
|
||||
answer<2> f(const int&) { return answer<2>(); }
|
||||
answer<3> f(int&&) { return answer<3>(); }
|
||||
|
||||
void
|
||||
test()
|
||||
{
|
||||
int i = 0;
|
||||
const int c = 0;
|
||||
static_assert(decltype(f(i))::value == 1, "");
|
||||
static_assert(decltype(f(c))::value == 2, "");
|
||||
static_assert(decltype(f(0))::value == 3, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_uniform_initialization
|
||||
{
|
||||
|
||||
struct test
|
||||
{
|
||||
static const int zero {};
|
||||
static const int one {1};
|
||||
};
|
||||
|
||||
static_assert(test::zero == 0, "");
|
||||
static_assert(test::one == 1, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambdas
|
||||
{
|
||||
|
||||
void
|
||||
test1()
|
||||
{
|
||||
auto lambda1 = [](){};
|
||||
auto lambda2 = lambda1;
|
||||
lambda1();
|
||||
lambda2();
|
||||
}
|
||||
|
||||
int
|
||||
test2()
|
||||
{
|
||||
auto a = [](int i, int j){ return i + j; }(1, 2);
|
||||
auto b = []() -> int { return '0'; }();
|
||||
auto c = [=](){ return a + b; }();
|
||||
auto d = [&](){ return c; }();
|
||||
auto e = [a, &b](int x) mutable {
|
||||
const auto identity = [](int y){ return y; };
|
||||
for (auto i = 0; i < a; ++i)
|
||||
a += b--;
|
||||
return x + identity(a + b);
|
||||
}(0);
|
||||
return a + b + c + d + e;
|
||||
}
|
||||
|
||||
int
|
||||
test3()
|
||||
{
|
||||
const auto nullary = [](){ return 0; };
|
||||
const auto unary = [](int x){ return x; };
|
||||
using nullary_t = decltype(nullary);
|
||||
using unary_t = decltype(unary);
|
||||
const auto higher1st = [](nullary_t f){ return f(); };
|
||||
const auto higher2nd = [unary](nullary_t f1){
|
||||
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
|
||||
};
|
||||
return higher1st(nullary) + higher2nd(nullary)(unary);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_variadic_templates
|
||||
{
|
||||
|
||||
template <int...>
|
||||
struct sum;
|
||||
|
||||
template <int N0, int... N1toN>
|
||||
struct sum<N0, N1toN...>
|
||||
{
|
||||
static constexpr auto value = N0 + sum<N1toN...>::value;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct sum<>
|
||||
{
|
||||
static constexpr auto value = 0;
|
||||
};
|
||||
|
||||
static_assert(sum<>::value == 0, "");
|
||||
static_assert(sum<1>::value == 1, "");
|
||||
static_assert(sum<23>::value == 23, "");
|
||||
static_assert(sum<1, 2>::value == 3, "");
|
||||
static_assert(sum<5, 5, 11>::value == 21, "");
|
||||
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
|
||||
|
||||
}
|
||||
|
||||
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
||||
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
|
||||
// because of this.
|
||||
namespace test_template_alias_sfinae
|
||||
{
|
||||
|
||||
struct foo {};
|
||||
|
||||
template<typename T>
|
||||
using member = typename T::member_type;
|
||||
|
||||
template<typename T>
|
||||
void func(...) {}
|
||||
|
||||
template<typename T>
|
||||
void func(member<T>*) {}
|
||||
|
||||
void test();
|
||||
|
||||
void test() { func<foo>(0); }
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx11
|
||||
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++14
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++14, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201402L
|
||||
|
||||
#error "This is not a C++14 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx14
|
||||
{
|
||||
|
||||
namespace test_polymorphic_lambdas
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
const auto lambda = [](auto&&... args){
|
||||
const auto istiny = [](auto x){
|
||||
return (sizeof(x) == 1UL) ? 1 : 0;
|
||||
};
|
||||
const int aretiny[] = { istiny(args)... };
|
||||
return aretiny[0];
|
||||
};
|
||||
return lambda(1, 1L, 1.0f, '1');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_binary_literals
|
||||
{
|
||||
|
||||
constexpr auto ivii = 0b0000000000101010;
|
||||
static_assert(ivii == 42, "wrong value");
|
||||
|
||||
}
|
||||
|
||||
namespace test_generalized_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
constexpr unsigned long
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
auto length = 0UL;
|
||||
for (auto p = s; *p; ++p)
|
||||
++length;
|
||||
return length;
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("x") == 1UL, "");
|
||||
static_assert(strlen_c("test") == 4UL, "");
|
||||
static_assert(strlen_c("another\0test") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_init_capture
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
const auto lambda1 = [a = x](int b){ return a + b; };
|
||||
const auto lambda2 = [a = lambda1(x)](){ return a; };
|
||||
return lambda2();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_digit_separators
|
||||
{
|
||||
|
||||
constexpr auto ten_million = 100'000'000;
|
||||
static_assert(ten_million == 100000000, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_return_type_deduction
|
||||
{
|
||||
|
||||
auto f(int& x) { return x; }
|
||||
decltype(auto) g(int& x) { return x; }
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static constexpr auto value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static constexpr auto value = true;
|
||||
};
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
static_assert(is_same<int, decltype(f(x))>::value, "");
|
||||
static_assert(is_same<int&, decltype(g(x))>::value, "");
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx14
|
||||
|
||||
#endif // __cplusplus >= 201402L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++17
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++17, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus <= 201402L
|
||||
|
||||
#error "This is not a C++17 compiler"
|
||||
|
||||
#else
|
||||
|
||||
#if defined(__clang__)
|
||||
#define REALLY_CLANG
|
||||
#else
|
||||
#if defined(__GNUC__)
|
||||
#define REALLY_GCC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <initializer_list>
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
||||
namespace cxx17
|
||||
{
|
||||
|
||||
#if !defined(REALLY_CLANG)
|
||||
namespace test_constexpr_lambdas
|
||||
{
|
||||
|
||||
// TODO: test it with clang++ from git
|
||||
|
||||
constexpr int foo = [](){return 42;}();
|
||||
|
||||
}
|
||||
#endif // !defined(REALLY_CLANG)
|
||||
|
||||
namespace test::nested_namespace::definitions
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
namespace test_fold_expression
|
||||
{
|
||||
|
||||
template<typename... Args>
|
||||
int multiply(Args... args)
|
||||
{
|
||||
return (args * ... * 1);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
bool all(Args... args)
|
||||
{
|
||||
return (args && ...);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_static_assert
|
||||
{
|
||||
|
||||
static_assert (true);
|
||||
|
||||
}
|
||||
|
||||
namespace test_auto_brace_init_list
|
||||
{
|
||||
|
||||
auto foo = {5};
|
||||
auto bar {5};
|
||||
|
||||
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
|
||||
static_assert(std::is_same<int, decltype(bar)>::value);
|
||||
}
|
||||
|
||||
namespace test_typename_in_template_template_parameter
|
||||
{
|
||||
|
||||
template<template<typename> typename X> struct D;
|
||||
|
||||
}
|
||||
|
||||
namespace test_fallthrough_nodiscard_maybe_unused_attributes
|
||||
{
|
||||
|
||||
int f1()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
|
||||
[[nodiscard]] int f2()
|
||||
{
|
||||
[[maybe_unused]] auto unused = f1();
|
||||
|
||||
switch (f1())
|
||||
{
|
||||
case 17:
|
||||
f1();
|
||||
[[fallthrough]];
|
||||
case 42:
|
||||
f1();
|
||||
}
|
||||
return f1();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_aggregate_initialization
|
||||
{
|
||||
|
||||
struct base1
|
||||
{
|
||||
int b1, b2 = 42;
|
||||
};
|
||||
|
||||
struct base2
|
||||
{
|
||||
base2() {
|
||||
b3 = 42;
|
||||
}
|
||||
int b3;
|
||||
};
|
||||
|
||||
struct derived : base1, base2
|
||||
{
|
||||
int d;
|
||||
};
|
||||
|
||||
derived d1 {{1, 2}, {}, 4}; // full initialization
|
||||
derived d2 {{}, {}, 4}; // value-initialized bases
|
||||
|
||||
}
|
||||
|
||||
namespace test_general_range_based_for_loop
|
||||
{
|
||||
|
||||
struct iter
|
||||
{
|
||||
int i;
|
||||
|
||||
int& operator* ()
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
const int& operator* () const
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
iter& operator++()
|
||||
{
|
||||
++i;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
struct sentinel
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
bool operator== (const iter& i, const sentinel& s)
|
||||
{
|
||||
return i.i == s.i;
|
||||
}
|
||||
|
||||
bool operator!= (const iter& i, const sentinel& s)
|
||||
{
|
||||
return !(i == s);
|
||||
}
|
||||
|
||||
struct range
|
||||
{
|
||||
iter begin() const
|
||||
{
|
||||
return {0};
|
||||
}
|
||||
|
||||
sentinel end() const
|
||||
{
|
||||
return {5};
|
||||
}
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
range r {};
|
||||
|
||||
for (auto i : r)
|
||||
{
|
||||
[[maybe_unused]] auto v = i;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_capture_asterisk_this_by_value
|
||||
{
|
||||
|
||||
struct t
|
||||
{
|
||||
int i;
|
||||
int foo()
|
||||
{
|
||||
return [*this]()
|
||||
{
|
||||
return i;
|
||||
}();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_enum_class_construction
|
||||
{
|
||||
|
||||
enum class byte : unsigned char
|
||||
{};
|
||||
|
||||
byte foo {42};
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr_if
|
||||
{
|
||||
|
||||
template <bool cond>
|
||||
int f ()
|
||||
{
|
||||
if constexpr(cond)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_selection_statement_with_initializer
|
||||
{
|
||||
|
||||
int f()
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
|
||||
int f2()
|
||||
{
|
||||
if (auto i = f(); i > 0)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
switch (auto i = f(); i + 4)
|
||||
{
|
||||
case 17:
|
||||
return 2;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if !defined(REALLY_CLANG)
|
||||
namespace test_template_argument_deduction_for_class_templates
|
||||
{
|
||||
|
||||
// TODO: test it with clang++ from git
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct pair
|
||||
{
|
||||
pair (T1 p1, T2 p2)
|
||||
: m1 {p1},
|
||||
m2 {p2}
|
||||
{}
|
||||
|
||||
T1 m1;
|
||||
T2 m2;
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
[[maybe_unused]] auto p = pair{13, 42u};
|
||||
}
|
||||
|
||||
}
|
||||
#endif // !defined(REALLY_CLANG)
|
||||
|
||||
namespace test_non_type_auto_template_parameters
|
||||
{
|
||||
|
||||
template <auto n>
|
||||
struct B
|
||||
{};
|
||||
|
||||
B<5> b1;
|
||||
B<'a'> b2;
|
||||
|
||||
}
|
||||
|
||||
#if !defined(REALLY_CLANG)
|
||||
namespace test_structured_bindings
|
||||
{
|
||||
|
||||
// TODO: test it with clang++ from git
|
||||
|
||||
int arr[2] = { 1, 2 };
|
||||
std::pair<int, int> pr = { 1, 2 };
|
||||
|
||||
auto f1() -> int(&)[2]
|
||||
{
|
||||
return arr;
|
||||
}
|
||||
|
||||
auto f2() -> std::pair<int, int>&
|
||||
{
|
||||
return pr;
|
||||
}
|
||||
|
||||
struct S
|
||||
{
|
||||
int x1 : 2;
|
||||
volatile double y1;
|
||||
};
|
||||
|
||||
S f3()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
auto [ x1, y1 ] = f1();
|
||||
auto& [ xr1, yr1 ] = f1();
|
||||
auto [ x2, y2 ] = f2();
|
||||
auto& [ xr2, yr2 ] = f2();
|
||||
const auto [ x3, y3 ] = f3();
|
||||
|
||||
}
|
||||
#endif // !defined(REALLY_CLANG)
|
||||
|
||||
#if !defined(REALLY_CLANG)
|
||||
namespace test_exception_spec_type_system
|
||||
{
|
||||
|
||||
// TODO: test it with clang++ from git
|
||||
|
||||
struct Good {};
|
||||
struct Bad {};
|
||||
|
||||
void g1() noexcept;
|
||||
void g2();
|
||||
|
||||
template<typename T>
|
||||
Bad
|
||||
f(T*, T*);
|
||||
|
||||
template<typename T1, typename T2>
|
||||
Good
|
||||
f(T1*, T2*);
|
||||
|
||||
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
|
||||
|
||||
}
|
||||
#endif // !defined(REALLY_CLANG)
|
||||
|
||||
namespace test_inline_variables
|
||||
{
|
||||
|
||||
template<class T> void f(T)
|
||||
{}
|
||||
|
||||
template<class T> inline T g(T)
|
||||
{
|
||||
return T{};
|
||||
}
|
||||
|
||||
template<> inline void f<>(int)
|
||||
{}
|
||||
|
||||
template<> int g<>(int)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx17
|
||||
|
||||
#endif // __cplusplus <= 201402L
|
||||
|
||||
]])
|
160
vendor/git.apache.org/thrift.git/aclocal/ax_cxx_compile_stdcxx_11.m4
generated
vendored
160
vendor/git.apache.org/thrift.git/aclocal/ax_cxx_compile_stdcxx_11.m4
generated
vendored
|
@ -1,26 +1,23 @@
|
|||
# ============================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
|
||||
# ============================================================================
|
||||
# =============================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
|
||||
# =============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
|
||||
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the C++11
|
||||
# standard; if necessary, add switches to CXXFLAGS to enable support.
|
||||
# standard; if necessary, add switches to CXX and CXXCPP to enable
|
||||
# support.
|
||||
#
|
||||
# The first argument, if specified, indicates whether you insist on an
|
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||
# -std=c++11). If neither is specified, you get whatever works, with
|
||||
# preference for an extended mode.
|
||||
#
|
||||
# The second argument, if specified 'mandatory' or if left unspecified,
|
||||
# indicates that baseline C++11 support is required and that the macro
|
||||
# should error out if no mode with that support is found. If specified
|
||||
# 'optional', then configuration proceeds regardless, after defining
|
||||
# HAVE_CXX11 if and only if a supporting mode is found.
|
||||
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
|
||||
# macro with the version set to C++11. The two optional arguments are
|
||||
# forwarded literally as the second and third argument respectively.
|
||||
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
|
||||
# more information. If you want to use this macro, you also need to
|
||||
# download the ax_cxx_compile_stdcxx.m4 file.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
|
@ -28,138 +25,15 @@
|
|||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 10
|
||||
#serial 18
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
|
||||
template <typename T>
|
||||
struct check
|
||||
{
|
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||
};
|
||||
|
||||
struct Base {
|
||||
virtual void f() {}
|
||||
};
|
||||
struct Child : public Base {
|
||||
virtual void f() override {}
|
||||
};
|
||||
|
||||
typedef check<check<bool>> right_angle_brackets;
|
||||
|
||||
int a;
|
||||
decltype(a) b;
|
||||
|
||||
typedef check<int> check_type;
|
||||
check_type c;
|
||||
check_type&& cr = static_cast<check_type&&>(c);
|
||||
|
||||
auto d = a;
|
||||
auto l = [](){};
|
||||
// Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable]
|
||||
struct use_l { use_l() { l(); } };
|
||||
|
||||
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
||||
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this
|
||||
namespace test_template_alias_sfinae {
|
||||
struct foo {};
|
||||
|
||||
template<typename T>
|
||||
using member = typename T::member_type;
|
||||
|
||||
template<typename T>
|
||||
void func(...) {}
|
||||
|
||||
template<typename T>
|
||||
void func(member<T>*) {}
|
||||
|
||||
void test();
|
||||
|
||||
void test() {
|
||||
func<foo>(0);
|
||||
}
|
||||
}
|
||||
]])
|
||||
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
|
||||
m4_if([$1], [], [],
|
||||
[$1], [ext], [],
|
||||
[$1], [noext], [],
|
||||
[m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
|
||||
m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
|
||||
[$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
|
||||
[$2], [optional], [ax_cxx_compile_cxx11_required=false],
|
||||
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
|
||||
ax_cv_cxx_compile_cxx11,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[ax_cv_cxx_compile_cxx11=yes],
|
||||
[ax_cv_cxx_compile_cxx11=no])])
|
||||
if test x$ax_cv_cxx_compile_cxx11 = xyes; then
|
||||
ac_success=yes
|
||||
fi
|
||||
|
||||
m4_if([$1], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=gnu++11 -std=gnu++0x; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
m4_if([$1], [ext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=c++11 -std=c++0x; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx11_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
|
||||
fi
|
||||
else
|
||||
if test x$ac_success = xno; then
|
||||
HAVE_CXX11=0
|
||||
AC_MSG_NOTICE([No compiler with C++11 support was found])
|
||||
else
|
||||
HAVE_CXX11=1
|
||||
AC_DEFINE(HAVE_CXX11,1,
|
||||
[define if the compiler supports basic C++11 syntax])
|
||||
fi
|
||||
|
||||
AC_SUBST(HAVE_CXX11)
|
||||
fi
|
||||
])
|
||||
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])
|
||||
|
|
2
vendor/git.apache.org/thrift.git/aclocal/ax_javac_and_java.m4
generated
vendored
2
vendor/git.apache.org/thrift.git/aclocal/ax_javac_and_java.m4
generated
vendored
|
@ -118,7 +118,7 @@ AC_DEFUN([AX_CHECK_JAVA_CLASS],
|
|||
AC_DEFUN([AX_CHECK_ANT_VERSION],
|
||||
[
|
||||
AC_MSG_CHECKING(for ant version > $2)
|
||||
ANT_VALID=`expr $($1 -version 2>/dev/null | sed -n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p') \>= $2`
|
||||
ANT_VALID=`expr "x$(printf "$2\n$($1 -version 2>/dev/null | sed -n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p')" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 -g | sed -n 1p)" = "x$2"`
|
||||
if test "x$ANT_VALID" = "x1" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
|
|
6
vendor/git.apache.org/thrift.git/aclocal/ax_lua.m4
generated
vendored
6
vendor/git.apache.org/thrift.git/aclocal/ax_lua.m4
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_lua.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_lua.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
|
@ -166,7 +166,7 @@
|
|||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
|
@ -181,7 +181,7 @@
|
|||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 39
|
||||
#serial 40
|
||||
|
||||
dnl =========================================================================
|
||||
dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION],
|
||||
|
|
61
vendor/git.apache.org/thrift.git/aclocal/ax_prog_dotnetcore_version.m4
generated
vendored
Normal file
61
vendor/git.apache.org/thrift.git/aclocal/ax_prog_dotnetcore_version.m4
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
# ===============================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_prog_dotnetcore_version.html
|
||||
# ===============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PROG_DOTNETCORE_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Makes sure that .NET Core supports the version indicated. If true the
|
||||
# shell commands in ACTION-IF-TRUE are executed. If not the shell commands
|
||||
# in ACTION-IF-FALSE are run. The $dotnetcore_version variable will be
|
||||
# filled with the detected version.
|
||||
#
|
||||
# This macro uses the $DOTNETCORE variable to perform the check. If
|
||||
# $DOTNETCORE is not set prior to calling this macro, the macro will fail.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# AC_PATH_PROG([DOTNETCORE],[dotnet])
|
||||
# AC_PROG_DOTNETCORE_VERSION([1.0.2],[ ... ],[ ... ])
|
||||
#
|
||||
# Searches for .NET Core, then checks if at least version 1.0.2 is
|
||||
# present.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2016 Jens Geyer <jensg@apache.org>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 2
|
||||
|
||||
AC_DEFUN([AX_PROG_DOTNETCORE_VERSION],[
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
AS_IF([test -n "$DOTNETCORE"],[
|
||||
ax_dotnetcore_version="$1"
|
||||
|
||||
AC_MSG_CHECKING([for .NET Core version])
|
||||
dotnetcore_version=`$DOTNETCORE --version 2>&1 | $SED -e 's/\(@<:@0-9@:>@*\.@<:@0-9@:>@*\.@<:@0-9@:>@*\)\(.*\)/\1/'`
|
||||
AC_MSG_RESULT($dotnetcore_version)
|
||||
|
||||
AC_SUBST([DOTNETCORE_VERSION],[$dotnetcore_version])
|
||||
|
||||
AX_COMPARE_VERSION([$ax_dotnetcore_version],[le],[$dotnetcore_version],[
|
||||
:
|
||||
$2
|
||||
],[
|
||||
:
|
||||
$3
|
||||
])
|
||||
],[
|
||||
AC_MSG_WARN([could not find .NET Core])
|
||||
$3
|
||||
])
|
||||
])
|
4
vendor/git.apache.org/thrift.git/aclocal/ax_prog_haxe_version.m4
generated
vendored
4
vendor/git.apache.org/thrift.git/aclocal/ax_prog_haxe_version.m4
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_prog_haxe_version.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_prog_haxe_version.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
|
@ -32,7 +32,7 @@
|
|||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
AC_DEFUN([AX_PROG_HAXE_VERSION],[
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
|
4
vendor/git.apache.org/thrift.git/aclocal/ax_prog_perl_modules.m4
generated
vendored
4
vendor/git.apache.org/thrift.git/aclocal/ax_prog_perl_modules.m4
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_prog_perl_modules.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_prog_perl_modules.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
|
@ -32,7 +32,7 @@
|
|||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 7
|
||||
#serial 8
|
||||
|
||||
AU_ALIAS([AC_PROG_PERL_MODULES], [AX_PROG_PERL_MODULES])
|
||||
AC_DEFUN([AX_PROG_PERL_MODULES],[dnl
|
||||
|
|
147
vendor/git.apache.org/thrift.git/appveyor.yml
generated
vendored
147
vendor/git.apache.org/thrift.git/appveyor.yml
generated
vendored
|
@ -1,3 +1,4 @@
|
|||
#
|
||||
# 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
|
||||
|
@ -18,76 +19,92 @@
|
|||
|
||||
# build Apache Thrift on AppVeyor - https://ci.appveyor.com
|
||||
|
||||
shallow_clone: true
|
||||
clone_depth: 10
|
||||
version: '1.0.0-dev.{build}'
|
||||
|
||||
shallow_clone: true
|
||||
|
||||
version: '{build}'
|
||||
os:
|
||||
# - Windows Server 2012 R2
|
||||
- Visual Studio 2015
|
||||
- Visual Studio 2017
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- PROFILE: CYGWIN
|
||||
fast_finish: true
|
||||
|
||||
environment:
|
||||
BOOST_ROOT: C:\Libraries\boost_1_59_0
|
||||
BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0
|
||||
# Unfurtunately, this version needs manual update because old versions are quickly deleted.
|
||||
ANT_VERSION: 1.9.7
|
||||
matrix:
|
||||
- PROFILE: MSVC2017
|
||||
PLATFORM: x64
|
||||
CONFIGURATION: Release
|
||||
BOOST_VERSION: 1.65.1
|
||||
LIBEVENT_VERSION: 2.1.8
|
||||
PYTHON_VERSION: 3.6
|
||||
QT_VERSION: 5.10
|
||||
ZLIB_VERSION: 1.2.11
|
||||
DISABLED_TESTS: StressTestNonBlocking
|
||||
|
||||
- PROFILE: MSVC2013
|
||||
PLATFORM: x86
|
||||
CONFIGURATION: Release
|
||||
BOOST_VERSION: 1.58.0
|
||||
LIBEVENT_VERSION: 2.0.22
|
||||
PYTHON_VERSION: 3.5
|
||||
QT_VERSION: 5.8
|
||||
ZLIB_VERSION: 1.2.8
|
||||
DISABLED_TESTS: StressTestNonBlocking
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
|
||||
- PROFILE: MINGW
|
||||
PLATFORM: x64
|
||||
CONFIGURATION: RelWithDebInfo
|
||||
DISABLED_TESTS: StressTestNonBlocking
|
||||
|
||||
- PROFILE: CYGWIN
|
||||
PLATFORM: x86
|
||||
CONFIGURATION: RelWithDebInfo
|
||||
DISABLED_TESTS: (ZlibTest|OpenSSLManualInitTest|TNonblockingServerTest|StressTestNonBlocking)
|
||||
|
||||
# - PROFILE: CYGWIN
|
||||
# PLATFORM: x64
|
||||
# CONFIGURATION: RelWithDebInfo
|
||||
# DISABLED_TESTS: (ZlibTest|OpenSSLManualInitTest|TNonblockingServerTest|StressTestNonBlocking)
|
||||
|
||||
install:
|
||||
- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64'
|
||||
- cd \
|
||||
# Zlib
|
||||
- appveyor DownloadFile https://github.com/madler/zlib/archive/v1.2.8.tar.gz
|
||||
- 7z x v1.2.8.tar.gz -so | 7z x -si -ttar > nul
|
||||
- cd zlib-1.2.8
|
||||
- cmake -G "Visual Studio 14 2015 Win64" .
|
||||
- cmake --build . --config release
|
||||
- cd ..
|
||||
# OpenSSL
|
||||
- C:\Python35-x64\python %APPVEYOR_BUILD_FOLDER%\build\appveyor\download_openssl.py
|
||||
- ps: Start-Process "Win64OpenSSL.exe" -ArgumentList "/silent /verysilent /sp- /suppressmsgboxes" -Wait
|
||||
# Libevent
|
||||
- appveyor DownloadFile https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
|
||||
- 7z x libevent-2.0.22-stable.tar.gz -so | 7z x -si -ttar > nul
|
||||
- cd libevent-2.0.22-stable
|
||||
- nmake -f Makefile.nmake
|
||||
- mkdir lib
|
||||
- move *.lib lib\
|
||||
- move WIN32-Code\event2\* include\event2\
|
||||
- move *.h include\
|
||||
- cd ..
|
||||
- appveyor-retry cinst -y winflexbison
|
||||
- appveyor DownloadFile http://www.us.apache.org/dist/ant/binaries/apache-ant-%ANT_VERSION%-bin.zip
|
||||
- 7z x apache-ant-%ANT_VERSION%-bin.zip > nul
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
# TODO: Enable Haskell build
|
||||
# - cinst HaskellPlatform -version 2014.2.0.0
|
||||
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- call build\appveyor\%PROFILE:~0,4%-appveyor-install.bat
|
||||
- refreshenv
|
||||
|
||||
build_script:
|
||||
- set PATH=C:\ProgramData\chocolatey\bin;C:\apache-ant-%ANT_VERSION%\bin;%PATH%
|
||||
- set JAVA_HOME=C:\Program Files\Java\jdk1.7.0
|
||||
- set PATH=%JAVA_HOME%\bin;%PATH%
|
||||
# - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\bin
|
||||
# - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\lib\extralibs\bin
|
||||
- set PATH=C:\Python27-x64\scripts;C:\Python27-x64;%PATH%
|
||||
- pip install ipaddress backports.ssl_match_hostname tornado twisted
|
||||
- mkdir cmake-build
|
||||
- cd cmake-build
|
||||
- cmake -G "Visual Studio 14 2015 Win64" -DWITH_SHARED_LIB=OFF -DLIBEVENT_ROOT=C:\libevent-2.0.22-stable -DZLIB_INCLUDE_DIR=C:\zlib-1.2.8 -DZLIB_LIBRARY=C:\zlib-1.2.8\release\zlibstatic.lib -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" ..
|
||||
- findstr /b /e BUILD_COMPILER:BOOL=ON CMakeCache.txt
|
||||
- findstr /b /e BUILD_CPP:BOOL=ON CMakeCache.txt
|
||||
- findstr /b /e BUILD_JAVA:BOOL=ON CMakeCache.txt
|
||||
- findstr /b /e BUILD_PYTHON:BOOL=ON CMakeCache.txt
|
||||
# - findstr /b /e BUILD_C_GLIB:BOOL=ON CMakeCache.txt
|
||||
# - findstr /b /e BUILD_HASKELL:BOOL=ON CMakeCache.txt
|
||||
- findstr /b /e BUILD_TESTING:BOOL=ON CMakeCache.txt
|
||||
# - cmake --build .
|
||||
- cmake --build . --config Release
|
||||
# TODO: Fix cpack
|
||||
# - cpack
|
||||
# TODO: Run more tests
|
||||
# CTest fails to invoke ant seemingly due to "ant.bat" v.s. "ant" (shell script) conflict.
|
||||
# Currently, everything that involves OpenSSL seems to hang forever on our Appveyor setup.
|
||||
# Also a few C++ tests hang (on Appveyor or on Windows in general).
|
||||
- ctest -C Release --timeout 600 -VV -E "(StressTestNonBlocking|PythonTestSSLSocket|python_test$|^Java)"
|
||||
# TODO make it perfect ;-r
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- call build\appveyor\%PROFILE:~0,4%-appveyor-build.bat
|
||||
|
||||
test_script:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- call build\appveyor\%PROFILE:~0,4%-appveyor-test.bat
|
||||
|
||||
|
||||
# artifact capture disabled as it might increase service cost for little gain:
|
||||
#
|
||||
# artifacts:
|
||||
# - path: local-thrift-inst
|
||||
# name: cmake installed content
|
||||
# type: zip
|
||||
#
|
||||
# - path: local-thrift-build\Testing
|
||||
# name: ctest output
|
||||
# type: zip
|
||||
|
||||
# RDP support: use one or the other...
|
||||
#
|
||||
# enables RDP for each build job so you can inspect the environment at the beginning of the job:
|
||||
# init:
|
||||
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
#
|
||||
# enables RDP at the end of the build job so you can login and re-run
|
||||
# commands to see why something failed...
|
||||
#on_finish:
|
||||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
#
|
||||
# also need:
|
||||
# environment:
|
||||
# APPVEYOR_RDP_PASSWORD: thr1FT2345$xyzZ
|
9
vendor/git.apache.org/thrift.git/bootstrap.sh
generated
vendored
9
vendor/git.apache.org/thrift.git/bootstrap.sh
generated
vendored
|
@ -38,17 +38,24 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
format_version () {
|
||||
printf "%03d%03d%03d%03d" $(echo $1 | tr '.' ' ');
|
||||
}
|
||||
|
||||
# we require automake 1.13 or later
|
||||
# check must happen externally due to use of newer macro
|
||||
AUTOMAKE_VERSION=`automake --version | grep automake | egrep -o '([0-9]{1,}\.)+[0-9]{1,}'`
|
||||
if [ "$AUTOMAKE_VERSION" \< "1.13" ]; then
|
||||
if [ $(format_version $AUTOMAKE_VERSION) -lt $(format_version 1.13) ]; then
|
||||
echo >&2 "automake version $AUTOMAKE_VERSION is too old (need 1.13 or later)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
autoscan
|
||||
$LIBTOOLIZE --copy --automake
|
||||
aclocal -I ./aclocal
|
||||
autoheader
|
||||
sed '/undef VERSION/d' config.hin > config.hin2
|
||||
mv config.hin2 config.hin
|
||||
autoconf
|
||||
automake --copy --add-missing --foreign
|
||||
|
|
1
vendor/git.apache.org/thrift.git/bower.json
generated
vendored
1
vendor/git.apache.org/thrift.git/bower.json
generated
vendored
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"name": "thrift",
|
||||
"version": "0.10.0",
|
||||
"homepage": "https://git-wip-us.apache.org/repos/asf/thrift.git",
|
||||
"authors": [
|
||||
"Apache Thrift <dev@thrift.apache.org>"
|
||||
|
|
36
vendor/git.apache.org/thrift.git/build/appveyor/CYGW-appveyor-build.bat
generated
vendored
Normal file
36
vendor/git.apache.org/thrift.git/build/appveyor/CYGW-appveyor-build.bat
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_build.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
|
||||
SET CMAKEARGS=^
|
||||
-G'%GENERATOR%' ^
|
||||
-DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
|
||||
-DCMAKE_INSTALL_PREFIX=%INSTDIR% ^
|
||||
-DCMAKE_CXX_EXTENSIONS=ON ^
|
||||
-DCMAKE_CXX_FLAGS="-D_GNU_SOURCE" ^
|
||||
-DCMAKE_CXX_STANDARD=11 ^
|
||||
-DWITH_PYTHON=OFF ^
|
||||
-DWITH_SHARED_LIB=OFF ^
|
||||
-DWITH_STATIC_LIB=ON ^
|
||||
-DWITH_STDTHREADS=ON
|
||||
|
||||
@ECHO ON
|
||||
%BASH% -lc "mkdir -p %BUILDDIR% && cd %BUILDDIR% && cmake.exe %SRCDIR% %CMAKEARGS% && cmake --build . --config %CONFIGURATION% --target install" || EXIT /B
|
||||
@ECHO OFF
|
34
vendor/git.apache.org/thrift.git/build/appveyor/CYGW-appveyor-install.bat
generated
vendored
Normal file
34
vendor/git.apache.org/thrift.git/build/appveyor/CYGW-appveyor-install.bat
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Appveyor install script for CYGWIN
|
||||
:: Installs third party packages we need for a cmake build
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_install.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
CALL cl_showenv.bat || EXIT /B
|
||||
|
||||
::
|
||||
:: Install apt-cyg for package management
|
||||
::
|
||||
|
||||
%BASH% -lc "wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg && install apt-cyg /bin && rm -f apt-cyg" || EXIT /B
|
||||
%BASH% -lc "apt-cyg update" || EXIT /B
|
||||
%BASH% -lc "apt-cyg install bison cmake flex gcc-g++ libboost-devel libevent-devel make openssl-devel zlib-devel"
|
21
vendor/git.apache.org/thrift.git/build/appveyor/CYGW-appveyor-test.bat
generated
vendored
Normal file
21
vendor/git.apache.org/thrift.git/build/appveyor/CYGW-appveyor-test.bat
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_test.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
|
||||
%BASH% -lc "cd %BUILDDIR% && ctest.exe -C %CONFIGURATION% --timeout 300 -VV -E '%DISABLED_TESTS%'" || EXIT /B
|
36
vendor/git.apache.org/thrift.git/build/appveyor/MING-appveyor-build.bat
generated
vendored
Normal file
36
vendor/git.apache.org/thrift.git/build/appveyor/MING-appveyor-build.bat
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_build.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
|
||||
SET CMAKEARGS=^
|
||||
-G'%GENERATOR%' ^
|
||||
-DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
|
||||
-DCMAKE_INSTALL_PREFIX=%INSTDIR% ^
|
||||
-DCMAKE_MAKE_PROGRAM=/mingw%NORM_PLATFORM%/bin/mingw32-make ^
|
||||
-DCMAKE_C_COMPILER=/mingw%NORM_PLATFORM%/bin/gcc.exe ^
|
||||
-DCMAKE_CXX_COMPILER=/mingw%NORM_PLATFORM%/bin/g++.exe ^
|
||||
-DOPENSSL_ROOT_DIR=/mingw%NORM_PLATFORM% ^
|
||||
-DWITH_PYTHON=OFF ^
|
||||
-DWITH_SHARED_LIB=OFF ^
|
||||
-DWITH_STATIC_LIB=ON
|
||||
|
||||
@ECHO ON
|
||||
%BASH% -lc "mkdir -p %BUILDDIR% && cd %BUILDDIR% && cmake.exe %SRCDIR% %CMAKEARGS% && cmake --build . --config %CONFIGURATION% --target install" || EXIT /B
|
||||
@ECHO OFF
|
45
vendor/git.apache.org/thrift.git/build/appveyor/MING-appveyor-install.bat
generated
vendored
Normal file
45
vendor/git.apache.org/thrift.git/build/appveyor/MING-appveyor-install.bat
generated
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Appveyor install script for MINGW on MSYS2
|
||||
:: Installs third party packages we need for a cmake build
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_install.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
CALL cl_showenv.bat || EXIT /B
|
||||
|
||||
SET PACKAGES=^
|
||||
--needed -S bison flex make ^
|
||||
mingw-w64-%MINGWPLAT%-boost ^
|
||||
mingw-w64-%MINGWPLAT%-cmake ^
|
||||
mingw-w64-%MINGWPLAT%-libevent ^
|
||||
mingw-w64-%MINGWPLAT%-openssl ^
|
||||
mingw-w64-%MINGWPLAT%-toolchain ^
|
||||
mingw-w64-%MINGWPLAT%-zlib
|
||||
|
||||
::mingw-w64-%MINGWPLAT%-qt5 : WAY too large (1GB download!) - tested in cygwin builds anyway
|
||||
|
||||
:: Remove old packages that no longer exist to avoid an error
|
||||
%BASH% -lc "pacman --noconfirm --remove libcatgets catgets || true" || EXIT /B
|
||||
|
||||
:: Upgrade things
|
||||
%BASH% -lc "pacman --noconfirm -Syu %IGNORE%" || EXIT /B
|
||||
%BASH% -lc "pacman --noconfirm -Su %IGNORE%" || EXIT /B
|
||||
%BASH% -lc "pacman --noconfirm %PACKAGES%" || EXIT /B
|
22
vendor/git.apache.org/thrift.git/build/appveyor/MING-appveyor-test.bat
generated
vendored
Normal file
22
vendor/git.apache.org/thrift.git/build/appveyor/MING-appveyor-test.bat
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_test.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
|
||||
%BASH% -lc "cd %BUILDDIR% && ctest.exe -C %CONFIGURATION% --timeout 300 -VV -E '%DISABLED_TESTS%'" || EXIT /B
|
50
vendor/git.apache.org/thrift.git/build/appveyor/MSVC-appveyor-build.bat
generated
vendored
Normal file
50
vendor/git.apache.org/thrift.git/build/appveyor/MSVC-appveyor-build.bat
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_build.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
MKDIR "%BUILDDIR%" || EXIT /B
|
||||
CD "%BUILDDIR%" || EXIT /B
|
||||
|
||||
:: Haskell is disabled for cmake (Windows), see Jira THRIFT-4545
|
||||
|
||||
@ECHO ON
|
||||
cmake "%SRCDIR%" ^
|
||||
-G"%GENERATOR%" ^
|
||||
-DBISON_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe ^
|
||||
-DBOOST_ROOT="%BOOST_ROOT%" ^
|
||||
-DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" ^
|
||||
-DCMAKE_BUILD_TYPE="%CONFIGURATION%" ^
|
||||
-DCMAKE_INSTALL_PREFIX="%INSTDIR%" ^
|
||||
-DFLEX_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_flex.exe ^
|
||||
-DINTTYPES_ROOT="%WIN3P%\msinttypes" ^
|
||||
-DLIBEVENT_ROOT="%WIN3P%\libevent-%LIBEVENT_VERSION%-stable" ^
|
||||
-DOPENSSL_ROOT_DIR="%OPENSSL_ROOT%" ^
|
||||
-DOPENSSL_USE_STATIC_LIBS=OFF ^
|
||||
-DZLIB_LIBRARY="%WIN3P%\zlib-inst\lib\zlib%ZLIB_LIB_SUFFIX%.lib" ^
|
||||
-DZLIB_ROOT="%WIN3P%\zlib-inst" ^
|
||||
-DWITH_HASKELL=OFF ^
|
||||
-DWITH_PYTHON=%WITH_PYTHON% ^
|
||||
-DWITH_%THREADMODEL%THREADS=ON ^
|
||||
-DWITH_SHARED_LIB=OFF ^
|
||||
-DWITH_STATIC_LIB=ON || EXIT /B
|
||||
@ECHO OFF
|
||||
|
||||
cmake --build . ^
|
||||
--config "%CONFIGURATION%" ^
|
||||
--target INSTALL || EXIT /B
|
60
vendor/git.apache.org/thrift.git/build/appveyor/MSVC-appveyor-install.bat
generated
vendored
Normal file
60
vendor/git.apache.org/thrift.git/build/appveyor/MSVC-appveyor-install.bat
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Appveyor install script for MSVC
|
||||
:: Installs (or builds) third party packages we need
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_install.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
CALL cl_showenv.bat || EXIT /B
|
||||
MKDIR "%WIN3P%" || EXIT /B
|
||||
|
||||
choco feature enable -n allowGlobalConfirmation || EXIT /B
|
||||
|
||||
:: Things to install when NOT running in appveyor:
|
||||
IF "%APPVEYOR_BUILD_ID%" == "" (
|
||||
cup -y chocolatey || EXIT /B
|
||||
cinst -c "%BUILDCACHE%" -y curl || EXIT /B
|
||||
cinst -c "%BUILDCACHE%" -y 7zip || EXIT /B
|
||||
cinst -c "%BUILDCACHE%" -y python3 || EXIT /B
|
||||
cinst -c "%BUILDCACHE%" -y openssl.light || EXIT /B
|
||||
)
|
||||
|
||||
cinst -c "%BUILDCACHE%" -y jdk8 || EXIT /B
|
||||
cinst -c "%BUILDCACHE%" -y winflexbison3 || EXIT /B
|
||||
|
||||
:: zlib - not available through chocolatey
|
||||
CD "%APPVEYOR_SCRIPTS%" || EXIT /B
|
||||
call build-zlib.bat || EXIT /B
|
||||
|
||||
:: libevent - not available through chocolatey
|
||||
CD "%APPVEYOR_SCRIPTS%" || EXIT /B
|
||||
call build-libevent.bat || EXIT /B
|
||||
|
||||
:: python packages (correct path to pip set in cl_setenv.bat)
|
||||
pip.exe ^
|
||||
install backports.ssl_match_hostname ^
|
||||
ipaddress ^
|
||||
six ^
|
||||
tornado ^
|
||||
twisted || EXIT /B
|
||||
|
||||
:: Haskell (GHC) and cabal (disabled: see Jira THRIFT-4545)
|
||||
:: cinst -c "%BUILDCACHE%" -y ghc || EXIT /B
|
32
vendor/git.apache.org/thrift.git/build/appveyor/MSVC-appveyor-test.bat
generated
vendored
Normal file
32
vendor/git.apache.org/thrift.git/build/appveyor/MSVC-appveyor-test.bat
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
@ECHO ON
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_test.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
CD "%BUILDDIR%" || EXIT /B
|
||||
|
||||
DIR C:\libraries
|
||||
DIR C:\libraries\boost_1_59_0
|
||||
DIR C:\libraries\boost_1_60_0
|
||||
DIR C:\libraries\boost_1_62_0
|
||||
DIR C:\libraries\boost_1_63_0
|
||||
DIR C:\libraries\boost_1_64_0
|
||||
|
||||
:: Add directories to the path to find DLLs of third party libraries so tests run properly!
|
||||
SET PATH=%BOOST_LIBRARYDIR:/=\%;%OPENSSL_ROOT%\bin;%WIN3P%\zlib-inst\bin;%PATH%
|
||||
|
||||
ctest -C %CONFIGURATION% --timeout 300 -VV -E "(%DISABLED_TESTS%)" || EXIT /B
|
48
vendor/git.apache.org/thrift.git/build/appveyor/MSYS-appveyor-build.bat
generated
vendored
Normal file
48
vendor/git.apache.org/thrift.git/build/appveyor/MSYS-appveyor-build.bat
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_build.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
|
||||
SET BASH=C:\msys64\usr\bin\bash
|
||||
SET CMAKE=/c/msys64/mingw64/bin/cmake.exe
|
||||
|
||||
@ECHO ON
|
||||
SET CMAKEARGS=-G\"%GENERATOR%\" ^
|
||||
-DBoost_DEBUG=ON ^
|
||||
-DBoost_NAMESPACE=libboost ^
|
||||
-DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% ^
|
||||
-DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% ^
|
||||
-DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
|
||||
-DCMAKE_C_COMPILER=gcc.exe ^
|
||||
-DCMAKE_CXX_COMPILER=g++.exe ^
|
||||
-DCMAKE_MAKE_PROGRAM=make.exe ^
|
||||
-DCMAKE_INSTALL_PREFIX=%INSTDIR_MSYS% ^
|
||||
-DLIBEVENT_ROOT=%LIBEVENT_ROOT% ^
|
||||
-DOPENSSL_LIBRARIES=%OPENSSL_LIBRARIES% ^
|
||||
-DOPENSSL_ROOT_DIR=%OPENSSL_ROOT% ^
|
||||
-DOPENSSL_USE_STATIC_LIBS=ON ^
|
||||
-DWITH_BOOST_STATIC=ON ^
|
||||
-DWITH_JAVA=OFF ^
|
||||
-DWITH_LIBEVENT=ON ^
|
||||
-DWITH_PYTHON=%WITH_PYTHON% ^
|
||||
-DWITH_SHARED_LIB=OFF ^
|
||||
-DWITH_STATIC_LIB=ON
|
||||
|
||||
%BASH% -lc "mkdir %BUILDDIR_MSYS% && cd %BUILDDIR_MSYS% && %CMAKE% %SRCDIR_MSYS% %CMAKEARGS% && %CMAKE% --build . --config %CONFIGURATION% --target install" || EXIT /B
|
||||
@ECHO OFF
|
48
vendor/git.apache.org/thrift.git/build/appveyor/MSYS-appveyor-install.bat
generated
vendored
Normal file
48
vendor/git.apache.org/thrift.git/build/appveyor/MSYS-appveyor-install.bat
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Appveyor install script for MSYS
|
||||
:: Installs (or builds) third party packages we need
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_install.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
CALL cl_showenv.bat || EXIT /B
|
||||
|
||||
:: We're going to keep boost at a version cmake understands
|
||||
SET BOOSTPKG=mingw-w64-x86_64-boost-1.64.0-3-any.pkg.tar.xz
|
||||
SET IGNORE=--ignore mingw-w64-x86_64-boost
|
||||
|
||||
SET PACKAGES=^
|
||||
--needed -S bison flex make ^
|
||||
mingw-w64-x86_64-cmake ^
|
||||
mingw-w64-x86_64-libevent ^
|
||||
mingw-w64-x86_64-openssl ^
|
||||
mingw-w64-x86_64-toolchain ^
|
||||
mingw-w64-x86_64-zlib
|
||||
|
||||
%BASH% -lc "pacman --noconfirm -Syu %IGNORE%" || EXIT /B
|
||||
%BASH% -lc "pacman --noconfirm -Su %IGNORE%" || EXIT /B
|
||||
%BASH% -lc "pacman --noconfirm %PACKAGES%" || EXIT /B
|
||||
|
||||
:: Install a slightly older boost (1.64.0) as cmake 3.10
|
||||
:: does not have built-in dependencies for boost 1.66.0 yet
|
||||
:: -- this cuts down on build warning output --
|
||||
%BASH% -lc "wget http://repo.msys2.org/mingw/x86_64/%BOOSTPKG% && pacman --noconfirm --needed -U %BOOSTPKG% && rm %BOOSTPKG%" || EXIT /B
|
||||
|
26
vendor/git.apache.org/thrift.git/build/appveyor/MSYS-appveyor-test.bat
generated
vendored
Normal file
26
vendor/git.apache.org/thrift.git/build/appveyor/MSYS-appveyor-test.bat
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CD build\appveyor || EXIT /B
|
||||
CALL cl_banner_test.bat || EXIT /B
|
||||
CALL cl_setenv.bat || EXIT /B
|
||||
CD "%BUILDDIR%" || EXIT /B
|
||||
|
||||
:: randomly fails on mingw; see Jira THRIFT-4106
|
||||
SET DISABLED_TESTS=concurrency_test
|
||||
|
||||
%BASH% -lc "cd %BUILDDIR_MSYS% && ctest.exe -C %CONFIGURATION% --timeout 300 -VV -E '(%DISABLED_TESTS%)'" || EXIT /B
|
34
vendor/git.apache.org/thrift.git/build/appveyor/README.md
generated
vendored
Normal file
34
vendor/git.apache.org/thrift.git/build/appveyor/README.md
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
<!---
|
||||
Licensed 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.
|
||||
-->
|
||||
|
||||
# Appveyor Build
|
||||
|
||||
Appveyor is capable of building MSVC 2010 through 2015 as well as
|
||||
having the latest MSYS2/MinGW 64-bit environment. It has many versions
|
||||
of boost and python installed as well. See what appveyor has
|
||||
[installed on build workers](https://www.appveyor.com/docs/installed-software/).
|
||||
|
||||
We run a matrix build on Appveyor and build the following combinations:
|
||||
|
||||
* MinGW x64 (gcc 6.3.0)
|
||||
* MSVC 2010 x86, an older boost, an older python
|
||||
* MSVC 2015 x86/x64, the latest boost, the latest python
|
||||
* MSYS2 x64 (gcc 6.3.0) - this is a work in progress
|
||||
|
||||
The Appveyor script takes the first four letters from the PROFILE specified in
|
||||
the environment stanza and runs these scripts in order:
|
||||
|
||||
????-appveyor-install.bat will install third party libraries and set up the environment
|
||||
????-appveyor-build.bat will build with cmake
|
||||
????-appveyor-test.bat will run ctest
|
37
vendor/git.apache.org/thrift.git/build/appveyor/build-libevent.bat
generated
vendored
Normal file
37
vendor/git.apache.org/thrift.git/build/appveyor/build-libevent.bat
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
SET URLFILE=libevent-%LIBEVENT_VERSION%-stable.tar.gz
|
||||
SET URL=https://github.com/libevent/libevent/releases/download/release-%LIBEVENT_VERSION%-stable/%URLFILE%
|
||||
|
||||
:: Download - support running a local build or a build in appveyor
|
||||
CD "%WIN3P%" || EXIT /B
|
||||
IF "%APPVEYOR_BUILD_ID%" == "" (
|
||||
curl -L -f -o "%URLFILE%" "%URL%"
|
||||
) ELSE (
|
||||
appveyor DownloadFile "%URL%"
|
||||
)
|
||||
7z x "%URLFILE%" -so | 7z x -si -ttar > nul || EXIT /B
|
||||
CD "libevent-%LIBEVENT_VERSION%-stable" || EXIT /B
|
||||
nmake -f Makefile.nmake static_libs || EXIT /B
|
||||
|
||||
:: in libevent 2.0 there is no nmake subdirectory in WIN32-Code, but in 2.1 there is
|
||||
mkdir lib || EXIT /B
|
||||
move *.lib lib\ || EXIT /B
|
||||
move WIN32-Code\event2\* include\event2\ || move WIN32-Code\nmake\event2\* include\event2\ || EXIT /B
|
||||
move *.h include\ || EXIT /B
|
||||
|
||||
ENDLOCAL
|
56
vendor/git.apache.org/thrift.git/build/appveyor/build-zlib.bat
generated
vendored
Normal file
56
vendor/git.apache.org/thrift.git/build/appveyor/build-zlib.bat
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
SET PACKAGE=zlib-%ZLIB_VERSION%
|
||||
SET BUILDDIR=%WIN3P%\zlib-build
|
||||
SET INSTDIR=%WIN3P%\zlib-inst
|
||||
SET SRCDIR=%WIN3P%\%PACKAGE%
|
||||
SET URLFILE=%PACKAGE%.tar.gz
|
||||
|
||||
:: This allows us to tolerate when the current version is archived
|
||||
SET URL=http://zlib.net/%URLFILE%
|
||||
SET FURL=http://zlib.net/fossils/%URLFILE%
|
||||
|
||||
:: Download - support running a local build or a build in appveyor
|
||||
CD "%WIN3P%" || EXIT /B
|
||||
IF "%APPVEYOR_BUILD_ID%" == "" (
|
||||
curl -L -f -o "%URLFILE%" "%URL%"
|
||||
IF ERRORLEVEL 1 (
|
||||
curl -L -f -o "%URLFILE%" "%FURL%"
|
||||
)
|
||||
) ELSE (
|
||||
appveyor DownloadFile "%URL%"
|
||||
IF ERRORLEVEL 1 (
|
||||
appveyor DownloadFile "%FURL%" || EXIT /B
|
||||
)
|
||||
)
|
||||
7z x "%URLFILE%" -so | 7z x -si -ttar > nul || EXIT /B
|
||||
|
||||
:: Generate
|
||||
MKDIR "%BUILDDIR%" || EXIT /B
|
||||
CD "%BUILDDIR%" || EXIT /B
|
||||
cmake "%SRCDIR%" ^
|
||||
-G"NMake Makefiles" ^
|
||||
-DCMAKE_INSTALL_PREFIX="%INSTDIR%" ^
|
||||
-DCMAKE_BUILD_TYPE="%CONFIGURATION%" || EXIT /B
|
||||
|
||||
:: Build
|
||||
nmake /fMakefile install || EXIT /B
|
||||
IF "%CONFIGURATION%" == "Debug" (
|
||||
COPY "%BUILDDIR%\zlibd.pdb" "%INSTDIR%\bin\" || EXIT /B
|
||||
)
|
||||
|
||||
ENDLOCAL
|
24
vendor/git.apache.org/thrift.git/build/appveyor/cl_banner_apache_thrift.bat
generated
vendored
Normal file
24
vendor/git.apache.org/thrift.git/build/appveyor/cl_banner_apache_thrift.bat
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
:: A visual indicator in a large log helps you locate things when scanning
|
||||
:: http://www.patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Apache%20Thrift
|
||||
|
||||
ECHO/
|
||||
ECHO ___ __ ________ _ _____
|
||||
ECHO / _ | ___ ___ _____/ / ___ /_ __/ / ____(_) _/ /_
|
||||
ECHO / __ |/ _ \/ _ `/ __/ _ \/ -_) / / / _ \/ __/ / _/ __/
|
||||
ECHO /_/ |_/ .__/\_,_/\__/_//_/\__/ /_/ /_//_/_/ /_/_/ \__/
|
||||
ECHO /_/
|
||||
ECHO/
|
23
vendor/git.apache.org/thrift.git/build/appveyor/cl_banner_build.bat
generated
vendored
Normal file
23
vendor/git.apache.org/thrift.git/build/appveyor/cl_banner_build.bat
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
:: A visual indicator in a large log helps you locate things when scanning
|
||||
:: http://www.patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Build
|
||||
|
||||
ECHO/
|
||||
ECHO ___ _ __ __
|
||||
ECHO / _ )__ __(_) /__/ /
|
||||
ECHO / _ / // / / / _ / @@@ BUILD
|
||||
ECHO /____/\_,_/_/_/\_,_/
|
||||
ECHO/
|
23
vendor/git.apache.org/thrift.git/build/appveyor/cl_banner_install.bat
generated
vendored
Normal file
23
vendor/git.apache.org/thrift.git/build/appveyor/cl_banner_install.bat
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
:: A visual indicator in a large log helps you locate things when scanning
|
||||
:: http://www.patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Install
|
||||
|
||||
ECHO/
|
||||
ECHO ____ __ ____
|
||||
ECHO / _/__ ___ / /____ _/ / /
|
||||
ECHO _/ // _ \(_-^</ __/ _ \/ / / @@@ INSTALL
|
||||
ECHO /___/_//_/___/\__/\_,_/_/_/
|
||||
ECHO/
|
23
vendor/git.apache.org/thrift.git/build/appveyor/cl_banner_test.bat
generated
vendored
Normal file
23
vendor/git.apache.org/thrift.git/build/appveyor/cl_banner_test.bat
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
:: A visual indicator in a large log helps you locate things when scanning
|
||||
:: http://www.patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Test
|
||||
|
||||
ECHO/
|
||||
ECHO ______ __
|
||||
ECHO /_ __/__ ___ / /_
|
||||
ECHO / / / -_^|_-^</ __/ @@@ TEST
|
||||
ECHO /_/ \__/___/\__/
|
||||
ECHO/
|
63
vendor/git.apache.org/thrift.git/build/appveyor/cl_setcompiler.bat
generated
vendored
Normal file
63
vendor/git.apache.org/thrift.git/build/appveyor/cl_setcompiler.bat
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Detect the compiler edition we're building in.
|
||||
:: Set the COMPILER environment variable to one of:
|
||||
:: gcc = MinGW / MSYS2 and gcc toolchain
|
||||
:: vc100 = Visual Studio 2010
|
||||
:: vc110 = Visual Studio 2012
|
||||
:: vc120 = Visual Studio 2013
|
||||
:: vc140 = Visual Studio 2015
|
||||
:: vc141 = Visual Studio 2017
|
||||
::
|
||||
:: Honors any existing COMPILER environment variable
|
||||
:: setting instead of overwriting it, to allow it
|
||||
:: to be forced if needed.
|
||||
::
|
||||
:: Sets ERRORLEVEL to 0 if COMPILER can be determined,
|
||||
:: to 1 if it cannot.
|
||||
::
|
||||
|
||||
IF DEFINED COMPILER (
|
||||
ECHO [warn ] using existing environment variable COMPILER
|
||||
EXIT /B 0
|
||||
)
|
||||
|
||||
IF NOT "%PROFILE:~0,4%" == "MSVC" (
|
||||
SET COMPILER=gcc
|
||||
) ELSE (
|
||||
CALL :CHECK 16
|
||||
IF !ERRORLEVEL! == 0 (SET COMPILER=vc100)
|
||||
CALL :CHECK 17
|
||||
IF !ERRORLEVEL! == 0 (SET COMPILER=vc110)
|
||||
CALL :CHECK 18
|
||||
IF !ERRORLEVEL! == 0 (SET COMPILER=vc120)
|
||||
CALL :CHECK 19.0
|
||||
IF !ERRORLEVEL! == 0 (SET COMPILER=vc140)
|
||||
CALL :CHECK 19.1
|
||||
IF !ERRORLEVEL! == 0 (SET COMPILER=vc141)
|
||||
)
|
||||
|
||||
IF NOT DEFINED COMPILER (
|
||||
ECHO [error] unable to determine the compiler edition
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
ECHO [info ] detected compiler edition %COMPILER%
|
||||
EXIT /B 0
|
||||
|
||||
:CHECK
|
||||
cl /? 2>&1 | findstr /C:"Version %1%" > nul
|
||||
EXIT /B
|
129
vendor/git.apache.org/thrift.git/build/appveyor/cl_setenv.bat
generated
vendored
Normal file
129
vendor/git.apache.org/thrift.git/build/appveyor/cl_setenv.bat
generated
vendored
Normal file
|
@ -0,0 +1,129 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
|
||||
IF "%PROFILE%" == "MSVC2010" (
|
||||
CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %PLATFORM%
|
||||
) ELSE IF "%PROFILE%" == "MSVC2012" (
|
||||
CALL "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" %PLATFORM%
|
||||
) ELSE IF "%PROFILE%" == "MSVC2013" (
|
||||
CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
|
||||
) ELSE IF "%PROFILE%" == "MSVC2015" (
|
||||
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
|
||||
) ELSE IF "%PROFILE%" == "MSVC2017" (
|
||||
CALL :SETUPNEWERMSVC || EXIT /B
|
||||
) ELSE IF "%PROFILE%" == "MINGW" (
|
||||
REM Supported, nothing special to do here.
|
||||
) ELSE IF "%PROFILE%" == "CYGWIN" (
|
||||
REM Supported, nothing special to do here.
|
||||
) ELSE (
|
||||
ECHO Unsupported PROFILE=%PROFILE% or PLATFORM=%PLATFORM%
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
CALL cl_setcompiler.bat || EXIT /B
|
||||
CALL cl_setgenerator.bat || EXIT /B
|
||||
|
||||
SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor
|
||||
SET BUILDCACHE=%APPVEYOR_BUILD_FOLDER%\..\build\cache
|
||||
SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
|
||||
SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
|
||||
SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
:: PLATFORM is x64 or x86
|
||||
:: NORM_PLATFORM is 64 or 32
|
||||
SET NORM_PLATFORM=%PLATFORM:~-2,2%
|
||||
IF "%NORM_PLATFORM%" == "86" (SET NORM_PLATFORM=32)
|
||||
|
||||
IF "%PROFILE:~0,4%" == "MSVC" (
|
||||
|
||||
:: FindBoost needs forward slashes so cmake doesn't see something as an escaped character
|
||||
SET BOOST_ROOT=C:/Libraries/boost_%BOOST_VERSION:.=_%
|
||||
SET BOOST_LIBRARYDIR=!BOOST_ROOT!/lib%NORM_PLATFORM%-msvc-%COMPILER:~-3,2%.%COMPILER:~-1,1%
|
||||
SET OPENSSL_ROOT=C:\OpenSSL-Win%NORM_PLATFORM%
|
||||
SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty
|
||||
|
||||
:: MSVC2010 doesn't "do" std::thread
|
||||
IF "%COMPILER%" == "vc100" (
|
||||
SET THREADMODEL=BOOST
|
||||
) ELSE (
|
||||
SET THREADMODEL=STD
|
||||
)
|
||||
|
||||
IF "%PYTHON_VERSION%" == "" (
|
||||
SET WITH_PYTHON=OFF
|
||||
) ELSE (
|
||||
SET WITH_PYTHON=ON
|
||||
IF /i "%PLATFORM%" == "x64" SET PTEXT=-x64
|
||||
SET PATH=C:\Python%PYTHON_VERSION:.=%!PTEXT!\scripts;C:\Python%PYTHON_VERSION:.=%!PTEXT!;!PATH!
|
||||
)
|
||||
IF "%CONFIGURATION%" == "Debug" (SET ZLIB_LIB_SUFFIX=d)
|
||||
|
||||
IF NOT "%QT_VERSION%" == "" (
|
||||
IF /i "%PLATFORM%" == "x64" SET QTEXT=_64
|
||||
SET PATH=C:\Qt\%QT_VERSION%\%PROFILE%!QTEXT!\bin;!PATH!
|
||||
)
|
||||
|
||||
) ELSE IF "%PROFILE:~0,4%" == "MING" (
|
||||
|
||||
:: PLATFORM = x86 means MINGWPLAT i686
|
||||
:: PLATFORM = x64 means MINGWPLAT x86_64
|
||||
SET MINGWPLAT=x86_64
|
||||
IF "%PLATFORM%" == "x86" (SET MINGWPLAT=i686)
|
||||
|
||||
SET BASH=C:\msys64\usr\bin\bash.exe
|
||||
!BASH! -lc "sed -i '/export PATH=\/mingw32\/bin/d' ~/.bash_profile && sed -i '/export PATH=\/mingw64\/bin/d' ~/.bash_profile && echo 'export PATH=/mingw%NORM_PLATFORM%/bin:$PATH' >> ~/.bash_profile" || EXIT /B
|
||||
|
||||
SET BUILDDIR=%BUILDDIR:\=/%
|
||||
SET BUILDDIR=/c!BUILDDIR:~2!
|
||||
SET INSTDIR=%INSTDIR:\=/%
|
||||
SET INSTDIR=/c!INSTDIR:~2!
|
||||
SET SRCDIR=%SRCDIR:\=/%
|
||||
SET SRCDIR=/c!SRCDIR:~2!
|
||||
|
||||
) ELSE IF "%PROFILE:~0,4%" == "CYGW" (
|
||||
|
||||
SET CYGWINROOT=C:\cygwin
|
||||
IF "%PLATFORM%" == "x64" (SET CYGWINROOT=!CYGWINROOT!64)
|
||||
|
||||
SET BASH=!CYGWINROOT!\bin\bash.exe
|
||||
SET SETUP=!CYGWINROOT!\setup-x86
|
||||
IF "%PLATFORM%" == "x64" (SET SETUP=!SETUP!_64)
|
||||
SET SETUP=!SETUP!.exe
|
||||
|
||||
SET BUILDDIR=%BUILDDIR:\=/%
|
||||
SET BUILDDIR=/cygdrive/c!BUILDDIR:~2!
|
||||
SET INSTDIR=%INSTDIR:\=/%
|
||||
SET INSTDIR_CYG=/cygdrive/c!INSTDIR:~2!
|
||||
SET SRCDIR=%SRCDIR:\=/%
|
||||
SET SRCDIR=/cygdrive/c!SRCDIR:~2!
|
||||
|
||||
)
|
||||
|
||||
GOTO :EOF
|
||||
|
||||
:SETUPNEWERMSVC
|
||||
FOR /F "USEBACKQ TOKENS=*" %%i IN (`call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version "[15.0,16.0)" -property installationPath`) DO (
|
||||
IF "%MSVCROOT%" == "" (SET MSVCROOT=%%i)
|
||||
)
|
||||
SET MSVCPLAT=x86
|
||||
IF "%PLATFORM%" == "x64" (SET MSVCPLAT=amd64)
|
||||
|
||||
SET CURRENTDIR=%CD%
|
||||
CALL "!MSVCROOT!\Common7\Tools\VsDevCmd.bat" -arch=!MSVCPLAT! || EXIT /B
|
||||
CD %CURRENTDIR%
|
||||
EXIT /B
|
||||
|
||||
:EOF
|
79
vendor/git.apache.org/thrift.git/build/appveyor/cl_setgenerator.bat
generated
vendored
Normal file
79
vendor/git.apache.org/thrift.git/build/appveyor/cl_setgenerator.bat
generated
vendored
Normal file
|
@ -0,0 +1,79 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Detect the compiler edition we're building in and then
|
||||
:: set the GENERATOR environment variable to one of:
|
||||
::
|
||||
:: Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
|
||||
:: Optional [arch] can be "Win64" or "ARM".
|
||||
:: Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
|
||||
:: Optional [arch] can be "Win64" or "ARM".
|
||||
:: Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
|
||||
:: Optional [arch] can be "Win64" or "ARM".
|
||||
:: Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
|
||||
:: Optional [arch] can be "Win64" or "ARM".
|
||||
:: Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
|
||||
:: Optional [arch] can be "Win64" or "IA64".
|
||||
:: MinGW Makefiles = Generates makefiles for MinGW
|
||||
:: MSYS Makefiles = Generates makefiles for MSYS
|
||||
:: Unix Makefiles = Generates makefiles for CYGWIN
|
||||
::
|
||||
:: Honors any existing GENERATOR environment variable
|
||||
:: setting instead of overwriting it, to allow it
|
||||
:: to be forced if needed.
|
||||
::
|
||||
:: Sets ERRORLEVEL to 0 if GENERATOR can be determined,
|
||||
:: to 1 if it cannot.
|
||||
::
|
||||
|
||||
IF DEFINED GENERATOR (
|
||||
ECHO [warn ] using existing environment variable GENERATOR
|
||||
EXIT /B 0
|
||||
)
|
||||
|
||||
|
||||
IF "%PROFILE:~0,4%" == "MING" (
|
||||
SET GENERATOR=MinGW Makefiles
|
||||
|
||||
) ELSE IF "%PROFILE:~0,4%" == "CYGW" (
|
||||
SET GENERATOR=Unix Makefiles
|
||||
|
||||
) ELSE IF "%PROFILE:~0,4%" == "MSYS" (
|
||||
SET GENERATOR=MSYS Makefiles
|
||||
) ELSE (
|
||||
IF /i "%PLATFORM%" == "x64" SET GENARCH= Win64
|
||||
CALL :CHECK 16
|
||||
IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 10 2010!GENARCH!
|
||||
CALL :CHECK 17
|
||||
IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 11 2012!GENARCH!
|
||||
CALL :CHECK 18
|
||||
IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 12 2013!GENARCH!
|
||||
CALL :CHECK 19.0
|
||||
IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 14 2015!GENARCH!
|
||||
CALL :CHECK 19.1
|
||||
IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 15 2017!GENARCH!
|
||||
)
|
||||
|
||||
IF NOT DEFINED GENERATOR (
|
||||
ECHO [error] unable to determine the CMake generator to use
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
ECHO [info ] using CMake generator %GENERATOR%
|
||||
EXIT /B 0
|
||||
|
||||
:CHECK
|
||||
cl /? 2>&1 | findstr /C:"Version %1%" > nul
|
||||
EXIT /B
|
64
vendor/git.apache.org/thrift.git/build/appveyor/cl_showenv.bat
generated
vendored
Normal file
64
vendor/git.apache.org/thrift.git/build/appveyor/cl_showenv.bat
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
ECHO/
|
||||
ECHO ===============================================================================
|
||||
IF "%PROFILE:~0,4%" == "MSVC" (
|
||||
ECHO Versions
|
||||
ECHO -------------------------------------------------------------------------------
|
||||
ECHO boost = %BOOST_VERSION%
|
||||
ECHO libevent = %LIBEVENT_VERSION%
|
||||
ECHO python = %PYTHON_VERSION%
|
||||
ECHO qt = %QT_VERSION%
|
||||
ECHO zlib = %ZLIB_VERSION%
|
||||
ECHO/
|
||||
)
|
||||
ECHO Appveyor Variables
|
||||
ECHO -------------------------------------------------------------------------------
|
||||
ECHO APPVEYOR_BUILD_FOLDER = %APPVEYOR_BUILD_FOLDER%
|
||||
ECHO CONFIGURATION = %CONFIGURATION%
|
||||
ECHO PLATFORM = %PLATFORM%
|
||||
ECHO PROFILE = %PROFILE%
|
||||
ECHO/
|
||||
ECHO Our Variables
|
||||
ECHO -------------------------------------------------------------------------------
|
||||
ECHO APPVEYOR_SCRIPTS = %APPVEYOR_SCRIPTS%
|
||||
ECHO BASH = %BASH%
|
||||
ECHO BOOST_ROOT = %BOOST_ROOT%
|
||||
ECHO BOOST_INCLUDEDIR = %BOOST_INCLUDEDIR%
|
||||
ECHO BOOST_LIBRARYDIR = %BOOST_LIBRARYDIR%
|
||||
ECHO BUILDCACHE = %BUILDCACHE%
|
||||
ECHO BUILDDIR = %BUILDDIR%
|
||||
ECHO COMPILER = %COMPILER%
|
||||
ECHO GENERATOR = %GENERATOR%
|
||||
ECHO INSTDIR = %INSTDIR%
|
||||
ECHO JAVA_HOME = %JAVA_HOME%
|
||||
ECHO OPENSSL_ROOT = %OPENSSL_ROOT%
|
||||
ECHO SETUP = %SETUP%
|
||||
ECHO SRCDIR = %SRCDIR%
|
||||
ECHO WIN3P = %WIN3P%
|
||||
ECHO WITH_PYTHON = %WITH_PYTHON%
|
||||
ECHO ZLIB_STATIC_SUFFIX = %ZLIB_STATIC_SUFFIX%
|
||||
IF NOT "%PROFILE:~0,4%" == "MSVC" (
|
||||
ECHO/
|
||||
ECHO UNIXy PATH
|
||||
ECHO -------------------------------------------------------------------------------
|
||||
%BASH% -lc "echo $PATH"
|
||||
)
|
||||
ECHO/
|
||||
ECHO Windows PATH
|
||||
ECHO -------------------------------------------------------------------------------
|
||||
ECHO %PATH%
|
||||
ECHO ===============================================================================
|
||||
ECHO/
|
41
vendor/git.apache.org/thrift.git/build/appveyor/download_openssl.py
generated
vendored
41
vendor/git.apache.org/thrift.git/build/appveyor/download_openssl.py
generated
vendored
|
@ -1,41 +0,0 @@
|
|||
import urllib.request
|
||||
import sys
|
||||
|
||||
OUT = 'Win64OpenSSL.exe'
|
||||
|
||||
URL_STR = 'https://slproweb.com/download/Win64OpenSSL-%s.exe'
|
||||
|
||||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 0
|
||||
VERSION_PATCH = 2
|
||||
VERSION_SUFFIX = 'j'
|
||||
VERSION_STR = '%d_%d_%d%s'
|
||||
|
||||
TRY_COUNT = 4
|
||||
|
||||
|
||||
def main():
|
||||
for patch in range(VERSION_PATCH, TRY_COUNT):
|
||||
for suffix in range(TRY_COUNT):
|
||||
if patch == VERSION_PATCH:
|
||||
s = VERSION_SUFFIX
|
||||
else:
|
||||
s = 'a'
|
||||
s = chr(ord(s) + suffix)
|
||||
ver = VERSION_STR % (VERSION_MAJOR, VERSION_MINOR, patch, s)
|
||||
url = URL_STR % ver
|
||||
try:
|
||||
with urllib.request.urlopen(url) as res:
|
||||
if res.getcode() == 200:
|
||||
with open(OUT, 'wb') as out:
|
||||
out.write(res.read())
|
||||
print('successfully downloaded from ' + url)
|
||||
return 0
|
||||
except urllib.error.HTTPError:
|
||||
pass
|
||||
print('failed to download from ' + url, file=sys.stderr)
|
||||
print('could not download openssl', file=sys.stderr)
|
||||
return 1
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
35
vendor/git.apache.org/thrift.git/build/appveyor/simulate-appveyor.bat
generated
vendored
Normal file
35
vendor/git.apache.org/thrift.git/build/appveyor/simulate-appveyor.bat
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Helps build thrift by pretending to be appveyor
|
||||
:: Usage:
|
||||
:: cd build\appveyor
|
||||
:: simulate-appveyor.bat [Debug|Release] [x86|x64] [CYGWIN|MINGW|MSVC201?]
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
SET APPVEYOR_BUILD_FOLDER=%~dp0..\..
|
||||
SET CONFIGURATION=%1
|
||||
SET PLATFORM=%2
|
||||
SET PROFILE=%3
|
||||
|
||||
CD %APPVEYOR_BUILD_FOLDER%
|
||||
CALL build\appveyor\%PROFILE:~0,4%-appveyor-install.bat || EXIT /B
|
||||
CD %APPVEYOR_BUILD_FOLDER%
|
||||
CALL build\appveyor\%PROFILE:~0,4%-appveyor-build.bat || EXIT /B
|
||||
CD %APPVEYOR_BUILD_FOLDER%
|
||||
CALL build\appveyor\%PROFILE:~0,4%-appveyor-test.bat
|
25
vendor/git.apache.org/thrift.git/build/cmake/ConfigureChecks.cmake
generated
vendored
25
vendor/git.apache.org/thrift.git/build/cmake/ConfigureChecks.cmake
generated
vendored
|
@ -17,17 +17,16 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
|
||||
include(CheckSymbolExists)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
# If AI_ADDRCONFIG is not defined we define it as 0
|
||||
check_symbol_exists(AI_ADDRCONFIG "sys/types.h;sys/socket.h;netdb.h" HAVE_AI_ADDRCONFIG)
|
||||
if(NOT HAVE_AI_ADDRCONFIG)
|
||||
set(AI_ADDRCONFIG 1)
|
||||
endif(NOT HAVE_AI_ADDRCONFIG)
|
||||
if (Inttypes_FOUND)
|
||||
# This allows the inttypes.h and stdint.h checks to succeed on platforms that
|
||||
# do not natively provide there.
|
||||
set (CMAKE_REQUIRED_INCLUDES ${INTTYPES_INCLUDE_DIRS})
|
||||
endif ()
|
||||
|
||||
check_include_file(arpa/inet.h HAVE_ARPA_INET_H)
|
||||
check_include_file(fcntl.h HAVE_FCNTL_H)
|
||||
|
@ -35,18 +34,22 @@ check_include_file(getopt.h HAVE_GETOPT_H)
|
|||
check_include_file(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_file(netdb.h HAVE_NETDB_H)
|
||||
check_include_file(netinet/in.h HAVE_NETINET_IN_H)
|
||||
check_include_file(signal.h HAVE_SIGNAL_H)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
check_include_file(pthread.h HAVE_PTHREAD_H)
|
||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H)
|
||||
check_include_file(sys/param.h HAVE_SYS_PARAM_H)
|
||||
check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H)
|
||||
check_include_file(sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file(sys/un.h HAVE_SYS_UN_H)
|
||||
check_include_file(poll.h HAVE_POLL_H)
|
||||
check_include_file(sys/poll.h HAVE_SYS_POLL_H)
|
||||
check_include_file(sys/select.h HAVE_SYS_SELECT_H)
|
||||
check_include_file(sched.h HAVE_SCHED_H)
|
||||
check_include_file(string.h HAVE_STRING_H)
|
||||
check_include_file(strings.h HAVE_STRINGS_H)
|
||||
|
||||
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
|
||||
|
@ -72,5 +75,5 @@ set(VERSION ${thrift_VERSION})
|
|||
|
||||
# generate a config.h file
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/thrift/config.h")
|
||||
# HACK: Some files include thrift/config.h and some config.h so we include both. This should be cleaned up.
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/thrift" "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
|
25
vendor/git.apache.org/thrift.git/build/cmake/DefineCMakeDefaults.cmake
generated
vendored
25
vendor/git.apache.org/thrift.git/build/cmake/DefineCMakeDefaults.cmake
generated
vendored
|
@ -35,7 +35,7 @@ set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
|||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
|
||||
# Define the generic version of the libraries here
|
||||
set(GENERIC_LIB_VERSION "0.10.0")
|
||||
set(GENERIC_LIB_VERSION "0.1.0")
|
||||
set(GENERIC_LIB_SOVERSION "0")
|
||||
|
||||
# Set the default build type to release with debug info
|
||||
|
@ -68,3 +68,26 @@ set(CMAKE_MACOSX_RPATH TRUE)
|
|||
# locations and running the executables without LD_PRELOAD or similar.
|
||||
# This requires the library to be built with rpath support.
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
#
|
||||
# C++ Language Level Defaults - this depends on the compiler capabilities
|
||||
#
|
||||
if (NOT DEFINED CMAKE_CXX_STANDARD)
|
||||
if (MSVC AND MSVC_VERSION LESS 1800)
|
||||
# MSVC 2012 and earlier don't support template aliases so you have to use C++98
|
||||
set(CMAKE_CXX_STANDARD 98)
|
||||
message(STATUS "Setting C++98 as the default language level (for an older MSVC compiler).")
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 11) # C++11
|
||||
message(STATUS "Setting C++11 as the default language level.")
|
||||
endif()
|
||||
message(STATUS "To specify a different C++ language level, set CMAKE_CXX_STANDARD")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED OFF) # can degrade to C++98 if compiler does not support C++11
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_CXX_EXTENSIONS)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) # use standards compliant language level for portability
|
||||
endif()
|
||||
|
|
37
vendor/git.apache.org/thrift.git/build/cmake/DefineOptions.cmake
generated
vendored
37
vendor/git.apache.org/thrift.git/build/cmake/DefineOptions.cmake
generated
vendored
|
@ -40,7 +40,17 @@ option(BUILD_LIBRARIES "Build Thrift libraries" ON)
|
|||
# and enables the library if all are found. This means the default is to build as
|
||||
# much as possible but leaving out libraries if their dependencies are not met.
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(WITH_BOOST_STATIC "Build with Boost static link library" OFF "NOT MSVC" ON)
|
||||
option(WITH_BOOST_FUNCTIONAL "Use boost/tr1/functional.hpp even under C++11 or later" OFF)
|
||||
if (WITH_BOOST_FUNCTIONAL)
|
||||
add_definitions(-DFORCE_BOOST_FUNCTIONAL)
|
||||
endif()
|
||||
|
||||
option(WITH_BOOST_SMART_PTR "Use boost/smart_ptr.hpp even under C++11 or later" OFF)
|
||||
if (WITH_BOOST_SMART_PTR)
|
||||
add_definitions(-DFORCE_BOOST_SMART_PTR)
|
||||
endif()
|
||||
|
||||
option(WITH_BOOST_STATIC "Build with Boost static link library" OFF)
|
||||
set(Boost_USE_STATIC_LIBS ${WITH_BOOST_STATIC})
|
||||
if (NOT WITH_BOOST_STATIC)
|
||||
add_definitions(-DBOOST_ALL_DYN_LINK)
|
||||
|
@ -84,7 +94,7 @@ if(WITH_CPP)
|
|||
endif()
|
||||
CMAKE_DEPENDENT_OPTION(BUILD_CPP "Build C++ library" ON
|
||||
"BUILD_LIBRARIES;WITH_CPP;Boost_FOUND" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(WITH_PLUGIN "Build compiler plugin support" ON
|
||||
CMAKE_DEPENDENT_OPTION(WITH_PLUGIN "Build compiler plugin support" OFF
|
||||
"BUILD_COMPILER;BUILD_CPP" OFF)
|
||||
|
||||
# C GLib
|
||||
|
@ -117,10 +127,10 @@ if(ANDROID)
|
|||
CMAKE_DEPENDENT_OPTION(BUILD_JAVA "Build Java library" ON
|
||||
"BUILD_LIBRARIES;WITH_JAVA;GRADLE_FOUND" OFF)
|
||||
else()
|
||||
find_package(Gradlew QUIET)
|
||||
find_package(Java QUIET)
|
||||
find_package(Ant QUIET)
|
||||
CMAKE_DEPENDENT_OPTION(BUILD_JAVA "Build Java library" ON
|
||||
"BUILD_LIBRARIES;WITH_JAVA;JAVA_FOUND;ANT_FOUND" OFF)
|
||||
"BUILD_LIBRARIES;WITH_JAVA;JAVA_FOUND;GRADLEW_FOUND" OFF)
|
||||
endif()
|
||||
|
||||
# Python
|
||||
|
@ -164,7 +174,6 @@ message(STATUS "Thrift package version: ${PACKAGE_VERSION}
|
|||
message(STATUS "Build configuration Summary")
|
||||
message(STATUS " Build Thrift compiler: ${BUILD_COMPILER}")
|
||||
message(STATUS " Build compiler plugin support: ${WITH_PLUGIN}")
|
||||
MESSAGE_DEP(PLUGIN_COMPILER_NOT_TOO_OLD "Disabled due to older compiler")
|
||||
message(STATUS " Build with unit tests: ${BUILD_TESTING}")
|
||||
MESSAGE_DEP(HAVE_COMPILER "Disabled because BUILD_THRIFT=OFF and no valid THRIFT_COMPILER is given")
|
||||
message(STATUS " Build examples: ${BUILD_EXAMPLES}")
|
||||
|
@ -174,6 +183,7 @@ message(STATUS " Language libraries:")
|
|||
message(STATUS " Build C++ library: ${BUILD_CPP}")
|
||||
MESSAGE_DEP(WITH_CPP "Disabled by WITH_CPP=OFF")
|
||||
MESSAGE_DEP(Boost_FOUND "Boost headers missing")
|
||||
message(STATUS " C++ Language Level: ${CXX_LANGUAGE_LEVEL}")
|
||||
message(STATUS " Build C (GLib) library: ${BUILD_C_GLIB}")
|
||||
MESSAGE_DEP(WITH_C_GLIB "Disabled by WITH_C_GLIB=OFF")
|
||||
MESSAGE_DEP(GLIB_FOUND "GLib missing")
|
||||
|
@ -183,7 +193,7 @@ if(ANDROID)
|
|||
MESSAGE_DEP(GRADLE_FOUND "Gradle missing")
|
||||
else()
|
||||
MESSAGE_DEP(JAVA_FOUND "Java Runtime missing")
|
||||
MESSAGE_DEP(ANT_FOUND "Ant missing")
|
||||
MESSAGE_DEP(GRADLEW_FOUND "Gradle Wrapper missing")
|
||||
endif()
|
||||
message(STATUS " Build Python library: ${BUILD_PYTHON}")
|
||||
MESSAGE_DEP(WITH_PYTHON "Disabled by WITH_PYTHON=OFF")
|
||||
|
@ -195,16 +205,15 @@ MESSAGE_DEP(CABAL_FOUND "Cabal missing")
|
|||
message(STATUS " Library features:")
|
||||
message(STATUS " Build shared libraries: ${WITH_SHARED_LIB}")
|
||||
message(STATUS " Build static libraries: ${WITH_STATIC_LIB}")
|
||||
message(STATUS " Build with ZLIB support: ${WITH_ZLIB}")
|
||||
message(STATUS " Build with Boost static link library: ${WITH_BOOST_STATIC}")
|
||||
message(STATUS " Build with Boost thread support: ${WITH_BOOSTTHREADS}")
|
||||
message(STATUS " Build with boost/tr1/functional (forced) ${WITH_BOOST_FUNCTIONAL}")
|
||||
message(STATUS " Build with boost/smart_ptr (forced) ${WITH_BOOST_SMART_PTR}")
|
||||
message(STATUS " Build with C++ std::thread support: ${WITH_STDTHREADS}")
|
||||
message(STATUS " Build with libevent support: ${WITH_LIBEVENT}")
|
||||
message(STATUS " Build with OpenSSL support: ${WITH_OPENSSL}")
|
||||
message(STATUS " Build with Qt4 support: ${WITH_QT4}")
|
||||
message(STATUS " Build with Qt5 support: ${WITH_QT5}")
|
||||
message(STATUS " Build with OpenSSL support: ${WITH_OPENSSL}")
|
||||
message(STATUS " Build with Boost thread support: ${WITH_BOOSTTHREADS}")
|
||||
message(STATUS " Build with C++ std::thread support: ${WITH_STDTHREADS}")
|
||||
message(STATUS " Build with Boost static link library: ${WITH_BOOST_STATIC}")
|
||||
if(MSVC)
|
||||
message(STATUS " - Enabled for Visual C++")
|
||||
endif()
|
||||
message(STATUS " Build with ZLIB support: ${WITH_ZLIB}")
|
||||
message(STATUS "----------------------------------------------------------")
|
||||
endmacro(PRINT_CONFIG_SUMMARY)
|
||||
|
|
56
vendor/git.apache.org/thrift.git/build/cmake/DefinePlatformSpecifc.cmake
generated
vendored
56
vendor/git.apache.org/thrift.git/build/cmake/DefinePlatformSpecifc.cmake
generated
vendored
|
@ -17,6 +17,8 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
# Uncomment this to show some basic cmake variables about platforms
|
||||
# include (NewPlatformDebug)
|
||||
|
||||
# Visual Studio specific options
|
||||
if(MSVC)
|
||||
|
@ -71,12 +73,25 @@ if(MSVC)
|
|||
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
|
||||
|
||||
# VS2010 does not provide inttypes which we need for "PRId64" used in many places
|
||||
find_package(Inttypes)
|
||||
if (Inttypes_FOUND)
|
||||
include_directories(${INTTYPES_INCLUDE_DIRS})
|
||||
# OpenSSL conflicts with the definition of PRId64 unless it is defined first
|
||||
add_definitions("/FIinttypes.h")
|
||||
endif ()
|
||||
elseif(UNIX)
|
||||
find_program( MEMORYCHECK_COMMAND valgrind )
|
||||
set( MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all --leak-check=full" )
|
||||
set( MEMORYCHECK_SUPPRESSIONS_FILE "${PROJECT_SOURCE_DIR}/test/valgrind.suppress" )
|
||||
endif()
|
||||
|
||||
add_definitions("-D__STDC_FORMAT_MACROS")
|
||||
add_definitions("-D__STDC_LIMIT_MACROS")
|
||||
|
||||
# WITH_*THREADS selects which threading library to use
|
||||
if(WITH_BOOSTTHREADS)
|
||||
add_definitions("-DUSE_BOOST_THREAD=1")
|
||||
|
@ -84,23 +99,34 @@ elseif(WITH_STDTHREADS)
|
|||
add_definitions("-DUSE_STD_THREAD=1")
|
||||
endif()
|
||||
|
||||
# GCC and Clang.
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# FIXME -pedantic can not be used at the moment because of: https://issues.apache.org/jira/browse/THRIFT-2784
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -Wall -Wextra -pedantic")
|
||||
# FIXME enabling c++11 breaks some Linux builds on Travis by triggering a g++ bug, see
|
||||
# https://travis-ci.org/apache/thrift/jobs/58017022
|
||||
# on the other hand, both MacOSX and FreeBSD need c++11
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -Wall -Wextra")
|
||||
# C++ Language Level
|
||||
set(CXX_LANGUAGE_LEVEL "C++${CMAKE_CXX_STANDARD}")
|
||||
if (CMAKE_CXX_STANDARD_REQUIRED)
|
||||
string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [compiler must support it]")
|
||||
else()
|
||||
string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [fallback to earlier if compiler does not support it]")
|
||||
endif()
|
||||
if (CMAKE_CXX_EXTENSIONS)
|
||||
string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [with compiler-specific extensions]")
|
||||
else()
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros -Wno-long-long")
|
||||
endif()
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-long-long")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If gcc older than 4.8 is detected, disable new compiler plug-in support (see THRIFT-3937)
|
||||
set(PLUGIN_COMPILER_NOT_TOO_OLD ON) # simplifies messaging in DefineOptions summary
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" AND WITH_PLUGIN)
|
||||
message(STATUS "Disabling compiler plug-in support to work with older gcc compiler")
|
||||
set(WITH_PLUGIN OFF)
|
||||
set(PLUGIN_COMPILER_NOT_TOO_OLD OFF)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
|
||||
endif()
|
||||
|
||||
# Building WITH_PLUGIN requires boost memory operations, for now, and gcc >= 4.8
|
||||
if (WITH_PLUGIN)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8")
|
||||
message(SEND_ERROR "Thrift compiler plug-in support is not possible with older gcc ( < 4.8 ) compiler")
|
||||
endif()
|
||||
message(STATUS "Forcing use of boost::smart_ptr to build WITH_PLUGIN")
|
||||
add_definitions("-DFORCE_BOOST_SMART_PTR=1")
|
||||
endif()
|
||||
|
||||
|
|
36
vendor/git.apache.org/thrift.git/build/cmake/FindGradlew.cmake
generated
vendored
Normal file
36
vendor/git.apache.org/thrift.git/build/cmake/FindGradlew.cmake
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
|
||||
# GRADLEW_FOUND - system has Gradlew
|
||||
# GRADLEW_EXECUTABLE - the Gradlew executable
|
||||
#
|
||||
# It will search the location CMAKE_SOURCE_DIR/lib/java
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_program(GRADLEW_EXECUTABLE gradlew PATHS ${CMAKE_SOURCE_DIR}/lib/java NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
|
||||
find_package_handle_standard_args(Gradlew DEFAULT_MSG GRADLEW_EXECUTABLE)
|
||||
mark_as_advanced(GRADLEW_EXECUTABLE)
|
||||
|
||||
# Buggy find_program cannot find gradlew.bat when gradlew is at the same path
|
||||
# and even buggier ctest will not execute gradlew.bat when gradlew is given.
|
||||
if(CMAKE_HOST_WIN32)
|
||||
string(REGEX REPLACE "(.+gradlew)$" "\\1.bat" GRADLEW_EXECUTABLE ${GRADLEW_EXECUTABLE})
|
||||
endif(CMAKE_HOST_WIN32)
|
41
vendor/git.apache.org/thrift.git/build/cmake/FindInttypes.cmake
generated
vendored
Normal file
41
vendor/git.apache.org/thrift.git/build/cmake/FindInttypes.cmake
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# find msinttypes on compilers that don't provide it, for example
|
||||
# VS2010
|
||||
|
||||
# Usage:
|
||||
# Provide INTTYPES_ROOT if you need it
|
||||
# Result: INTTYPES_INCLUDE_DIRS, where to find inttypes.h
|
||||
# Result: Inttypes_FOUND, If false, inttypes.h was not found
|
||||
|
||||
find_path(INTTYPES_INCLUDE_DIRS inttypes.h HINTS ${INTTYPES_ROOT})
|
||||
if (INTTYPES_INCLUDE_DIRS)
|
||||
set(Inttypes_FOUND TRUE)
|
||||
else ()
|
||||
set(Inttypes_FOUND FALSE)
|
||||
if (Inttypes_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find inttypes.h")
|
||||
endif ()
|
||||
message(STATUS "inttypes.h NOT found")
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(
|
||||
INTTYPES_INCLUDE_DIRS
|
||||
)
|
10
vendor/git.apache.org/thrift.git/build/cmake/FindLibevent.cmake
generated
vendored
10
vendor/git.apache.org/thrift.git/build/cmake/FindLibevent.cmake
generated
vendored
|
@ -13,9 +13,13 @@ foreach(prefix ${LibEvent_EXTRA_PREFIXES})
|
|||
list(APPEND LibEvent_LIBRARIES_PATHS "${prefix}/lib")
|
||||
endforeach()
|
||||
|
||||
find_path(LIBEVENT_INCLUDE_DIRS event.h PATHS ${LibEvent_INCLUDE_PATHS})
|
||||
# "lib" prefix is needed on Windows
|
||||
find_library(LIBEVENT_LIBRARIES NAMES event libevent PATHS ${LibEvent_LIBRARIES_PATHS})
|
||||
# Looking for "event.h" will find the Platform SDK include dir on windows
|
||||
# so we also look for a peer header like evhttp.h to get the right path
|
||||
find_path(LIBEVENT_INCLUDE_DIRS evhttp.h event.h PATHS ${LibEvent_INCLUDE_PATHS})
|
||||
|
||||
# "lib" prefix is needed on Windows in some cases
|
||||
# newer versions of libevent use three libraries
|
||||
find_library(LIBEVENT_LIBRARIES NAMES event event_core event_extra libevent PATHS ${LibEvent_LIBRARIES_PATHS})
|
||||
|
||||
if (LIBEVENT_LIBRARIES AND LIBEVENT_INCLUDE_DIRS)
|
||||
set(Libevent_FOUND TRUE)
|
||||
|
|
44
vendor/git.apache.org/thrift.git/build/cmake/NewPlatformDebug.cmake
generated
vendored
Normal file
44
vendor/git.apache.org/thrift.git/build/cmake/NewPlatformDebug.cmake
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
#
|
||||
# For debugging new platforms, just to see what some environment flags are...
|
||||
#
|
||||
macro(SHOWFLAG flag)
|
||||
message(STATUS "${flag} = ${${flag}}")
|
||||
endmacro(SHOWFLAG)
|
||||
|
||||
set(NEWPLATFORMDEBUG ON)
|
||||
|
||||
if(NEWPLATFORMDEBUG)
|
||||
SHOWFLAG("APPLE")
|
||||
SHOWFLAG("BORLAND")
|
||||
SHOWFLAG("CMAKE_C_COMPILER_ID")
|
||||
SHOWFLAG("CMAKE_CXX_COMPILER_ID")
|
||||
SHOWFLAG("CMAKE_COMPILER_IS_GNUCC")
|
||||
SHOWFLAG("CMAKE_COMPILER_IS_GNUCXX")
|
||||
SHOWFLAG("CYGWIN")
|
||||
SHOWFLAG("MINGW")
|
||||
SHOWFLAG("MSVC")
|
||||
SHOWFLAG("MSVC_VERSION")
|
||||
SHOWFLAG("MSYS")
|
||||
SHOWFLAG("UNIX")
|
||||
SHOWFLAG("WATCOM")
|
||||
SHOWFLAG("WIN32")
|
||||
endif(NEWPLATFORMDEBUG)
|
63
vendor/git.apache.org/thrift.git/build/cmake/README-MSYS2.md
generated
vendored
Normal file
63
vendor/git.apache.org/thrift.git/build/cmake/README-MSYS2.md
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
<!---
|
||||
Licensed 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.
|
||||
-->
|
||||
|
||||
# Building thrift on Windows (MinGW64/MSYS2)
|
||||
|
||||
Thrift uses cmake to make it easier to build the project on multiple platforms, however to build a fully functional and production ready thrift on Windows requires a number of third party libraries to be obtained. Once third party libraries are ready, the right combination of options must be passed to cmake in order to generate the correct environment.
|
||||
|
||||
> Note: libevent and libevent-devel do not work with this toolchain as they do not properly detect mingw64 and expect some headers to exist that do not, so the non-blocking server is not currently built into this solution.
|
||||
|
||||
## MSYS2
|
||||
|
||||
Download and fully upgrade msys2 following the instructions at:
|
||||
|
||||
https://msys2.github.io/
|
||||
|
||||
Install the necessary toolchain items for C++:
|
||||
|
||||
$ pacman --needed -S bison flex make mingw-w64-x86_64-openssl \
|
||||
mingw-w64-x86_64-boost mingw-w64-x86_64-cmake \
|
||||
mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib
|
||||
|
||||
Update your msys2 bash path to include /mingw64/bin by adding a line to your ~/.bash_profiles using this command:
|
||||
|
||||
echo "export PATH=/mingw64/bin:\$PATH" >> ~/.bash_profile
|
||||
|
||||
After that, close your shell and open a new one.
|
||||
|
||||
Use cmake to create a MinGW makefile, out of tree (assumes you are in the top level of the thrift source tree):
|
||||
|
||||
mkdir ../thrift-build
|
||||
cd ../thrift-build
|
||||
cmake -G"MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=/mingw64/bin/mingw32-make \
|
||||
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc.exe \
|
||||
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++.exe \
|
||||
-DWITH_BOOSTTHREADS=ON -DWITH_LIBEVENT=OFF \
|
||||
-DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON \
|
||||
-DWITH_JAVA=OFF -DWITH_PYTHON=OFF -DWITH_PERL=OFF \
|
||||
../thrift
|
||||
|
||||
Build thrift (inside thrift-build):
|
||||
|
||||
cmake --build .
|
||||
|
||||
Run the tests (inside thrift-build):
|
||||
|
||||
ctest
|
||||
|
||||
> If you run into issues, check Apache Jira THRIFT-4046 for patches relating to MinGW64/MSYS2 builds.
|
||||
|
||||
## Tested With
|
||||
|
||||
msys2 64-bit 2016-10-26 distribution
|
18
vendor/git.apache.org/thrift.git/build/cmake/config.h.in
generated
vendored
18
vendor/git.apache.org/thrift.git/build/cmake/config.h.in
generated
vendored
|
@ -44,9 +44,6 @@
|
|||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "${PACKAGE_STRING}"
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "${VERSION}"
|
||||
|
||||
/************************** DEFINES *************************/
|
||||
|
||||
/* Define if the AI_ADDRCONFIG symbol is unavailable */
|
||||
|
@ -94,6 +91,9 @@
|
|||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#cmakedefine HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#cmakedefine HAVE_SIGNAL_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
|
||||
|
@ -103,8 +103,8 @@
|
|||
/* Define to 1 if you have the <pthread.h> header file. */
|
||||
#cmakedefine HAVE_PTHREAD_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TIME_H 1
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#cmakedefine HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#cmakedefine HAVE_SYS_PARAM_H 1
|
||||
|
@ -121,12 +121,18 @@
|
|||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
#cmakedefine HAVE_SYS_UN_H 1
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#cmakedefine HAVE_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#cmakedefine HAVE_SYS_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#cmakedefine HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sched.h> header file. */
|
||||
#cmakedefine HAVE_SCHED_H 1
|
||||
|
||||
|
@ -154,4 +160,4 @@
|
|||
/* Define to 1 if strerror_r returns char *. */
|
||||
#cmakedefine STRERROR_R_CHAR_P 1
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
201
vendor/git.apache.org/thrift.git/build/docker/README.md
generated
vendored
201
vendor/git.apache.org/thrift.git/build/docker/README.md
generated
vendored
|
@ -1,27 +1,198 @@
|
|||
# Apache Thrift Docker containers
|
||||
A set of docker containers used to build and test Apache Thrift
|
||||
# Docker Integration #
|
||||
|
||||
### Available Containers
|
||||
Due to the large number of languages supported by Apache Thrift,
|
||||
docker containers are used to build and test the project on a
|
||||
variety of platforms to provide maximum test coverage.
|
||||
|
||||
* Ubuntu - based on ubuntu:trusty (14.04)
|
||||
* Centos - based on centos:6.6
|
||||
## Appveyor Integration ##
|
||||
|
||||
## Dependencies
|
||||
At this time the Appveyor scripts do not use docker containers.
|
||||
Once Microsoft supports Visual Studio Build Tools running inside
|
||||
nano containers (instead of Core, which is huge) then we will
|
||||
consider using containers for the Windows builds as well.
|
||||
|
||||
* A working Docker environment. A Vagrantfile is provided which will setup an Ubuntu host and working Docker environment as well as build the Apache Thrift Docker container for testing and development
|
||||
## Travis CI Integration ##
|
||||
|
||||
## Usage
|
||||
From the Apache Thrift code base root
|
||||
The Travis CI scripts use the following environment variables and
|
||||
logic to determine their behavior:
|
||||
|
||||
* Build
|
||||
### Environment Variables ###
|
||||
|
||||
docker build -t thrift build/docker/ubuntu
|
||||
| Variable | Default | Usage |
|
||||
| -------- | ----- | ------- |
|
||||
| `DISTRO` | `ubuntu-bionic` | Set by various build jobs in `.travis.yml` to run builds in different containers. Not intended to be set externally.|
|
||||
| `DOCKER_REPO` | `thrift/thrift-build` | The name of the Docker Hub repository to obtain and store docker images. |
|
||||
| `DOCKER_USER` | `<none>` | The Docker Hub account name containing the repository. |
|
||||
| `DOCKER_PASS` | `<none>` | The Docker Hub account password to use when pushing new tags. |
|
||||
|
||||
or
|
||||
For example, the default docker image that is used in builds if no overrides are specified would be: `thrift/thrift-build:ubuntu-bionic`
|
||||
|
||||
docker build -t thrift build/docker/centos
|
||||
### Forks ###
|
||||
|
||||
* Run
|
||||
If you have forked the Apache Thrift repository and you would like
|
||||
to use your own Docker Hub account to store thrift build images,
|
||||
you can use the Travis CI web interface to set the `DOCKER_USER`,
|
||||
`DOCKER_PASS`, and `DOCKER_REPO` variables in a secure manner.
|
||||
Your fork builds will then pull, push, and tag the docker images
|
||||
in your account.
|
||||
|
||||
docker run -v $(pwd):/thrift/src -it thrift /bin/bash
|
||||
### Logic ###
|
||||
|
||||
The Travis CI build runs in two phases - first the docker images are rebuilt
|
||||
for each of the supported containers if they do not match the Dockerfile that
|
||||
was used to build the most recent tag. If a `DOCKER_PASS` environment
|
||||
variable is specified, the docker stage builds will attempt to log into
|
||||
Docker Hub and push the resulting tags.
|
||||
|
||||
## Supported Containers ##
|
||||
|
||||
The Travis CI (continuous integration) builds use the Ubuntu Bionic
|
||||
(18.04 LTS) and Xenial (16.04 LTS) images to maximize language level
|
||||
coverage.
|
||||
|
||||
### Ubuntu ###
|
||||
|
||||
* bionic (stable, current)
|
||||
* artful (previous stable)
|
||||
* xenial (legacy)
|
||||
|
||||
## Unsupported Containers ##
|
||||
|
||||
These containers may be in various states, and may not build everything.
|
||||
They can be found in the `old/` subdirectory.
|
||||
|
||||
### CentOS ###
|
||||
* 7.3
|
||||
* make check in lib/py may hang in test_sslsocket - root cause unknown
|
||||
|
||||
### Debian ###
|
||||
|
||||
* jessie
|
||||
* stretch
|
||||
* make check in lib/cpp fails due to https://svn.boost.org/trac10/ticket/12507
|
||||
|
||||
## Building like Travis CI does, locally ##
|
||||
|
||||
We recommend you build locally the same way Travis CI does, so that when you
|
||||
submit your pull request you will run into fewer surprises. To make it a
|
||||
little easier, put the following into your `~/.bash_aliases` file:
|
||||
|
||||
# Kill all running containers.
|
||||
alias dockerkillall='docker kill $(docker ps -q)'
|
||||
|
||||
# Delete all stopped containers.
|
||||
alias dockercleanc='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'
|
||||
|
||||
# Delete all untagged images.
|
||||
alias dockercleani='printf "\n>>> Deleting untagged images\n\n" && docker rmi $(docker images -q -f dangling=true)'
|
||||
|
||||
# Delete all stopped containers and untagged images.
|
||||
alias dockerclean='dockercleanc || true && dockercleani'
|
||||
|
||||
# Build a thrift docker image (run from top level of git repo): argument #1 is image type (ubuntu, centos, etc).
|
||||
function dockerbuild
|
||||
{
|
||||
docker build -t $1 build/docker/$1
|
||||
}
|
||||
|
||||
# Run a thrift docker image: argument #1 is image type (ubuntu, centos, etc).
|
||||
function dockerrun
|
||||
{
|
||||
docker run -v $(pwd):/thrift/src -it $1 /bin/bash
|
||||
}
|
||||
|
||||
Then, to pull down the current image being used to build (the same way
|
||||
Travis CI does it) - if it is out of date in any way it will build a
|
||||
new one for you:
|
||||
|
||||
thrift$ DOCKER_REPO=thrift/thrift-build DISTRO=ubuntu-bionic build/docker/refresh.sh
|
||||
|
||||
To run all unit tests (just like Travis CI does):
|
||||
|
||||
thrift$ dockerrun ubuntu-bionic
|
||||
root@8caf56b0ce7b:/thrift/src# build/docker/scripts/autotools.sh
|
||||
|
||||
To run the cross tests (just like Travis CI does):
|
||||
|
||||
thrift$ dockerrun ubuntu-bionic
|
||||
root@8caf56b0ce7b:/thrift/src# build/docker/scripts/cross-test.sh
|
||||
|
||||
When you are done, you want to clean up occasionally so that docker isn't using lots of extra disk space:
|
||||
|
||||
thrift$ dockerclean
|
||||
|
||||
You need to run the docker commands from the root of the local clone of the
|
||||
thrift git repository for them to work.
|
||||
|
||||
When you are done in the root docker shell you can `exit` to go back to
|
||||
your user host shell. Once the unit tests and cross test passes locally,
|
||||
submit the changes, and if desired squash the pull request to one commit
|
||||
to make it easier to merge (the committers can squash at commit time now
|
||||
that GitHub is the master repository). Now you are building like Travis CI does!
|
||||
|
||||
## Raw Commands for Building with Docker ##
|
||||
|
||||
If you do not want to use the same scripts Travis CI does, you can do it manually:
|
||||
|
||||
Build the image:
|
||||
|
||||
thrift$ docker build -t thrift build/docker/ubuntu-bionic
|
||||
|
||||
Open a command prompt in the image:
|
||||
|
||||
thrift$ docker run -v $(pwd):/thrift/src -it thrift /bin/bash
|
||||
|
||||
## Core Tool Versions per Dockerfile ##
|
||||
|
||||
Last updated: October 1, 2017
|
||||
|
||||
| Tool | ubuntu-xenial | ubuntu-bionic | Notes |
|
||||
| :-------- | :------------ | :------------ | :---- |
|
||||
| ant | 1.9.6 | 1.10.3 | |
|
||||
| autoconf | 2.69 | 2.69 | |
|
||||
| automake | 1.15 | 1.15.1 | |
|
||||
| bison | 3.0.4 | 3.0.4 | |
|
||||
| boost | 1.58.0 | 1.65.1 | |
|
||||
| cmake | 3.5.1 | 3.10.2 | |
|
||||
| cppcheck | 1.72 | 1.82 | |
|
||||
| flex | 2.6.0 | 2.6.4 | |
|
||||
| libc6 | 2.23 | 2.27 | glibc |
|
||||
| libevent | 2.0.21 | 2.1.8 | |
|
||||
| libstdc++ | 5.4.0 | 7.3.0 | |
|
||||
| make | 4.1 | 4.1 | |
|
||||
| openssl | 1.0.2g | 1.1.0g | |
|
||||
| qt5 | 5.5.1 | 5.9.5 | |
|
||||
|
||||
## Compiler/Language Versions per Dockerfile ##
|
||||
|
||||
| Language | ubuntu-xenial | ubuntu-bionic | Notes |
|
||||
| :-------- | :------------ | :------------ | :---- |
|
||||
| as of | Mar 06, 2018 | Jul 6, 2018 | |
|
||||
| as3 | | | Not in CI |
|
||||
| C++ gcc | 5.4.0 | 7.3.0 | |
|
||||
| C++ clang | 3.8 | 6.0 | |
|
||||
| C# (mono) | 4.2.1.0 | 4.6.2.7 | |
|
||||
| c_glib | 2.48.2 | 2.56.0 | |
|
||||
| cl (sbcl) | | 1.4.9 | |
|
||||
| cocoa | | | Not in CI |
|
||||
| d | 2.075.1 | 2.081.0 | |
|
||||
| dart | 1.22.1 | 1.24.3 | |
|
||||
| delphi | | | Not in CI |
|
||||
| dotnet | 2.1.4 | 2.1.301 | |
|
||||
| erlang | 18.3 | 20.2.2 | |
|
||||
| go | 1.7.6 | 1.10.3 | |
|
||||
| haskell | 7.10.3 | 8.0.2 | |
|
||||
| haxe | 3.2.1 | 3.4.4 | THRIFT-4352: avoid 3.4.2 |
|
||||
| java | 1.8.0_151 | 1.8.0_171 | |
|
||||
| js | | | Unsure how to look for version info? |
|
||||
| lua | 5.2.4 | 5.2.4 | Lua 5.3: see THRIFT-4386 |
|
||||
| nodejs | 6.13.0 | 8.11.3 | |
|
||||
| ocaml | | 4.05.0 | THRIFT-4517: ocaml 4.02.3 on xenial appears broken |
|
||||
| perl | 5.22.1 | 5.26.1 | |
|
||||
| php | 7.0.22 | 7.2.5 | |
|
||||
| python | 2.7.12 | 2.7.15rc1 | |
|
||||
| python3 | 3.5.2 | 3.6.5 | |
|
||||
| ruby | 2.3.1p112 | 2.5.1p57 | |
|
||||
| rust | 1.17.0 | 1.24.1 | |
|
||||
| smalltalk | | | Not in CI |
|
||||
| swift | | | Not in CI |
|
||||
|
|
142
vendor/git.apache.org/thrift.git/build/docker/centos/Dockerfile
generated
vendored
142
vendor/git.apache.org/thrift.git/build/docker/centos/Dockerfile
generated
vendored
|
@ -1,142 +0,0 @@
|
|||
# Licensed 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.
|
||||
|
||||
# Apache Thrift Docker build environment for Centos
|
||||
#
|
||||
# Known missing client libraries:
|
||||
# - D
|
||||
# - Haxe
|
||||
# - Lua
|
||||
#
|
||||
|
||||
FROM centos:7
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
|
||||
RUN yum install -y epel-release
|
||||
|
||||
# General dependencies
|
||||
RUN yum install -y \
|
||||
tar \
|
||||
m4 \
|
||||
perl \
|
||||
clang \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
git \
|
||||
libtool \
|
||||
autoconf \
|
||||
make \
|
||||
bison \
|
||||
bison-devel \
|
||||
flex
|
||||
|
||||
# C++ dependencies
|
||||
RUN yum install -y \
|
||||
boost-devel-static \
|
||||
zlib-devel \
|
||||
openssl-devel \
|
||||
libevent-devel
|
||||
|
||||
# Java Dependencies
|
||||
RUN yum install -y \
|
||||
ant \
|
||||
junit \
|
||||
ant-junit \
|
||||
java-1.7.0-openjdk-devel
|
||||
|
||||
# Python Dependencies
|
||||
RUN yum install -y \
|
||||
python-devel \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python-six \
|
||||
python-twisted-web && \
|
||||
pip install -U backports.ssl_match_hostname ipaddress tornado
|
||||
|
||||
# Ruby Dependencies
|
||||
RUN yum install -y \
|
||||
ruby \
|
||||
ruby-devel \
|
||||
rubygems && \
|
||||
gem install bundler rake
|
||||
|
||||
# Perl Dependencies
|
||||
RUN yum install -y \
|
||||
perl-Bit-Vector \
|
||||
perl-Class-Accessor \
|
||||
perl-ExtUtils-MakeMaker \
|
||||
perl-Test-Simple \
|
||||
perl-IO-Socket-SSL \
|
||||
perl-Net-SSLeay \
|
||||
perl-Crypt-SSLeay
|
||||
|
||||
# PHP Dependencies
|
||||
RUN yum install -y \
|
||||
php \
|
||||
php-devel \
|
||||
php-pear \
|
||||
re2c \
|
||||
php-phpunit-PHPUnit \
|
||||
bzip2
|
||||
|
||||
# GLibC Dependencies
|
||||
RUN yum install -y glib2-devel
|
||||
|
||||
# Erlang Dependencies
|
||||
RUN curl -sSL http://packages.erlang-solutions.com/rpm/centos/erlang_solutions.repo -o /etc/yum.repos.d/erlang_solutions.repo && \
|
||||
yum install -y \
|
||||
erlang-kernel \
|
||||
erlang-erts \
|
||||
erlang-stdlib \
|
||||
erlang-eunit \
|
||||
erlang-rebar \
|
||||
erlang-tools
|
||||
|
||||
# Go Dependencies
|
||||
RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
|
||||
ENV PATH /usr/local/go/bin:$PATH
|
||||
|
||||
# Haskell Dependencies
|
||||
RUN yum -y install haskell-platform
|
||||
|
||||
# Node.js Dependencies
|
||||
RUN yum install -y \
|
||||
nodejs \
|
||||
nodejs-devel \
|
||||
npm
|
||||
|
||||
# C# Dependencies
|
||||
RUN yum install -y \
|
||||
mono-core \
|
||||
mono-devel \
|
||||
mono-web-devel \
|
||||
mono-extras \
|
||||
|
||||
# MinGW Dependencies
|
||||
RUN yum install -y \
|
||||
mingw32-binutils \
|
||||
mingw32-crt \
|
||||
mingw32-nsis
|
||||
|
||||
# CMake
|
||||
RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.0.tar.gz | tar -xz && \
|
||||
cd cmake-3.4.0 && ./bootstrap && make -j4 && make install && \
|
||||
cd .. && rm -rf cmake-3.4.0
|
||||
|
||||
# Clean up
|
||||
RUN rm -rf /tmp/* && \
|
||||
yum clean all
|
||||
|
||||
ENV THRIFT_ROOT /thrift
|
||||
RUN mkdir -p $THRIFT_ROOT/src
|
||||
COPY Dockerfile $THRIFT_ROOT/
|
||||
WORKDIR $THRIFT_ROOT/src
|
54
vendor/git.apache.org/thrift.git/build/docker/centos6/Dockerfile
generated
vendored
54
vendor/git.apache.org/thrift.git/build/docker/centos6/Dockerfile
generated
vendored
|
@ -1,54 +0,0 @@
|
|||
# Licensed 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.
|
||||
|
||||
# Apache Thrift Docker build environment for Centos 6
|
||||
#
|
||||
# This file is intended for testing old packages that are not available for
|
||||
# latest Ubuntu LTS/Debian/CentOS. Currently, it is only used for Python 2.6.
|
||||
#
|
||||
|
||||
FROM centos:6
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
|
||||
RUN yum install -y epel-release && \
|
||||
yum install -y \
|
||||
autoconf \
|
||||
bison \
|
||||
bison-devel \
|
||||
clang \
|
||||
flex \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
git \
|
||||
libtool \
|
||||
m4 \
|
||||
make \
|
||||
perl \
|
||||
tar \
|
||||
python-devel \
|
||||
python-setuptools \
|
||||
python-twisted-web \
|
||||
python-pip \
|
||||
&& yum clean all
|
||||
|
||||
# optional dependencies
|
||||
RUN pip install ipaddress backports.ssl_match_hostname tornado
|
||||
|
||||
# CMake
|
||||
RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \
|
||||
cd cmake-3.4.1 && ./bootstrap && make -j4 && make install && \
|
||||
cd .. && rm -rf cmake-3.4.1
|
||||
|
||||
ENV THRIFT_ROOT /thrift
|
||||
RUN mkdir -p $THRIFT_ROOT/src
|
||||
COPY Dockerfile $THRIFT_ROOT/
|
||||
WORKDIR $THRIFT_ROOT/src
|
199
vendor/git.apache.org/thrift.git/build/docker/old/centos-7.3/Dockerfile
generated
vendored
Normal file
199
vendor/git.apache.org/thrift.git/build/docker/old/centos-7.3/Dockerfile
generated
vendored
Normal file
|
@ -0,0 +1,199 @@
|
|||
# Licensed 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.
|
||||
|
||||
# Apache Thrift Docker build environment for CentOS
|
||||
#
|
||||
# Known missing client libraries:
|
||||
# - dotnet (will update to 2.0.0 separately)
|
||||
# - haxe (not in centos)
|
||||
|
||||
FROM centos:7.3.1611
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
|
||||
RUN yum install -y epel-release
|
||||
|
||||
# General dependencies
|
||||
RUN yum install -y \
|
||||
autoconf \
|
||||
bison \
|
||||
bison-devel \
|
||||
clang \
|
||||
clang-analyzer \
|
||||
cmake3 \
|
||||
curl \
|
||||
flex \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gdb \
|
||||
git \
|
||||
libtool \
|
||||
m4 \
|
||||
make \
|
||||
tar \
|
||||
unzip \
|
||||
valgrind \
|
||||
wget && \
|
||||
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
|
||||
ln -s /usr/bin/cpack3 /usr/bin/cpack && \
|
||||
ln -s /usr/bin/ctest3 /usr/bin/ctest
|
||||
|
||||
# C++ dependencies
|
||||
RUN yum install -y \
|
||||
boost-devel-static \
|
||||
zlib-devel \
|
||||
openssl-devel \
|
||||
libevent-devel && \
|
||||
cd /usr/lib64 && \
|
||||
ln -s libboost_thread-mt.a libboost_thread.a
|
||||
|
||||
# C# Dependencies
|
||||
RUN yum install -y \
|
||||
mono-core \
|
||||
mono-devel \
|
||||
mono-web-devel \
|
||||
mono-extras
|
||||
|
||||
# D Dependencies
|
||||
RUN yum install -y http://downloads.dlang.org/releases/2.x/2.076.0/dmd-2.076.0-0.fedora.x86_64.rpm xdg-utils
|
||||
RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
|
||||
curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
|
||||
mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
|
||||
mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf libevent-master openssl-master
|
||||
|
||||
# Dart
|
||||
RUN cd /usr/local && \
|
||||
wget -q https://storage.googleapis.com/dart-archive/channels/stable/release/1.24.2/sdk/dartsdk-linux-x64-release.zip && \
|
||||
unzip -q dartsdk-linux-x64-release.zip && \
|
||||
rm dartsdk-linux-x64-release.zip
|
||||
ENV PATH /usr/local/dart-sdk/bin:$PATH
|
||||
|
||||
# Erlang Dependencies
|
||||
RUN curl -sSL http://packages.erlang-solutions.com/rpm/centos/erlang_solutions.repo -o /etc/yum.repos.d/erlang_solutions.repo && \
|
||||
yum install -y \
|
||||
erlang-kernel \
|
||||
erlang-erts \
|
||||
erlang-stdlib \
|
||||
erlang-eunit \
|
||||
erlang-rebar \
|
||||
erlang-tools
|
||||
|
||||
# GLibC Dependencies
|
||||
RUN yum install -y glib2-devel
|
||||
|
||||
# Go Dependencies
|
||||
RUN curl -sSL https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz | tar -C /usr/local/ -xz
|
||||
ENV PATH /usr/local/go/bin:$PATH
|
||||
|
||||
# Haskell Dependencies
|
||||
RUN yum -y install haskell-platform
|
||||
|
||||
# Haxe Dependencies
|
||||
# Not in debian/stretch
|
||||
|
||||
# Java Dependencies
|
||||
RUN yum install -y \
|
||||
ant \
|
||||
junit \
|
||||
ant-junit \
|
||||
java-1.8.0-openjdk-devel
|
||||
|
||||
# Lua Dependencies
|
||||
# Lua in epel is too old (5.1.4, need 5.2) so we get the latest
|
||||
RUN yum install -y readline-devel && \
|
||||
wget -q http://www.lua.org/ftp/lua-5.3.4.tar.gz && \
|
||||
tar xzf lua-5.3.4.tar.gz && \
|
||||
cd lua-5.3.4 && \
|
||||
sed -i 's/CFLAGS= /CFLAGS= -fPIC /g' src/Makefile && \
|
||||
make linux && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -rf lua-5*
|
||||
|
||||
# MinGW Dependencies
|
||||
RUN yum install -y \
|
||||
mingw32-binutils \
|
||||
mingw32-crt \
|
||||
mingw32-nsis
|
||||
|
||||
# Node.js Dependencies
|
||||
# Work around epel issue where they removed http-parser that nodejs depends on!
|
||||
RUN yum -y install https://opensource.enda.eu/packages/http-parser-2.7.1-3.el7.x86_64.rpm
|
||||
RUN yum install -y \
|
||||
nodejs \
|
||||
npm
|
||||
|
||||
# Ocaml Dependencies
|
||||
RUN yum install -y \
|
||||
ocaml \
|
||||
ocaml-ocamldoc && \
|
||||
wget -q https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin && \
|
||||
opam init --yes && \
|
||||
opam install --yes oasis && \
|
||||
echo '. /root/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true' >> ~/.bashrc
|
||||
|
||||
# Perl Dependencies
|
||||
RUN yum install -y \
|
||||
perl \
|
||||
perl-version \
|
||||
perl-Bit-Vector \
|
||||
perl-Class-Accessor \
|
||||
perl-ExtUtils-MakeMaker \
|
||||
perl-Test-Simple \
|
||||
perl-IO-Socket-SSL \
|
||||
perl-Net-SSLeay \
|
||||
perl-Crypt-SSLeay
|
||||
|
||||
# PHP Dependencies
|
||||
RUN yum install -y \
|
||||
php \
|
||||
php-devel \
|
||||
php-pear \
|
||||
re2c \
|
||||
php-phpunit-PHPUnit \
|
||||
bzip2
|
||||
|
||||
# Python Dependencies
|
||||
RUN yum install -y \
|
||||
python \
|
||||
python-devel \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python34 \
|
||||
python34-devel \
|
||||
python34-pip \
|
||||
python34-setuptools
|
||||
RUN pip2 install --upgrade pip
|
||||
RUN pip2 install --upgrade backports.ssl_match_hostname ipaddress setuptools six tornado tornado-testing twisted virtualenv zope-interface
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN pip3 install --upgrade backports.ssl_match_hostname ipaddress setuptools six tornado tornado-testing twisted virtualenv zope-interface
|
||||
|
||||
# Ruby Dependencies
|
||||
RUN yum install -y \
|
||||
ruby \
|
||||
ruby-devel \
|
||||
rubygems && \
|
||||
gem install bundler rake
|
||||
|
||||
# Rust
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.17.0
|
||||
ENV PATH /root/.cargo/bin:$PATH
|
||||
|
||||
# Clean up
|
||||
RUN rm -rf /tmp/* && \
|
||||
yum clean all
|
||||
|
||||
ENV THRIFT_ROOT /thrift
|
||||
RUN mkdir -p $THRIFT_ROOT/src
|
||||
COPY Dockerfile $THRIFT_ROOT/
|
||||
WORKDIR $THRIFT_ROOT/src
|
|
@ -10,10 +10,11 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Apache Thrift Docker build environment for Centos
|
||||
# Apache Thrift Docker build environment for Debian
|
||||
#
|
||||
# Known missing client libraries:
|
||||
# - None
|
||||
# - dotnetcore
|
||||
# - rust
|
||||
|
||||
FROM buildpack-deps:jessie-scm
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
|
@ -21,6 +22,9 @@ MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
|||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Add apt sources
|
||||
# jessie-backports for cmake and some ruby bits
|
||||
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
|
||||
|
||||
# Dart
|
||||
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
|
||||
|
@ -31,12 +35,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
bison \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
debhelper \
|
||||
flex \
|
||||
pkg-config
|
||||
pkg-config && \
|
||||
apt-get -t jessie-backports install -y --no-install-recommends cmake
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# C++ dependencies` \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
|
@ -50,14 +54,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
qtbase5-dev \
|
||||
qtbase5-dev-tools
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Java dependencies` \
|
||||
ant \
|
||||
ant-optional \
|
||||
openjdk-7-jdk \
|
||||
maven
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Python dependencies` \
|
||||
python-all \
|
||||
python-all-dbg \
|
||||
|
@ -72,11 +76,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
python3-setuptools \
|
||||
python3-pip
|
||||
|
||||
RUN echo 'deb http://deb.debian.org/debian jessie-backports main' >> /etc/apt/sources.list \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Ruby dependencies` \
|
||||
ruby \
|
||||
ruby-bundler \
|
||||
ruby-dev \
|
||||
`# Perl dependencies` \
|
||||
libbit-vector-perl \
|
||||
|
@ -85,7 +87,8 @@ RUN echo 'deb http://deb.debian.org/debian jessie-backports main' >> /etc/apt/so
|
|||
libio-socket-ssl-perl \
|
||||
libnet-ssleay-perl
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN apt-get -t jessie-backports install -y ruby-bundler
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Php dependencies` \
|
||||
php5 \
|
||||
php5-dev \
|
||||
|
@ -157,7 +160,7 @@ ENV PATH /usr/local/go/bin:$PATH
|
|||
|
||||
# Haxe
|
||||
RUN mkdir -p /usr/lib/haxe && \
|
||||
curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz | \
|
||||
wget -O - https://github.com/HaxeFoundation/haxe/releases/download/3.2.1/haxe-3.2.1-linux64.tar.gz | \
|
||||
tar -C /usr/lib/haxe --strip-components=1 -xz && \
|
||||
ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
|
||||
ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
|
||||
|
@ -183,6 +186,15 @@ RUN curl -sSL http://downloads.dlang.org/releases/2.x/2.070.0/dmd_2.070.0-0_amd6
|
|||
# Dart
|
||||
ENV PATH /usr/lib/dart/bin:$PATH
|
||||
|
||||
# OCaml
|
||||
RUN echo 'deb http://ppa.launchpad.net/avsm/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/avsm-official-ocaml.list && \
|
||||
gpg --keyserver keyserver.ubuntu.com --recv 61707B09 && \
|
||||
gpg --export --armor 61707B09 | apt-key add - && \
|
||||
apt-get update && \
|
||||
apt-get install -y ocaml opam && \
|
||||
opam init && \
|
||||
opam install oasis
|
||||
|
||||
# Force utf8 locale to successfully build Haskell tf-random
|
||||
ENV LC_ALL C.UTF-8
|
||||
|
231
vendor/git.apache.org/thrift.git/build/docker/old/debian-stretch/Dockerfile
generated
vendored
Normal file
231
vendor/git.apache.org/thrift.git/build/docker/old/debian-stretch/Dockerfile
generated
vendored
Normal file
|
@ -0,0 +1,231 @@
|
|||
# Licensed 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.
|
||||
|
||||
# Apache Thrift Docker build environment for Debian Stretch
|
||||
#
|
||||
# Known issues:
|
||||
# - d: deimos for libevent and openssl disabled - build errors
|
||||
# - dotnetcore, because netcore is for 1.0.0-preview and 2.0.0 is out
|
||||
# - rust: cargo not in debian repo - perhaps not needed?
|
||||
|
||||
FROM buildpack-deps:stretch-scm
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
### Add apt repos
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends apt apt-transport-https curl wget apt-utils
|
||||
|
||||
# D
|
||||
RUN wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \
|
||||
apt-get update && apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring
|
||||
|
||||
# Dart
|
||||
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
|
||||
sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g'
|
||||
|
||||
# dotnet (core) 2.0.0 - project isn't ready for this yet:
|
||||
# RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \
|
||||
# echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list
|
||||
|
||||
# node.js (this step runs apt-get update internally)
|
||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
|
||||
|
||||
|
||||
### install general dependencies
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# General dependencies` \
|
||||
bash-completion \
|
||||
bison \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
debhelper \
|
||||
flex \
|
||||
gdb \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
valgrind \
|
||||
vim
|
||||
|
||||
|
||||
### languages
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# C++ dependencies` \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-system-dev \
|
||||
libboost-test-dev \
|
||||
libboost-thread-dev \
|
||||
libevent-dev \
|
||||
libssl-dev \
|
||||
qt5-default \
|
||||
qtbase5-dev \
|
||||
qtbase5-dev-tools
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# csharp (mono) dependencies` \
|
||||
mono-devel
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# D dependencies` \
|
||||
dmd-bin \
|
||||
libevent-dev \
|
||||
libssl-dev \
|
||||
xdg-utils
|
||||
# libevent deimos disabled - build errors
|
||||
# RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
|
||||
# curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
|
||||
# mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
# mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
# rm -rf libevent-master
|
||||
# openssl deimos doesn't work with openssl-1.1.0 - disabling it for now:
|
||||
# RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
|
||||
# mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
# mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
# rm -rf openssl-master
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Dart dependencies` \
|
||||
dart
|
||||
ENV PATH /usr/lib/dart/bin:$PATH
|
||||
|
||||
# project isn't ready for this quite yet:
|
||||
# RUN apt-get install -y --no-install-recommends \
|
||||
# `# dotnet core dependencies` \
|
||||
# dotnet-sdk-2.0.0
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Erlang dependencies` \
|
||||
erlang-base \
|
||||
erlang-eunit \
|
||||
erlang-dev \
|
||||
erlang-tools \
|
||||
rebar
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# GlibC dependencies` \
|
||||
libglib2.0-dev
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# golang (go) dependencies` \
|
||||
golang-go
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Haskell dependencies` \
|
||||
ghc \
|
||||
cabal-install
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Haxe dependencies` \
|
||||
haxe \
|
||||
neko \
|
||||
neko-dev
|
||||
RUN haxelib setup --always /usr/share/haxe/lib && \
|
||||
haxelib install --always hxcpp
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Java dependencies` \
|
||||
ant \
|
||||
ant-optional \
|
||||
openjdk-8-jdk \
|
||||
maven
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Lua dependencies` \
|
||||
lua5.2 \
|
||||
lua5.2-dev
|
||||
# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
|
||||
# same for debian stretch
|
||||
# lua5.3 does not install alternatives so stick with 5.2 here
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Node.js dependencies` \
|
||||
nodejs
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# OCaml dependencies` \
|
||||
ocaml \
|
||||
opam && \
|
||||
opam init --yes && \
|
||||
opam install --yes oasis
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Perl dependencies` \
|
||||
libbit-vector-perl \
|
||||
libclass-accessor-class-perl \
|
||||
libcrypt-ssleay-perl \
|
||||
libio-socket-ssl-perl \
|
||||
libnet-ssleay-perl
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Php dependencies` \
|
||||
php7.0 \
|
||||
php7.0-cli \
|
||||
php7.0-dev \
|
||||
php-pear \
|
||||
re2c \
|
||||
phpunit
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Python dependencies` \
|
||||
python-all \
|
||||
python-all-dbg \
|
||||
python-all-dev \
|
||||
python-backports.ssl-match-hostname \
|
||||
python-ipaddress \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python-six \
|
||||
python-tornado \
|
||||
python-twisted \
|
||||
python-wheel \
|
||||
python-zope.interface \
|
||||
python3-all \
|
||||
python3-all-dbg \
|
||||
python3-all-dev \
|
||||
python3-setuptools \
|
||||
python3-six \
|
||||
python3-tornado \
|
||||
python3-twisted \
|
||||
python3-wheel \
|
||||
python3-zope.interface && \
|
||||
pip install --upgrade backports.ssl_match_hostname
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Ruby dependencies` \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
ruby-bundler
|
||||
RUN gem install bundler --no-ri --no-rdoc
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Rust dependencies` \
|
||||
rustc
|
||||
|
||||
# Update anything else left hanging
|
||||
RUN apt-get dist-upgrade -y
|
||||
|
||||
# Clean up
|
||||
RUN rm -rf /var/cache/apt/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /var/tmp/*
|
||||
|
||||
ENV THRIFT_ROOT /thrift
|
||||
RUN mkdir -p $THRIFT_ROOT/src
|
||||
COPY Dockerfile $THRIFT_ROOT/
|
||||
WORKDIR $THRIFT_ROOT/src
|
244
vendor/git.apache.org/thrift.git/build/docker/old/ubuntu-trusty/Dockerfile
generated
vendored
Normal file
244
vendor/git.apache.org/thrift.git/build/docker/old/ubuntu-trusty/Dockerfile
generated
vendored
Normal file
|
@ -0,0 +1,244 @@
|
|||
# Licensed 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.
|
||||
|
||||
#
|
||||
# Apache Thrift Docker build environment for Ubuntu Trusty
|
||||
# Using all stock Ubuntu Trusty packaging except for:
|
||||
# - d: does not come with Ubuntu so we're installing 2.070.0
|
||||
# - dart: does not come with Ubuntu so we're installing 1.20.1
|
||||
# - dotnetcore, disabled because netcore is for 1.0.0-preview and 2.0.0 is out
|
||||
# - haxe, disabled because the distro comes with 3.0.0 and it cores while installing
|
||||
# - node.js, disabled because it is at 0.10.0 in the distro which is too old (need 4+)
|
||||
# - ocaml, disabled because it fails to install properly
|
||||
#
|
||||
|
||||
FROM buildpack-deps:trusty-scm
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
### Add apt repos
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get dist-upgrade -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
apt \
|
||||
apt-transport-https \
|
||||
apt-utils \
|
||||
curl \
|
||||
dirmngr \
|
||||
software-properties-common \
|
||||
wget
|
||||
|
||||
# D
|
||||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \
|
||||
wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \
|
||||
wget -qO - https://dlang.org/d-keyring.gpg | apt-key add -
|
||||
|
||||
# Dart
|
||||
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > \
|
||||
/etc/apt/sources.list.d/dart_stable.list
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# General dependencies` \
|
||||
bash-completion \
|
||||
bison \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
debhelper \
|
||||
flex \
|
||||
gdb \
|
||||
llvm \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
valgrind \
|
||||
vim
|
||||
ENV PATH /usr/lib/llvm-3.8/bin:$PATH
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# C++ dependencies` \
|
||||
libboost-all-dev \
|
||||
libevent-dev \
|
||||
libssl-dev \
|
||||
qt5-default \
|
||||
qtbase5-dev \
|
||||
qtbase5-dev-tools
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# csharp (mono) dependencies` \
|
||||
mono-devel
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# D dependencies` \
|
||||
dmd-bin=2.070.2-0 \
|
||||
libphobos2-dev=2.070.2-0 \
|
||||
dub \
|
||||
dfmt \
|
||||
dscanner \
|
||||
xdg-utils
|
||||
RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
|
||||
curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
|
||||
mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf libevent-master
|
||||
RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
|
||||
mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf openssl-master
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Dart dependencies` \
|
||||
dart=1.20.1-1
|
||||
ENV PATH /usr/lib/dart/bin:$PATH
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Erlang dependencies` \
|
||||
erlang-base \
|
||||
erlang-eunit \
|
||||
erlang-dev \
|
||||
erlang-tools \
|
||||
rebar
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# GlibC dependencies` \
|
||||
libglib2.0-dev
|
||||
|
||||
# golang
|
||||
ENV GOLANG_VERSION 1.7.6
|
||||
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
|
||||
ENV GOLANG_DOWNLOAD_SHA256 ad5808bf42b014c22dd7646458f631385003049ded0bb6af2efc7f1f79fa29ea
|
||||
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \
|
||||
echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \
|
||||
tar -C /usr/local -xzf golang.tar.gz && \
|
||||
ln -s /usr/local/go/bin/go /usr/local/bin && \
|
||||
rm golang.tar.gz
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Haskell dependencies` \
|
||||
ghc \
|
||||
cabal-install
|
||||
|
||||
# disabled because it cores while installing
|
||||
# RUN apt-get install -y --no-install-recommends \
|
||||
# `# Haxe dependencies` \
|
||||
# haxe \
|
||||
# neko \
|
||||
# neko-dev && \
|
||||
# haxelib setup /usr/share/haxe/lib && \
|
||||
# haxelib install hxcpp 3.2.102
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Java dependencies` \
|
||||
ant \
|
||||
ant-optional \
|
||||
openjdk-7-jdk \
|
||||
maven
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Lua dependencies` \
|
||||
lua5.1 \
|
||||
lua5.1-dev
|
||||
|
||||
# disabled because it is too old
|
||||
# RUN apt-get install -y --no-install-recommends \
|
||||
# `# Node.js dependencies` \
|
||||
# nodejs \
|
||||
# npm
|
||||
|
||||
# disabled because it fails to install properly
|
||||
# RUN apt-get install -y --no-install-recommends \
|
||||
# `# OCaml dependencies` \
|
||||
# ocaml \
|
||||
# opam && \
|
||||
# opam init --yes && \
|
||||
# opam install --yes oasis
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Perl dependencies` \
|
||||
libbit-vector-perl \
|
||||
libclass-accessor-class-perl \
|
||||
libcrypt-ssleay-perl \
|
||||
libio-socket-ssl-perl \
|
||||
libnet-ssleay-perl
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Php dependencies` \
|
||||
php5 \
|
||||
php5-cli \
|
||||
php5-dev \
|
||||
php-pear \
|
||||
re2c && \
|
||||
wget https://getcomposer.org/installer -O - -q | php -- --quiet --install-dir=/usr/local/bin/ --filename=composer
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Python dependencies` \
|
||||
python-all \
|
||||
python-all-dbg \
|
||||
python-all-dev \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python-six \
|
||||
python-twisted \
|
||||
python-wheel \
|
||||
python-zope.interface \
|
||||
python3-all \
|
||||
python3-all-dbg \
|
||||
python3-all-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-six \
|
||||
python3-wheel \
|
||||
python3-zope.interface && \
|
||||
pip install -U ipaddress backports.ssl_match_hostname tornado && \
|
||||
pip3 install -U backports.ssl_match_hostname tornado
|
||||
# installing tornado by pip/pip3 instead of debian package
|
||||
# if we install the debian package, the build fails in py2
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Ruby dependencies` \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
ruby-bundler
|
||||
RUN gem install bundler --no-ri --no-rdoc
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Rust dependencies` \
|
||||
cargo \
|
||||
rustc
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Static Code Analysis dependencies` \
|
||||
cppcheck \
|
||||
sloccount && \
|
||||
pip install flake8
|
||||
|
||||
# Install BouncyCastle provider to fix Java builds issues with JDK 7
|
||||
# Builds accessing repote repositories fail as seen here: https://github.com/travis-ci/travis-ci/issues/8503
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# BouncyCastle JCE Provider dependencies` \
|
||||
libbcprov-java && \
|
||||
ln -s /usr/share/java/bcprov.jar /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/bcprov.jar && \
|
||||
awk -F . -v OFS=. 'BEGIN{n=2}/^security\.provider/ {split($3, posAndEquals, "=");$3=n++"="posAndEquals[2];print;next} 1' /etc/java-7-openjdk/security/java.security > /tmp/java.security && \
|
||||
echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" >> /tmp/java.security && \
|
||||
mv /tmp/java.security /etc/java-7-openjdk/security/java.security
|
||||
|
||||
# Clean up
|
||||
RUN rm -rf /var/cache/apt/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /var/tmp/*
|
||||
|
||||
ENV THRIFT_ROOT /thrift
|
||||
RUN mkdir -p $THRIFT_ROOT/src
|
||||
COPY Dockerfile $THRIFT_ROOT/
|
||||
WORKDIR $THRIFT_ROOT/src
|
82
vendor/git.apache.org/thrift.git/build/docker/refresh.sh
generated
vendored
Executable file
82
vendor/git.apache.org/thrift.git/build/docker/refresh.sh
generated
vendored
Executable file
|
@ -0,0 +1,82 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
#
|
||||
# The build has two stages: "docker" and "test"
|
||||
# The "docker" stage is meant to rebuild the docker images
|
||||
# if needed. If we cannot push that result however then
|
||||
# there is no reason to do anything.
|
||||
# The "test" stage is an actual test job. Even if the docker
|
||||
# image doesn't match what's in the repo, we still build
|
||||
# the image so the build job can run properly.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DOCKER_TAG=$DOCKER_REPO:$DISTRO
|
||||
|
||||
function dockerfile_changed {
|
||||
# image may not exist yet, so we have to let it fail silently:
|
||||
docker pull $DOCKER_TAG || true
|
||||
docker run $DOCKER_TAG bash -c 'cd .. && sha512sum Dockerfile' > .Dockerfile.sha512
|
||||
sha512sum -c .Dockerfile.sha512
|
||||
}
|
||||
|
||||
#
|
||||
# If this build has no DOCKER_PASS and it is in the docker stage
|
||||
# then there's no reason to do any processing because we cannot
|
||||
# push the result if the Dockerfile changed.
|
||||
#
|
||||
|
||||
if [[ "$TRAVIS_BUILD_STAGE" == "docker" ]] && [[ -z "$DOCKER_PASS" ]]; then
|
||||
echo Detected docker stage build and no defined DOCKER_PASS, this build job will be skipped.
|
||||
echo Subsequent jobs in the test stage may each rebuild the docker image.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
pushd ${SCRIPT_DIR}/$DISTRO
|
||||
if dockerfile_changed; then
|
||||
echo Dockerfile has not changed. No need to rebuild.
|
||||
exit 0
|
||||
else
|
||||
echo Dockerfile has changed.
|
||||
fi
|
||||
popd
|
||||
|
||||
#
|
||||
# Dockerfile has changed - rebuild it for the current build job.
|
||||
# If it is a "docker" stage build then we want to push it back
|
||||
# to the DOCKER_REPO. If it is a "test" stage build then we do
|
||||
# not. If nobody defined a DOCKER_PASS then it doesn't matter.
|
||||
#
|
||||
|
||||
echo Rebuilding docker image $DISTRO
|
||||
docker build --tag $DOCKER_TAG build/docker/$DISTRO
|
||||
|
||||
if [[ "$TRAVIS_BUILD_STAGE" == "docker" ]] && [[ ! -z "$DOCKER_USER" ]] && [[ ! -z "$DOCKER_PASS" ]]; then
|
||||
echo Pushing docker image $DOCKER_TAG
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
docker push $DOCKER_TAG
|
||||
else
|
||||
echo Not pushing docker image: either not a docker stage build job, or one of DOCKER_USER or DOCKER_PASS is undefined.
|
||||
fi
|
||||
|
|
@ -18,25 +18,13 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
# Download prebuilt docker image and compare Dockerfile hash values
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DISTRO=$1
|
||||
SRC_IMG=thrift/thrift-build:$DISTRO
|
||||
DOCKER_TAG=$DOCKER_REPO:$DISTRO
|
||||
|
||||
function try_pull {
|
||||
docker pull $SRC_IMG
|
||||
cd ${SCRIPT_DIR}/$DISTRO
|
||||
docker run $SRC_IMG bash -c 'cd .. && sha512sum Dockerfile' > .Dockerfile.sha512
|
||||
sha512sum -c .Dockerfile.sha512
|
||||
}
|
||||
printenv | sort
|
||||
|
||||
docker run --net=host -e BUILD_LIBS="$BUILD_LIBS" $BUILD_ENV -v $(pwd):/thrift/src \
|
||||
-it $DOCKER_TAG build/docker/scripts/$SCRIPT $BUILD_ARG
|
||||
|
||||
if try_pull; then
|
||||
echo Dockerfile seems identical. No need to rebuild from scratch.
|
||||
docker tag thrift/thrift-build:$DISTRO thrift-build:$DISTRO
|
||||
else
|
||||
echo Either Dockerfile has changed or pull failure. Need to build brand new one.
|
||||
exit 1
|
||||
fi
|
4
vendor/git.apache.org/thrift.git/build/docker/scripts/cmake.sh
generated
vendored
4
vendor/git.apache.org/thrift.git/build/docker/scripts/cmake.sh
generated
vendored
|
@ -19,5 +19,5 @@ for LIB in $BUILD_LIBS; do
|
|||
done
|
||||
$MAKEPROG -j3
|
||||
cpack
|
||||
ctest -VV
|
||||
# was: -E "(concurrency_test|processor_test)"
|
||||
ctest -VV -E "(python_test)"
|
||||
# disabled cmake python_test for now since it fails in travis under centos
|
||||
|
|
50
vendor/git.apache.org/thrift.git/build/docker/scripts/covscan.sh
generated
vendored
Executable file
50
vendor/git.apache.org/thrift.git/build/docker/scripts/covscan.sh
generated
vendored
Executable file
|
@ -0,0 +1,50 @@
|
|||
#
|
||||
# Coverity Scan Travis build script
|
||||
# To run this interactively, set the environment variables yourself,
|
||||
# and run this inside a docker container.
|
||||
#
|
||||
# Command-Line Arguments
|
||||
#
|
||||
# --skipdownload to skip re-downloading the Coverity Scan build package (large)
|
||||
#
|
||||
# Environment Variables (required)
|
||||
#
|
||||
# COVERITY_SCAN_NOTIFICATION_EMAIL - email address to notify
|
||||
# COVERITY_SCAN_TOKEN - the Coverity Scan token (should be secure)
|
||||
#
|
||||
# Environment Variables (defaulted)
|
||||
#
|
||||
# COVERITY_SCAN_BUILD_COMMAND - defaults to "build/docker/scripts/autotools.sh"
|
||||
# COVERITY_SCAN_DESCRIPTION - defaults to TRAVIS_BRANCH or "master" if empty
|
||||
# COVERITY_SCAN_PROJECT - defaults to "thrift"
|
||||
|
||||
set -ex
|
||||
|
||||
COVERITY_SCAN_BUILD_COMMAND=${COVERITY_SCAN_BUILD_COMMAND:-build/docker/scripts/autotools.sh}
|
||||
COVERITY_SCAN_DESCRIPTION=${COVERITY_SCAN_DESCRIPTION:-${TRAVIS_BRANCH:-master}}
|
||||
COVERITY_SCAN_PROJECT=${COVERITY_SCAN_PROJECT:-thrift}
|
||||
|
||||
# download the coverity scan package
|
||||
|
||||
pushd /tmp
|
||||
if [[ "$1" != "--skipdownload" ]]; then
|
||||
rm -rf coverity_tool.tgz cov-analysis*
|
||||
wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_PROJECT" -O coverity_tool.tgz
|
||||
tar xzf coverity_tool.tgz
|
||||
fi
|
||||
COVBIN=$(echo $(pwd)/cov-analysis*/bin)
|
||||
export PATH=$COVBIN:$PATH
|
||||
popd
|
||||
|
||||
# build the project with coverity scan
|
||||
|
||||
rm -rf cov-int/
|
||||
cov-build --dir cov-int $COVERITY_SCAN_BUILD_COMMAND
|
||||
tar cJf cov-int.tar.xz cov-int/
|
||||
curl --form token="$COVERITY_SCAN_TOKEN" \
|
||||
--form email="$COVERITY_SCAN_NOTIFICATION_EMAIL" \
|
||||
--form file=@cov-int.tar.xz \
|
||||
--form version="$(git describe --tags)" \
|
||||
--form description="$COVERITY_SCAN_DESCRIPTION" \
|
||||
https://scan.coverity.com/builds?project="$COVERITY_SCAN_PROJECT"
|
||||
|
66
vendor/git.apache.org/thrift.git/build/docker/scripts/sca.sh
generated
vendored
Executable file
66
vendor/git.apache.org/thrift.git/build/docker/scripts/sca.sh
generated
vendored
Executable file
|
@ -0,0 +1,66 @@
|
|||
#!/bin/bash
|
||||
set -ev
|
||||
|
||||
#
|
||||
# Generate thrift files so the static code analysis includes an analysis
|
||||
# of the files the thrift compiler spits out. If running interactively
|
||||
# set the NOBUILD environment variable to skip the boot/config/make phase.
|
||||
#
|
||||
|
||||
if [[ -z "$NOBUILD" ]]; then
|
||||
./bootstrap.sh
|
||||
./configure --enable-tutorial=no
|
||||
make -j3 precross
|
||||
fi
|
||||
|
||||
#
|
||||
# C/C++ static code analysis with cppcheck
|
||||
# add --error-exitcode=1 to --enable=all as soon as everything is fixed
|
||||
#
|
||||
# Python code style check with flake8
|
||||
#
|
||||
# search for TODO etc within source tree
|
||||
# some statistics about the code base
|
||||
# some info about the build machine
|
||||
|
||||
# Compiler cppcheck (All)
|
||||
cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src
|
||||
|
||||
# C++ cppcheck (All)
|
||||
cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
|
||||
|
||||
# C Glib cppcheck (All)
|
||||
cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
|
||||
|
||||
# Silent error checks
|
||||
# See THRIFT-4371 : flex generated code triggers "possible null pointer dereference" in yy_init_buffer
|
||||
cppcheck --force --quiet --inline-suppr --suppress="*:thrift/thriftl.cc" --error-exitcode=1 -j2 compiler/cpp/src
|
||||
cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
|
||||
cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
|
||||
|
||||
# Python code style
|
||||
flake8 --ignore=E501 --exclude=lib/py/build lib/py
|
||||
flake8 --exclude=tutorial/py/build tutorial/py
|
||||
# THRIFT-4371 : generated files are excluded because they haven't been scrubbed yet
|
||||
flake8 --ignore=E501 --exclude="*/gen-py*/*",test/py/build test/py
|
||||
flake8 test/py.twisted
|
||||
flake8 test/py.tornado
|
||||
flake8 --ignore=E501 test/test.py
|
||||
flake8 --ignore=E501,E722 test/crossrunner
|
||||
flake8 test/features
|
||||
|
||||
# PHP code style
|
||||
composer install --quiet
|
||||
./vendor/bin/phpcs
|
||||
|
||||
# TODO etc
|
||||
echo FIXMEs: `grep -r FIXME * | wc -l`
|
||||
echo HACKs: `grep -r HACK * | wc -l`
|
||||
echo TODOs: `grep -r TODO * | wc -l`
|
||||
|
||||
# LoC
|
||||
sloccount .
|
||||
|
||||
# System Info
|
||||
dpkg -l
|
||||
uname -a
|
30
vendor/git.apache.org/thrift.git/build/docker/scripts/ubsan.sh
generated
vendored
Executable file
30
vendor/git.apache.org/thrift.git/build/docker/scripts/ubsan.sh
generated
vendored
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Wraps autotools.sh, but each binary crashes if it exhibits undefined behavior.
|
||||
# Set the undefined behavior flags. This crashes on all undefined behavior except for
|
||||
# undefined casting, aka "vptr".
|
||||
# TODO: fix undefined vptr behavior and turn this option back on.
|
||||
|
||||
export CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined -O0 -ggdb3 -fno-omit-frame-pointer"
|
||||
export CXXFLAGS="${CFLAGS}"
|
||||
export LDFLAGS="-lubsan"
|
||||
export UBSAN_OPTIONS=print_stacktrace=1
|
||||
|
||||
#
|
||||
# work around https://svn.boost.org/trac10/ticket/11632 if present
|
||||
#
|
||||
|
||||
sed -i 's/, stream_t(rdbuf()) /, stream_t(pbase_type::member.get())/g' /usr/include/boost/format/alt_sstream.hpp
|
||||
|
||||
# llvm-symbolizer must be on PATH to get a stack trace on error
|
||||
|
||||
CLANG_PATH="$(mktemp -d)"
|
||||
trap "rm -rf ${CLANG_PATH}" EXIT
|
||||
ln -s "$(whereis llvm-symbolizer-4.0 | rev | cut -d ' ' -f 1 | rev)" \
|
||||
"${CLANG_PATH}/llvm-symbolizer"
|
||||
export PATH="${CLANG_PATH}:${PATH}"
|
||||
llvm-symbolizer -version
|
||||
|
||||
build/docker/scripts/autotools.sh $*
|
270
vendor/git.apache.org/thrift.git/build/docker/ubuntu-artful/Dockerfile
generated
vendored
Normal file
270
vendor/git.apache.org/thrift.git/build/docker/ubuntu-artful/Dockerfile
generated
vendored
Normal file
|
@ -0,0 +1,270 @@
|
|||
# Licensed 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.
|
||||
|
||||
#
|
||||
# Apache Thrift Docker build environment for Ubuntu Artful
|
||||
# Using all stock Ubuntu Artful packaging except for:
|
||||
# - cpp: stock boost 1.62 in artful has a nasty bug so we use stock boost 1.63
|
||||
# - d: dmd does not come with Ubuntu
|
||||
# - dart: does not come with Ubuntu. Pinned to last 1.x release
|
||||
# - dotnet: does not come with Ubuntu
|
||||
# - haxe: version 3.4.2 that comes with Ubuntu cores in our CI build
|
||||
# - go: artful comes with 1.9, we want the latest (supported)
|
||||
# - nodejs: want v8, artful comes with v6
|
||||
#
|
||||
|
||||
FROM buildpack-deps:artful-scm
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
### Add apt repos
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get dist-upgrade -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
apt \
|
||||
apt-transport-https \
|
||||
apt-utils \
|
||||
curl \
|
||||
dirmngr \
|
||||
software-properties-common \
|
||||
wget
|
||||
|
||||
# csharp (mono) - if we ever want a later version
|
||||
# RUN echo "deb http://download.mono-project.com/repo/debian xenial main" | tee /etc/apt/sources.list.d/mono.list && \
|
||||
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF
|
||||
|
||||
# Dart
|
||||
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > \
|
||||
/etc/apt/sources.list.d/dart_stable.list
|
||||
ENV DART_VERSION 1.24.3-1
|
||||
|
||||
# dotnet (netcore)
|
||||
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \
|
||||
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" > \
|
||||
/etc/apt/sources.list.d/dotnetdev.list
|
||||
|
||||
# haxe (https://haxe.org/download/linux/)
|
||||
RUN add-apt-repository ppa:haxe/releases -y
|
||||
|
||||
# node.js
|
||||
RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||
echo "deb https://deb.nodesource.com/node_8.x artful main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||
|
||||
### install general dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# General dependencies` \
|
||||
bash-completion \
|
||||
bison \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
debhelper \
|
||||
flex \
|
||||
gdb \
|
||||
llvm \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
valgrind \
|
||||
vim
|
||||
ENV PATH /usr/lib/llvm-3.8/bin:$PATH
|
||||
|
||||
# boost-1.62 has a terrible bug in boost::test, see https://svn.boost.org/trac10/ticket/12507
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# C++ dependencies` \
|
||||
libboost1.63-all-dev \
|
||||
libevent-dev \
|
||||
libssl-dev \
|
||||
qt5-default \
|
||||
qtbase5-dev \
|
||||
qtbase5-dev-tools
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# csharp (mono) dependencies` \
|
||||
mono-devel
|
||||
|
||||
ENV SBCL_VERSION 1.4.5
|
||||
RUN \
|
||||
`# Common Lisp (sbcl) dependencies` \
|
||||
curl --version && \
|
||||
curl -O -J -L https://kent.dl.sourceforge.net/project/sbcl/sbcl/${SBCL_VERSION}/sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \
|
||||
tar xjf sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \
|
||||
cd sbcl-${SBCL_VERSION}-x86-64-linux && \
|
||||
./install.sh && \
|
||||
sbcl --version && \
|
||||
rm -rf sbcl*
|
||||
|
||||
ENV D_VERSION 2.080.0
|
||||
ENV DMD_DEB dmd_2.080.0-0_amd64.deb
|
||||
RUN \
|
||||
`# D dependencies` \
|
||||
wget -q http://downloads.dlang.org/releases/2.x/${D_VERSION}/${DMD_DEB} && \
|
||||
dpkg --install ${DMD_DEB} && \
|
||||
rm -f ${DMD_DEB} && \
|
||||
mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
|
||||
curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
|
||||
mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf libevent-master && \
|
||||
curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
|
||||
mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf openssl-master
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Dart dependencies` \
|
||||
dart=$DART_VERSION
|
||||
ENV PATH /usr/lib/dart/bin:$PATH
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# dotnet core dependencies` \
|
||||
dotnet-sdk-2.1.4
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Erlang dependencies` \
|
||||
erlang-base \
|
||||
erlang-eunit \
|
||||
erlang-dev \
|
||||
erlang-tools \
|
||||
rebar
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# GlibC dependencies` \
|
||||
libglib2.0-dev
|
||||
|
||||
# golang
|
||||
ENV GOLANG_VERSION 1.10
|
||||
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
|
||||
ENV GOLANG_DOWNLOAD_SHA256 b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33
|
||||
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \
|
||||
echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \
|
||||
tar -C /usr/local -xzf golang.tar.gz && \
|
||||
ln -s /usr/local/go/bin/go /usr/local/bin && \
|
||||
rm golang.tar.gz
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Haskell dependencies` \
|
||||
ghc \
|
||||
cabal-install
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Haxe dependencies` \
|
||||
haxe \
|
||||
neko \
|
||||
neko-dev && \
|
||||
haxelib setup --always /usr/share/haxe/lib && \
|
||||
haxelib install --always hxcpp 2>&1 > /dev/null
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Java dependencies` \
|
||||
ant \
|
||||
ant-optional \
|
||||
openjdk-8-jdk \
|
||||
maven
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Lua dependencies` \
|
||||
lua5.2 \
|
||||
lua5.2-dev
|
||||
# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
|
||||
# lua5.3 does not install alternatives!
|
||||
# need to update our luasocket code, lua doesn't have luaL_openlib any more
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Node.js dependencies` \
|
||||
nodejs
|
||||
|
||||
# Test dependencies for running puppeteer
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# JS dependencies` \
|
||||
libxss1
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# OCaml dependencies` \
|
||||
ocaml \
|
||||
opam && \
|
||||
opam init --yes && \
|
||||
opam install --yes oasis
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Perl dependencies` \
|
||||
libbit-vector-perl \
|
||||
libclass-accessor-class-perl \
|
||||
libcrypt-ssleay-perl \
|
||||
libio-socket-ssl-perl \
|
||||
libnet-ssleay-perl
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Php dependencies` \
|
||||
php \
|
||||
php-cli \
|
||||
php-dev \
|
||||
php-pear \
|
||||
re2c \
|
||||
composer
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Python dependencies` \
|
||||
python-all \
|
||||
python-all-dbg \
|
||||
python-all-dev \
|
||||
python-ipaddress \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python-six \
|
||||
python-tornado \
|
||||
python-twisted \
|
||||
python-wheel \
|
||||
python-zope.interface && \
|
||||
pip install --upgrade backports.ssl_match_hostname
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Python3 dependencies` \
|
||||
python3-all \
|
||||
python3-all-dbg \
|
||||
python3-all-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-six \
|
||||
python3-tornado \
|
||||
python3-twisted \
|
||||
python3-wheel \
|
||||
python3-zope.interface
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Ruby dependencies` \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
ruby-bundler
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Rust dependencies` \
|
||||
cargo \
|
||||
rustc
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Static Code Analysis dependencies` \
|
||||
cppcheck \
|
||||
sloccount && \
|
||||
pip install flake8
|
||||
|
||||
# Clean up
|
||||
RUN rm -rf /var/cache/apt/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /var/tmp/*
|
||||
|
||||
ENV THRIFT_ROOT /thrift
|
||||
RUN mkdir -p $THRIFT_ROOT/src
|
||||
COPY Dockerfile $THRIFT_ROOT/
|
||||
WORKDIR $THRIFT_ROOT/src
|
272
vendor/git.apache.org/thrift.git/build/docker/ubuntu-bionic/Dockerfile
generated
vendored
Normal file
272
vendor/git.apache.org/thrift.git/build/docker/ubuntu-bionic/Dockerfile
generated
vendored
Normal file
|
@ -0,0 +1,272 @@
|
|||
# Licensed 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.
|
||||
|
||||
#
|
||||
# Apache Thrift Docker build environment for Ubuntu Bionic
|
||||
# Using all stock Ubuntu Bionic packaging except for:
|
||||
# - cl: want latest
|
||||
# - d: dmd does not come with Ubuntu
|
||||
# - dart: does not come with Ubuntu. Pinned to last 1.x release
|
||||
# - dotnet: does not come with Ubuntu
|
||||
# - go: want latest
|
||||
# - nodejs: want v8, bionic comes with v6
|
||||
#
|
||||
|
||||
FROM buildpack-deps:bionic-scm
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
### Add apt repos
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get dist-upgrade -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
apt \
|
||||
apt-transport-https \
|
||||
apt-utils \
|
||||
curl \
|
||||
dirmngr \
|
||||
software-properties-common \
|
||||
wget
|
||||
|
||||
# csharp (mono) - if we ever want a later version
|
||||
# RUN echo "deb http://download.mono-project.com/repo/debian xenial main" | tee /etc/apt/sources.list.d/mono.list && \
|
||||
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF
|
||||
|
||||
# Dart
|
||||
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > \
|
||||
/etc/apt/sources.list.d/dart_stable.list
|
||||
ENV DART_VERSION 1.24.3-1
|
||||
|
||||
# dotnet (netcore)
|
||||
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \
|
||||
wget -q -O /etc/apt/sources.list.d/microsoft-prod.list https://packages.microsoft.com/config/ubuntu/18.04/prod.list && \
|
||||
chown root:root /etc/apt/trusted.gpg.d/microsoft.gpg && \
|
||||
chown root:root /etc/apt/sources.list.d/microsoft-prod.list
|
||||
|
||||
# node.js
|
||||
RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||
echo "deb https://deb.nodesource.com/node_8.x bionic main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||
|
||||
### install general dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# General dependencies` \
|
||||
bash-completion \
|
||||
bison \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
debhelper \
|
||||
flex \
|
||||
gdb \
|
||||
llvm \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
valgrind \
|
||||
vim
|
||||
ENV PATH /usr/lib/llvm-6.0/bin:$PATH
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# C++ dependencies` \
|
||||
libboost-all-dev \
|
||||
libevent-dev \
|
||||
libssl-dev \
|
||||
qt5-default \
|
||||
qtbase5-dev \
|
||||
qtbase5-dev-tools
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# csharp (mono) dependencies` \
|
||||
mono-devel
|
||||
|
||||
ENV SBCL_VERSION 1.4.9
|
||||
RUN \
|
||||
`# Common Lisp (sbcl) dependencies` \
|
||||
curl --version && \
|
||||
curl -O -J -L https://kent.dl.sourceforge.net/project/sbcl/sbcl/${SBCL_VERSION}/sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \
|
||||
tar xjf sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \
|
||||
cd sbcl-${SBCL_VERSION}-x86-64-linux && \
|
||||
./install.sh && \
|
||||
sbcl --version && \
|
||||
cd .. && \
|
||||
rm -rf sbcl*
|
||||
|
||||
ENV D_VERSION 2.081.0
|
||||
ENV DMD_DEB dmd_2.081.0-0_amd64.deb
|
||||
RUN \
|
||||
`# D dependencies` \
|
||||
wget -q http://downloads.dlang.org/releases/2.x/${D_VERSION}/${DMD_DEB} && \
|
||||
dpkg --install ${DMD_DEB} && \
|
||||
rm -f ${DMD_DEB} && \
|
||||
mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
|
||||
curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
|
||||
mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf libevent-master && \
|
||||
curl -sSL https://github.com/jeking3/openssl/archive/tls_method.tar.gz| tar xz && \
|
||||
mv openssl-tls_method/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv openssl-tls_method/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf openssl-tls_method
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Dart dependencies` \
|
||||
dart=$DART_VERSION
|
||||
ENV PATH /usr/lib/dart/bin:$PATH
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# dotnet core dependencies` \
|
||||
dotnet-sdk-2.1
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Erlang dependencies` \
|
||||
erlang-base \
|
||||
erlang-eunit \
|
||||
erlang-dev \
|
||||
erlang-tools \
|
||||
rebar
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# GlibC dependencies` \
|
||||
libglib2.0-dev
|
||||
|
||||
# golang
|
||||
ENV GOLANG_VERSION 1.10.3
|
||||
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
|
||||
ENV GOLANG_DOWNLOAD_SHA256 fa1b0e45d3b647c252f51f5e1204aba049cde4af177ef9f2181f43004f901035
|
||||
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \
|
||||
echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \
|
||||
tar -C /usr/local -xzf golang.tar.gz && \
|
||||
ln -s /usr/local/go/bin/go /usr/local/bin && \
|
||||
rm golang.tar.gz
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Haskell dependencies` \
|
||||
ghc \
|
||||
cabal-install
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Haxe dependencies` \
|
||||
haxe \
|
||||
neko \
|
||||
neko-dev && \
|
||||
haxelib setup --always /usr/share/haxe/lib && \
|
||||
haxelib install --always hxcpp 2>&1 > /dev/null
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Java dependencies` \
|
||||
ant \
|
||||
ant-optional \
|
||||
openjdk-8-jdk \
|
||||
maven && \
|
||||
update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Lua dependencies` \
|
||||
lua5.2 \
|
||||
lua5.2-dev
|
||||
# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
|
||||
# lua5.3 does not install alternatives!
|
||||
# need to update our luasocket code, lua doesn't have luaL_openlib any more
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Node.js dependencies` \
|
||||
nodejs
|
||||
|
||||
# Test dependencies for running puppeteer
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# JS dependencies` \
|
||||
libxss1
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# OCaml dependencies` \
|
||||
ocaml \
|
||||
opam && \
|
||||
opam init --yes && \
|
||||
opam install --yes oasis
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Perl dependencies` \
|
||||
libbit-vector-perl \
|
||||
libclass-accessor-class-perl \
|
||||
libcrypt-ssleay-perl \
|
||||
libio-socket-ssl-perl \
|
||||
libnet-ssleay-perl
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Php dependencies` \
|
||||
php \
|
||||
php-cli \
|
||||
php-dev \
|
||||
php-pear \
|
||||
re2c \
|
||||
composer
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Python dependencies` \
|
||||
python-all \
|
||||
python-all-dbg \
|
||||
python-all-dev \
|
||||
python-ipaddress \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python-six \
|
||||
python-tornado \
|
||||
python-twisted \
|
||||
python-wheel \
|
||||
python-zope.interface && \
|
||||
pip install --upgrade backports.ssl_match_hostname
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Python3 dependencies` \
|
||||
python3-all \
|
||||
python3-all-dbg \
|
||||
python3-all-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-six \
|
||||
python3-tornado \
|
||||
python3-twisted \
|
||||
python3-wheel \
|
||||
python3-zope.interface
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Ruby dependencies` \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
ruby-bundler
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Rust dependencies` \
|
||||
cargo \
|
||||
rustc
|
||||
|
||||
# cppcheck-1.82 has a nasty cpp parser bug, so we're using something newer
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Static Code Analysis dependencies` \
|
||||
cppcheck \
|
||||
sloccount && \
|
||||
pip install flake8 && \
|
||||
wget -q "https://launchpad.net/ubuntu/+source/cppcheck/1.83-2/+build/14874703/+files/cppcheck_1.83-2_amd64.deb" && \
|
||||
dpkg -i cppcheck_1.83-2_amd64.deb && \
|
||||
rm cppcheck_1.83-2_amd64.deb
|
||||
|
||||
# Clean up
|
||||
RUN rm -rf /var/cache/apt/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /var/tmp/*
|
||||
|
||||
ENV THRIFT_ROOT /thrift
|
||||
RUN mkdir -p $THRIFT_ROOT/src
|
||||
COPY Dockerfile $THRIFT_ROOT/
|
||||
WORKDIR $THRIFT_ROOT/src
|
271
vendor/git.apache.org/thrift.git/build/docker/ubuntu-xenial/Dockerfile
generated
vendored
Normal file
271
vendor/git.apache.org/thrift.git/build/docker/ubuntu-xenial/Dockerfile
generated
vendored
Normal file
|
@ -0,0 +1,271 @@
|
|||
# Licensed 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.
|
||||
|
||||
#
|
||||
# Apache Thrift Docker build environment for Ubuntu Xenial
|
||||
# Using all stock Ubuntu Xenial packaging except for:
|
||||
# - d: does not come with Ubuntu so we're installing 2.075.1 for coverage
|
||||
# - dart: does not come with Ubuntu so we're installing 1.22.1 for coverage
|
||||
# - dotnet: does not come with Ubuntu
|
||||
# - go: Xenial comes with 1.6, but we need 1.7 or later
|
||||
# - nodejs: Xenial comes with 4.2.6 which exits LTS April 2018, so we're installing 6.x
|
||||
# - ocaml: causes stack overflow error, just started March 2018 not sure why
|
||||
#
|
||||
|
||||
FROM buildpack-deps:xenial-scm
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
### Add apt repos
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get dist-upgrade -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
apt \
|
||||
apt-transport-https \
|
||||
apt-utils \
|
||||
curl \
|
||||
software-properties-common \
|
||||
wget
|
||||
|
||||
# csharp (mono)
|
||||
# RUN echo "deb http://download.mono-project.com/repo/debian xenial main" | tee /etc/apt/sources.list.d/mono.list && \
|
||||
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF
|
||||
|
||||
# D
|
||||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \
|
||||
wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \
|
||||
wget -qO - https://dlang.org/d-keyring.gpg | apt-key add -
|
||||
|
||||
# Dart
|
||||
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > \
|
||||
/etc/apt/sources.list.d/dart_stable.list
|
||||
ENV DART_VERSION 1.22.1-1
|
||||
|
||||
# dotnet (core)
|
||||
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \
|
||||
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > \
|
||||
/etc/apt/sources.list.d/dotnetdev.list
|
||||
|
||||
# node.js
|
||||
RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||
echo "deb https://deb.nodesource.com/node_6.x xenial main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||
|
||||
### install general dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# General dependencies` \
|
||||
bash-completion \
|
||||
bison \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
debhelper \
|
||||
flex \
|
||||
gdb \
|
||||
llvm \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
valgrind \
|
||||
vim
|
||||
ENV PATH /usr/lib/llvm-3.8/bin:$PATH
|
||||
|
||||
### languages
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# C++ dependencies` \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-system-dev \
|
||||
libboost-test-dev \
|
||||
libboost-thread-dev \
|
||||
libevent-dev \
|
||||
libssl-dev \
|
||||
qt5-default \
|
||||
qtbase5-dev \
|
||||
qtbase5-dev-tools
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# csharp (mono) dependencies` \
|
||||
mono-devel
|
||||
|
||||
ENV D_VERSION 2.075.1-0
|
||||
RUN apt-get install -y --allow-unauthenticated --no-install-recommends \
|
||||
`# D dependencies` \
|
||||
dmd-bin=$D_VERSION \
|
||||
libphobos2-dev=$D_VERSION \
|
||||
dub=1.6.0-0 \
|
||||
dfmt \
|
||||
dscanner \
|
||||
libevent-dev \
|
||||
libssl-dev \
|
||||
xdg-utils
|
||||
RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
|
||||
curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
|
||||
mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf libevent-master
|
||||
RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/v1.1.6+1.0.1g.tar.gz | tar xz && \
|
||||
mv openssl-1.1.6-1.0.1g/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv openssl-1.1.6-1.0.1g/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf openssl-1.1.6-1.0.1g
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Dart dependencies` \
|
||||
dart=$DART_VERSION
|
||||
ENV PATH /usr/lib/dart/bin:$PATH
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# dotnet core dependencies` \
|
||||
dotnet-sdk-2.1.4
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Erlang dependencies` \
|
||||
erlang-base \
|
||||
erlang-eunit \
|
||||
erlang-dev \
|
||||
erlang-tools \
|
||||
rebar
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# GlibC dependencies` \
|
||||
libglib2.0-dev
|
||||
|
||||
# golang
|
||||
ENV GOLANG_VERSION 1.7.6
|
||||
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
|
||||
ENV GOLANG_DOWNLOAD_SHA256 ad5808bf42b014c22dd7646458f631385003049ded0bb6af2efc7f1f79fa29ea
|
||||
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \
|
||||
echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \
|
||||
tar -C /usr/local -xzf golang.tar.gz && \
|
||||
ln -s /usr/local/go/bin/go /usr/local/bin && \
|
||||
rm golang.tar.gz
|
||||
|
||||
# due to a bug in cabal in xenial (cabal-install package) we pull in another:
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Haskell dependencies` \
|
||||
ghc && \
|
||||
cd /tmp && \
|
||||
wget -q https://www.haskell.org/cabal/release/cabal-install-1.24.0.2/cabal-install-1.24.0.2-x86_64-unknown-linux.tar.gz && \
|
||||
tar xzf cabal-install-1.24.0.2-x86_64-unknown-linux.tar.gz && \
|
||||
find dist-newstyle/ -type f -name cabal -exec mv {} /usr/bin \; && \
|
||||
rm -rf /tmp/cabal* && \
|
||||
cabal --version
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Haxe dependencies` \
|
||||
haxe \
|
||||
neko \
|
||||
neko-dev \
|
||||
libneko0 && \
|
||||
haxelib setup --always /usr/share/haxe/lib && \
|
||||
haxelib install --always hxcpp 3.4.64 2>&1 > /dev/null
|
||||
# note: hxcpp 3.4.185 (latest) no longer ships static libraries, and caused a build failure
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Java dependencies` \
|
||||
ant \
|
||||
ant-optional \
|
||||
openjdk-8-jdk \
|
||||
maven
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Lua dependencies` \
|
||||
lua5.2 \
|
||||
lua5.2-dev
|
||||
# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
|
||||
# lua5.3 does not install alternatives so stick with 5.2 here
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Node.js dependencies` \
|
||||
nodejs
|
||||
|
||||
# Test dependencies for running puppeteer
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# JS dependencies` \
|
||||
libxss1 \
|
||||
libatk-bridge2.0-0 \
|
||||
libgtk-3-0
|
||||
|
||||
# THRIFT-4517: causes stack overflows; version too old; skip ocaml in xenial
|
||||
# RUN apt-get install -y --no-install-recommends \
|
||||
# `# OCaml dependencies` \
|
||||
# ocaml \
|
||||
# opam && \
|
||||
# opam init --yes && \
|
||||
# opam install --yes oasis
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Perl dependencies` \
|
||||
libbit-vector-perl \
|
||||
libclass-accessor-class-perl \
|
||||
libcrypt-ssleay-perl \
|
||||
libio-socket-ssl-perl \
|
||||
libnet-ssleay-perl
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Php dependencies` \
|
||||
php7.0 \
|
||||
php7.0-cli \
|
||||
php7.0-dev \
|
||||
php-pear \
|
||||
re2c \
|
||||
composer
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Python dependencies` \
|
||||
python-all \
|
||||
python-all-dbg \
|
||||
python-all-dev \
|
||||
python-backports.ssl-match-hostname \
|
||||
python-ipaddress \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python-six \
|
||||
python-tornado \
|
||||
python-twisted \
|
||||
python-wheel \
|
||||
python-zope.interface \
|
||||
python3-all \
|
||||
python3-all-dbg \
|
||||
python3-all-dev \
|
||||
python3-setuptools \
|
||||
python3-six \
|
||||
python3-tornado \
|
||||
python3-twisted \
|
||||
python3-wheel \
|
||||
python3-zope.interface && \
|
||||
pip install --upgrade backports.ssl_match_hostname
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Ruby dependencies` \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
ruby-bundler
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# Rust dependencies` \
|
||||
cargo \
|
||||
rustc
|
||||
|
||||
# Clean up
|
||||
RUN rm -rf /var/cache/apt/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /var/tmp/*
|
||||
|
||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
|
||||
ENV THRIFT_ROOT /thrift
|
||||
RUN mkdir -p $THRIFT_ROOT/src
|
||||
COPY Dockerfile $THRIFT_ROOT/
|
||||
WORKDIR $THRIFT_ROOT/src
|
209
vendor/git.apache.org/thrift.git/build/docker/ubuntu/Dockerfile
generated
vendored
209
vendor/git.apache.org/thrift.git/build/docker/ubuntu/Dockerfile
generated
vendored
|
@ -1,209 +0,0 @@
|
|||
# Licensed 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.
|
||||
|
||||
# Apache Thrift Docker build environment for Centos
|
||||
#
|
||||
# Known missing client libraries:
|
||||
# - None
|
||||
|
||||
FROM buildpack-deps:trusty-scm
|
||||
MAINTAINER Apache Thrift <dev@thrift.apache.org>
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Add apt sources
|
||||
# Erlang
|
||||
RUN echo 'deb http://packages.erlang-solutions.com/debian trusty contrib' > /etc/apt/sources.list.d/erlang_solutions.list && \
|
||||
curl -sSL https://packages.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add -
|
||||
# Dart
|
||||
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
|
||||
sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g'
|
||||
|
||||
# Consider using mirror nearby when building locally
|
||||
# TODO: Provide option via --build-arg=...
|
||||
# RUN sed -i /etc/apt/sources.list -e 's!http://archive.ubuntu.com/ubuntu/!http://your/mirror/!g'
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# General dependencies` \
|
||||
bison \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
debhelper \
|
||||
flex \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
`# Included in buildpack-deps` \
|
||||
`# autoconf` \
|
||||
`# automake` \
|
||||
`# g++` \
|
||||
`# git` \
|
||||
`# libtool` \
|
||||
`# make`
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# C++ dependencies` \
|
||||
`# libevent and OpenSSL are needed by D too` \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-system-dev \
|
||||
libboost-test-dev \
|
||||
libboost-thread-dev \
|
||||
libevent-dev \
|
||||
libssl-dev \
|
||||
qt5-default \
|
||||
qtbase5-dev \
|
||||
qtbase5-dev-tools
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# Java dependencies` \
|
||||
ant \
|
||||
ant-optional \
|
||||
openjdk-7-jdk \
|
||||
maven
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# Python dependencies` \
|
||||
`# TODO:` \
|
||||
`# Install twisted and zope.interface via pip. we need twisted at ./configure time, otherwise` \
|
||||
`# py.twisted tests are skipped.` \
|
||||
python-all \
|
||||
python-all-dbg \
|
||||
python-all-dev \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python-twisted \
|
||||
python-zope.interface \
|
||||
python3-all \
|
||||
python3-all-dbg \
|
||||
python3-all-dev \
|
||||
python3-setuptools \
|
||||
python3-pip
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# Ruby dependencies` \
|
||||
ruby \
|
||||
ruby-bundler \
|
||||
ruby-dev \
|
||||
`# Perl dependencies` \
|
||||
libbit-vector-perl \
|
||||
libclass-accessor-class-perl \
|
||||
libcrypt-ssleay-perl \
|
||||
libio-socket-ssl-perl \
|
||||
libnet-ssleay-perl
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# Php dependencies` \
|
||||
php5 \
|
||||
php5-dev \
|
||||
php5-cli \
|
||||
php-pear \
|
||||
re2c \
|
||||
phpunit \
|
||||
`# GlibC dependencies` \
|
||||
libglib2.0-dev
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# Erlang dependencies` \
|
||||
erlang-base \
|
||||
erlang-eunit \
|
||||
erlang-dev \
|
||||
erlang-tools \
|
||||
rebar
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# Haskell dependencies` \
|
||||
ghc \
|
||||
cabal-install \
|
||||
`# Haxe dependencies` \
|
||||
neko \
|
||||
neko-dev \
|
||||
libneko0
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# Node.js dependencies` \
|
||||
nodejs \
|
||||
nodejs-dev \
|
||||
nodejs-legacy
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# CSharp dependencies` \
|
||||
libmono-system-web2.0-cil \
|
||||
mono-devel
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
`# D dependencies` \
|
||||
xdg-utils \
|
||||
`# Dart dependencies` \
|
||||
dart \
|
||||
`# Lua dependencies` \
|
||||
lua5.2 \
|
||||
lua5.2-dev \
|
||||
`# MinGW dependencies` \
|
||||
mingw32 \
|
||||
mingw32-binutils \
|
||||
mingw32-runtime \
|
||||
nsis \
|
||||
`# Clean up` \
|
||||
&& rm -rf /var/cache/apt/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /var/tmp/*
|
||||
|
||||
# Ruby
|
||||
RUN gem install bundler --no-ri --no-rdoc
|
||||
|
||||
# Python optional dependencies
|
||||
RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado
|
||||
RUN pip3 install -U backports.ssl_match_hostname tornado
|
||||
|
||||
# Go
|
||||
RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
|
||||
ENV PATH /usr/local/go/bin:$PATH
|
||||
|
||||
# Haxe
|
||||
RUN mkdir -p /usr/lib/haxe && \
|
||||
curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz | \
|
||||
tar -C /usr/lib/haxe --strip-components=1 -xz && \
|
||||
ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
|
||||
ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
|
||||
mkdir -p /usr/lib/haxe/lib && \
|
||||
chmod -R 777 /usr/lib/haxe/lib && \
|
||||
haxelib setup /usr/lib/haxe/lib && \
|
||||
haxelib install hxcpp
|
||||
|
||||
# Node.js
|
||||
RUN curl -sSL https://www.npmjs.com/install.sh | sh
|
||||
|
||||
# D
|
||||
RUN curl -sSL http://downloads.dlang.org/releases/2.x/2.070.0/dmd_2.070.0-0_amd64.deb -o /tmp/dmd_2.070.0-0_amd64.deb && \
|
||||
dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
|
||||
rm /tmp/dmd_2.070.0-0_amd64.deb && \
|
||||
curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
|
||||
curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
|
||||
mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
|
||||
mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
|
||||
mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
|
||||
rm -rf libevent-master openssl-master && \
|
||||
echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
|
||||
chmod 755 /usr/local/bin/gcc-dmd && \
|
||||
echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
|
||||
|
||||
# Dart
|
||||
ENV PATH /usr/lib/dart/bin:$PATH
|
||||
|
||||
ENV THRIFT_ROOT /thrift
|
||||
RUN mkdir -p $THRIFT_ROOT/src
|
||||
COPY Dockerfile $THRIFT_ROOT/
|
||||
WORKDIR $THRIFT_ROOT/src
|
219
vendor/git.apache.org/thrift.git/build/wincpp/README.md
generated
vendored
Normal file
219
vendor/git.apache.org/thrift.git/build/wincpp/README.md
generated
vendored
Normal file
|
@ -0,0 +1,219 @@
|
|||
<!---
|
||||
Licensed 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.
|
||||
-->
|
||||
|
||||
# Building thrift on Windows (Native)
|
||||
|
||||
Thrift uses cmake to make it easier to build the project on multiple platforms, however to build a fully functional and production ready thrift on Windows requires a number of third party libraries to be obtained or built. Once third party libraries are ready, the right combination of options must be passed to cmake in order to generate the correct environment.
|
||||
|
||||
## Summary
|
||||
|
||||
These instructions will help you build thrift for windows using Visual
|
||||
Studio 2010 or later. The contributed batch files will help you build
|
||||
the third party libraries needed for complete thrift functionality as
|
||||
well as thrift itself.
|
||||
|
||||
These instructions follow a directory layout that looks like the following:
|
||||
|
||||
workspace\
|
||||
build\ - this is where the out-of-tree thrift cmake builds are generated
|
||||
dist\ - this is where the thrift build results end up
|
||||
thirdparty\ - this is where all third party binaries and libraries live
|
||||
build\ - this is where all third party out-of-tree builds are generated
|
||||
(except for openssl, which only builds in-tree)
|
||||
dist\ - this is where all third party distributions end up
|
||||
src\ - this is where all third party source projects live
|
||||
scripts\ - batch files used to set environment variables for builds
|
||||
thrift\ - this is where the thrift source project lives
|
||||
|
||||
Create a "workspace" directory somewhere on your system and then copy the contents of this
|
||||
directory to there, then clone or unpack thrift into `workspace\thrift`.
|
||||
|
||||
## Third Party Libraries
|
||||
|
||||
Batch scripts are provided to build some third party libraries. You must download them and place them into the directory noted for each. You can use different versions if you prefer; these instructions were made with the versions listed.
|
||||
|
||||
> TIP: To modify the versions used in the batch scripts, look in scripts\tpversions.bat.
|
||||
|
||||
Build them in the order listed to satisfy their dependencies.
|
||||
|
||||
### winflexbison
|
||||
|
||||
source: web site
|
||||
location: https://sourceforge.net/projects/winflexbison/files/win_flex_bison-latest.zip/download
|
||||
version: "latest"
|
||||
directory: workspace\thirdparty\dist\winflexbison
|
||||
|
||||
This package is required to build the compiler. This third party package does not need to be built as it is a binary distribution of the "bison" and "flex" tools normally found on Unix boxes.
|
||||
|
||||
> TIP: If you are only interested in building the compiler, you can skip the remaining third party libraries.
|
||||
|
||||
### zlib
|
||||
|
||||
source: web site
|
||||
location: http://zlib.net/
|
||||
version: 1.2.9
|
||||
directory: workspace\thirdparty\src\zlib-1.2.9
|
||||
|
||||
To build, open the appropriate Visual Studio command prompt and then run
|
||||
the build-zlib.bat script in thirdparty\src.
|
||||
|
||||
### openssl
|
||||
|
||||
source: web site
|
||||
location: https://www.openssl.org/
|
||||
version: 1.1.0c
|
||||
directory: workspace\thirdparty\src\openssl-1.1.0c
|
||||
depends-on: zlib
|
||||
|
||||
If you are using openssl-1.1.0 or later, they changed static builds to use Microsoft Static RTL for release builds. zlib by default uses a dynamic runtime, as does libevent. Edit the file Configurations/10-main.conf and replace the section contents for "VC-noCE-common" with what appears below to make openssl build with dynamic runtime instead:
|
||||
|
||||
"VC-noCE-common" => {
|
||||
inherit_from => [ "VC-common" ],
|
||||
template => 1,
|
||||
cflags => add(picker(default => "-DUNICODE -D_UNICODE",
|
||||
debug => "/MDd /Od -DDEBUG -D_DEBUG",
|
||||
release => "/MD /O2"
|
||||
)),
|
||||
bin_cflags => add(picker(debug => "/MDd",
|
||||
release => "/MD",
|
||||
)),
|
||||
bin_lflags => add("/subsystem:console /opt:ref"),
|
||||
ex_libs => add(sub {
|
||||
my @ex_libs = ();
|
||||
push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
|
||||
push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
|
||||
return join(" ", @ex_libs);
|
||||
}),
|
||||
},
|
||||
|
||||
To build, open the appropriate Visual Studio command prompt and then run
|
||||
the build-openssl.bat script in thirdparty\src.
|
||||
|
||||
### libevent
|
||||
|
||||
source: git
|
||||
location: https://github.com/nmathewson/Libevent.git
|
||||
use: commit 3821cca1a637f4da4099c9343e7326da00f6981c or later
|
||||
date: Fri Dec 23 16:19:35 2016 +0800 or later
|
||||
version: corresponds to 2.1.7rc + patches
|
||||
directory: workspace\thirdparty\src\libevent-2.1.7rc2
|
||||
depends-on: openssl, zlib
|
||||
|
||||
To build, open the appropriate Visual Studio command prompt and then run
|
||||
the build-libevent.bat script in thirdparty\src.
|
||||
|
||||
### msinttypes
|
||||
|
||||
source: web site
|
||||
location: https://code.google.com/archive/p/msinttypes/downloads
|
||||
version: 26
|
||||
directory: workspace\thirdparty\dist\msinttypes
|
||||
|
||||
> TIP: This is only necessary for Visual Studio 2010, which did not include an <inttypes.h> header.
|
||||
|
||||
This third party package does not need to be built as it is a distribution of header files.
|
||||
|
||||
### boost
|
||||
|
||||
source: web site
|
||||
location: http://boost.teeks99.com/
|
||||
version: 1_62_0
|
||||
directory: workspace\thirdparty\dist\boost_1_62_0
|
||||
|
||||
The pre-built binary versions of boost come in self-unpacking executables. Run each of the ones you are interested in and point them at the same thirdparty dist directory.
|
||||
|
||||
## Building a Production thrift Compiler
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* CMake-2.8.12.2 or later
|
||||
* Visual Studio 2010 or later
|
||||
* thrift source placed into workspace\thrift
|
||||
* winflexbison placed into workspace\thirdparty\dist
|
||||
|
||||
### Instructions
|
||||
|
||||
By following these instructions you will end up with a release mode thrift compiler that is suitable for distribution as it has no external dependencies.
|
||||
|
||||
1. Open the appropriate Visual Studio Command Prompt.
|
||||
2. `cd workspace`
|
||||
3. `build-thrift-compiler.bat`
|
||||
|
||||
The batch file uses CMake to generate an out-of-tree build directory in `workspace\build` and then builds the compiler. The resulting `thrift.exe` program is placed into `workspace\dist` in a path that depends on your compiler version and platform. For example, if you use a Visual Studio 2010 x64 Command Prompt, the compiler will be placed into `workspace\dist\thrift-compiler-dev\vc100\x64\Release\thrift.exe`
|
||||
|
||||
#### Details
|
||||
|
||||
This section is for those who are curious about the CMake options used in the build process.
|
||||
|
||||
CMake takes the source tree as the first argument and uses the remaining arguments for configuration. The batch file `build-thrift-compiler` essentially performs the following commands:
|
||||
|
||||
C:\> CD workspace\build
|
||||
C:\workspace\build> "C:\Program Files\CMake\bin\cmake.exe" ..\thrift
|
||||
-DBISON_EXECUTABLE=..\thirdparty\dist\winflexbison\win_bison.exe
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DFLEX_EXECUTABLE=..\thirdparty\dist\winflexbison\win_flex.exe
|
||||
-DWITH_MT=ON
|
||||
-DWITH_SHARED_LIB=OFF
|
||||
-G"NMake Makefiles"
|
||||
C:\workspace\build> NMAKE /FMakefile thrift-compiler
|
||||
|
||||
WITH_MT controls the dynamic or static runtime library selection. To build a production compiler, the thrift project recommends using the static runtime library to make the executable portable. The batch file sets this.
|
||||
|
||||
You can build a Visual Studio project file by following the example but substituting a different generator for the "-G" option. Run `cmake.exe --help` for a list of generators. Typically, this is one of the following on Windows (omit "Win64" to build 32-bit instead):
|
||||
|
||||
* "Visual Studio 10 2010 Win64"
|
||||
* "Visual Studio 11 2012 Win64"
|
||||
* "Visual Studio 12 2013 Win64"
|
||||
* "Visual Studio 14 2015 Win64"
|
||||
* "Visual Studio 15 2017 Win64"
|
||||
|
||||
For example you can build using a Visual Studio solution file on the command line by doing:
|
||||
|
||||
C:\> CD workspace\build
|
||||
C:\workspace\build> "C:\Program Files\CMake\bin\cmake.exe" ..\thrift
|
||||
-DBISON_EXECUTABLE=..\thirdparty\dist\winflexbison\win_bison.exe
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DFLEX_EXECUTABLE=..\thirdparty\dist\winflexbison\win_flex.exe
|
||||
-DWITH_MT=ON
|
||||
-DWITH_SHARED_LIB=OFF
|
||||
-G"Visual Studio 14 2015 Win64"
|
||||
C:\workspace\build> MSBUILD "Apache Thrift.sln" /p:Configuration=Release /p:Platform=x64 /t:thrift-compiler
|
||||
|
||||
You can also double-click on the solution file to bring it up in Visual Studio and build or debug interactively from there.
|
||||
|
||||
## Building the thrift C++ Run-Time Library
|
||||
|
||||
These instructions are similar to the compiler build however there are additional dependencies on third party libraries to build a feature-complete runtime. The resulting static link library for thrift uses a dynamic Microsoft runtime.
|
||||
|
||||
1. Open the desired Visual Studio Command Prompt.
|
||||
2. `cd workspace`
|
||||
3. `build-thrift.bat`
|
||||
|
||||
Thrift depends on boost, libevent, openssl, and zlib in order to build with all server and transport types. To use later versions of boost like 1.62 you will need a recent version of cmake (at least 3.7).
|
||||
|
||||
The build-thrift script has options to build debug or release and to optionally disable any of the generation (cmake), build, or test phases. By default, the batch file will generate an out-of-tree build directory inside `workspace\build`, then perform a release build, then run the unit tests. The batch file accepts some option flags to control its behavior:
|
||||
|
||||
:: Flags you can use to change this behavior:
|
||||
::
|
||||
:: /DEBUG - if building, perform a debug build instead
|
||||
:: /NOGENERATE - skip cmake generation - useful if you
|
||||
:: have already generated a solution and just
|
||||
:: want to build
|
||||
:: /NOBUILD - skip cmake build - useful if you just
|
||||
:: want to generate a solution
|
||||
:: /NOTEST - skip ctest execution
|
||||
|
||||
For example if you want to generate the cmake environment without building or running tests:
|
||||
|
||||
C:\workspace> build-thrift.bat /NOBUILD /NOTEST
|
79
vendor/git.apache.org/thrift.git/build/wincpp/build-thrift-compiler.bat
generated
vendored
Normal file
79
vendor/git.apache.org/thrift.git/build/wincpp/build-thrift-compiler.bat
generated
vendored
Normal file
|
@ -0,0 +1,79 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Produces a production thrift compiler suitable for redistribution.
|
||||
:: The compiler is linked to runtime statically for maximum portability.
|
||||
:: Assumes the thirdparty files for "winflexbison" have been placed
|
||||
:: according to the README.md instructions.
|
||||
::
|
||||
:: Open a Visual Studio Command Prompt of your choosing and then
|
||||
:: run this script.
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
IF NOT DEFINED PACKAGE_NAME SET PACKAGE_NAME=thrift
|
||||
IF NOT DEFINED PACKAGE_VERSION SET PACKAGE_VERSION=dev
|
||||
IF NOT DEFINED SOURCE_DIR SET SOURCEDIR=%~dp0%PACKAGE_NAME%
|
||||
IF NOT DEFINED WIN3P_ROOT SET WIN3P_ROOT=%~dp0thirdparty
|
||||
|
||||
:: Set COMPILER to (vc100 - vc140) depending on the current environment
|
||||
CALL scripts\cl_setcompiler.bat || EXIT /B
|
||||
|
||||
:: Set ARCH to either win32 or x64 depending on the current environment
|
||||
CALL scripts\cl_setarch.bat || EXIT /B
|
||||
|
||||
:: Set GENERATOR for CMake depending on the current environment
|
||||
CALL scripts\cl_setgenerator.bat || EXIT /B
|
||||
|
||||
IF NOT DEFINED BUILDTYPE (
|
||||
SET BUILDTYPE=Release
|
||||
)
|
||||
|
||||
SET BUILDDIR=%~dp0build\%PACKAGE_NAME%-compiler\%PACKAGE_VERSION%\%COMPILER%\
|
||||
SET OUTDIR=%~dp0dist\%PACKAGE_NAME%-compiler-%PACKAGE_VERSION%\%COMPILER%\%ARCH%\%BUILDTYPE%\
|
||||
SET BOOST_LIBDIR=lib%ARCH:~-2,2%-msvc-%COMPILER:~-3,2%.0
|
||||
IF "%BUILDTYPE%" == "Debug" (SET ZLIB_STATIC_SUFFIX=d)
|
||||
|
||||
ECHO/
|
||||
ECHO =========================================================================
|
||||
ECHO Configuration: %PACKAGE_NAME% %PACKAGE_VERSION% %COMPILER%:%ARCH%:%BUILDTYPE% "%GENERATOR%"
|
||||
IF DEFINED COMPILERONLY (
|
||||
ECHO COMPILER ONLY
|
||||
)
|
||||
ECHO Build Directory: %BUILDDIR%
|
||||
ECHO Install Directory: %OUTDIR%
|
||||
ECHO Source Directory: %SOURCEDIR%
|
||||
ECHO =========================================================================
|
||||
ECHO/
|
||||
|
||||
MKDIR "%BUILDDIR%"
|
||||
CD "%BUILDDIR%" || EXIT /B
|
||||
|
||||
CMAKE.EXE %~dp0thrift ^
|
||||
-G"%GENERATOR%" ^
|
||||
-DBISON_EXECUTABLE=%WIN3P_ROOT%\dist\winflexbison\win_bison.exe ^
|
||||
-DCMAKE_BUILD_TYPE=%BUILDTYPE% ^
|
||||
-DFLEX_EXECUTABLE=%WIN3P_ROOT%\dist\winflexbison\win_flex.exe ^
|
||||
-DWITH_MT=ON ^
|
||||
-DWITH_SHARED_LIB=OFF || EXIT /B
|
||||
|
||||
CD %BUILDDIR%
|
||||
|
||||
CMAKE.EXE --build . --config %BUILDTYPE% --target thrift-compiler || EXIT /B
|
||||
XCOPY /F /Y %BUILDDIR%\bin\%BUILDTYPE%\thrift.exe %OUTDIR%
|
||||
|
||||
ENDLOCAL
|
||||
EXIT /B
|
164
vendor/git.apache.org/thrift.git/build/wincpp/build-thrift.bat
generated
vendored
Normal file
164
vendor/git.apache.org/thrift.git/build/wincpp/build-thrift.bat
generated
vendored
Normal file
|
@ -0,0 +1,164 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Generates a Visual Studio solution for thrift and then builds it.
|
||||
:: Assumes third party libraries have been built or placed already.
|
||||
::
|
||||
:: Open a Visual Studio Command Prompt of your choosing and then
|
||||
:: run this script.
|
||||
::
|
||||
:: Normally the script will run cmake to generate a solution, then
|
||||
:: perform a build, then run tests on the complete thrift library
|
||||
:: in release mode.
|
||||
::
|
||||
:: Flags you can use to change this behavior:
|
||||
::
|
||||
:: /DEBUG - debug instead of release
|
||||
:: /IDE - launch Visual Studio with a path set
|
||||
:: up correctly to run tests instead of
|
||||
:: performing any other actions, i.e.
|
||||
:: implies setting the next three flags
|
||||
:: /NOGENERATE - skip cmake generation - useful if you
|
||||
:: have already generated a solution and just
|
||||
:: want to build
|
||||
:: /NOBUILD - skip cmake build - useful if you just
|
||||
:: want to generate a solution
|
||||
:: /NOTEST - skip ctest execution
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
:: Sets variables for third party versions used in build
|
||||
CALL scripts\tpversions.bat || EXIT /B
|
||||
|
||||
IF NOT DEFINED PACKAGE_NAME SET PACKAGE_NAME=thrift
|
||||
IF NOT DEFINED PACKAGE_VERSION SET PACKAGE_VERSION=dev
|
||||
IF NOT DEFINED SOURCE_DIR SET SOURCEDIR=%~dp0%PACKAGE_NAME%
|
||||
IF NOT DEFINED WIN3P_ROOT SET WIN3P_ROOT=%~dp0thirdparty
|
||||
|
||||
:: Set COMPILER to (vc100 - vc140) depending on the current environment
|
||||
CALL scripts\cl_setcompiler.bat || EXIT /B
|
||||
|
||||
:: Set ARCH to either win32 or x64 depending on the current environment
|
||||
CALL scripts\cl_setarch.bat || EXIT /B
|
||||
|
||||
:: Set GENERATOR for CMake depending on the current environment
|
||||
CALL scripts\cl_setgenerator.bat || EXIT /B
|
||||
|
||||
:: Defaults
|
||||
|
||||
IF NOT DEFINED BUILDTYPE SET BUILDTYPE=Release
|
||||
SET OPT_IDE=0
|
||||
SET OPT_BUILD=1
|
||||
SET OPT_GENERATE=1
|
||||
SET OPT_TEST=1
|
||||
|
||||
:: Apply Flags
|
||||
|
||||
IF /I "%1" == "/DEBUG" SET BUILDTYPE=Debug
|
||||
IF /I "%2" == "/DEBUG" SET BUILDTYPE=Debug
|
||||
IF /I "%3" == "/DEBUG" SET BUILDTYPE=Debug
|
||||
IF /I "%1" == "/IDE" SET OPT_IDE=1
|
||||
IF /I "%2" == "/IDE" SET OPT_IDE=1
|
||||
IF /I "%3" == "/IDE" SET OPT_IDE=1
|
||||
IF /I "%1" == "/NOBUILD" SET OPT_BUILD=0
|
||||
IF /I "%2" == "/NOBUILD" SET OPT_BUILD=0
|
||||
IF /I "%3" == "/NOBUILD" SET OPT_BUILD=0
|
||||
IF /I "%1" == "/NOGENERATE" SET OPT_GENERATE=0
|
||||
IF /I "%2" == "/NOGENERATE" SET OPT_GENERATE=0
|
||||
IF /I "%3" == "/NOGENERATE" SET OPT_GENERATE=0
|
||||
IF /I "%1" == "/NOTEST" SET OPT_TEST=0
|
||||
IF /I "%2" == "/NOTEST" SET OPT_TEST=0
|
||||
IF /I "%3" == "/NOTEST" SET OPT_TEST=0
|
||||
|
||||
IF %OPT_IDE% == 1 (
|
||||
SET OPT_GENERATE=0
|
||||
SET OPT_BUILD=0
|
||||
SET OPT_TEST=0
|
||||
)
|
||||
|
||||
SET BUILDDIR=%~dp0build\%PACKAGE_NAME%\%PACKAGE_VERSION%\%COMPILER%\%ARCH%\
|
||||
SET OUTDIR=%~dp0dist\%PACKAGE_NAME%-%PACKAGE_VERSION%\%COMPILER%\%ARCH%\%BUILDTYPE%\
|
||||
SET BOOST_LIBDIR=lib%ARCH:~-2,2%-msvc-%COMPILER:~-3,2%.0
|
||||
IF "%BUILDTYPE%" == "Debug" (SET ZLIB_STATIC_SUFFIX=d)
|
||||
|
||||
ECHO/
|
||||
ECHO =========================================================================
|
||||
ECHO Configuration: %PACKAGE_NAME% %PACKAGE_VERSION% %COMPILER%:%ARCH%:%BUILDTYPE% "%GENERATOR%"
|
||||
IF DEFINED COMPILERONLY (
|
||||
ECHO COMPILER ONLY
|
||||
)
|
||||
ECHO Build Directory: %BUILDDIR%
|
||||
ECHO Install Directory: %OUTDIR%
|
||||
ECHO Source Directory: %SOURCEDIR%
|
||||
ECHO =========================================================================
|
||||
ECHO/
|
||||
|
||||
IF %OPT_IDE% == 1 (
|
||||
|
||||
CALL :SETRUNPATH || EXIT /B
|
||||
CALL DEVENV "!BUILDDIR!Apache Thrift.sln" || EXIT /B
|
||||
EXIT /B
|
||||
|
||||
)
|
||||
|
||||
MKDIR "%BUILDDIR%"
|
||||
CD "%BUILDDIR%" || EXIT /B
|
||||
|
||||
IF %OPT_GENERATE% == 1 (
|
||||
|
||||
CMAKE.EXE %~dp0thrift ^
|
||||
-G"%GENERATOR%" ^
|
||||
-DBISON_EXECUTABLE=%WIN3P_ROOT%\dist\winflexbison\win_bison.exe ^
|
||||
-DBOOST_ROOT=%WIN3P_ROOT%\dist\boost_%TP_BOOST_VERSION% ^
|
||||
-DBOOST_LIBRARYDIR=%WIN3P_ROOT%\dist\boost_%TP_BOOST_VERSION%\%BOOST_LIBDIR% ^
|
||||
-DCMAKE_INSTALL_PREFIX=%OUTDIR% ^
|
||||
-DCMAKE_BUILD_TYPE=%BUILDTYPE% ^
|
||||
-DFLEX_EXECUTABLE=%WIN3P_ROOT%\dist\winflexbison\win_flex.exe ^
|
||||
-DINTTYPES_ROOT=%WIN3P_ROOT%\dist\msinttypes ^
|
||||
-DLIBEVENT_ROOT=%WIN3P_ROOT%\dist\libevent-%TP_LIBEVENT_VERSION%\%COMPILER%\%ARCH%\%BUILDTYPE% ^
|
||||
-DOPENSSL_ROOT_DIR=%WIN3P_ROOT%\dist\openssl-%TP_OPENSSL_VERSION%\%COMPILER%\%ARCH%\%BUILDTYPE%\dynamic ^
|
||||
-DOPENSSL_USE_STATIC_LIBS=OFF ^
|
||||
-DZLIB_LIBRARY=%WIN3P_ROOT%\dist\zlib-%TP_ZLIB_VERSION%\%COMPILER%\%ARCH%\lib\zlib%ZLIB_LIB_SUFFIX%.lib ^
|
||||
-DZLIB_ROOT=%WIN3P_ROOT%\dist\zlib-%TP_ZLIB_VERSION%\%COMPILER%\%ARCH% ^
|
||||
-DWITH_BOOSTTHREADS=ON ^
|
||||
-DWITH_SHARED_LIB=OFF ^
|
||||
-DWITH_STATIC_LIB=ON || EXIT /B
|
||||
|
||||
)
|
||||
|
||||
IF %OPT_BUILD% == 1 (
|
||||
|
||||
CD %BUILDDIR%
|
||||
CMAKE.EXE --build . --config %BUILDTYPE% --target INSTALL || EXIT /B
|
||||
|
||||
)
|
||||
|
||||
IF %OPT_TEST% == 1 (
|
||||
|
||||
CALL :SETRUNPATH || EXIT /B
|
||||
CMAKE.EXE --build . --config %BUILDTYPE% --target RUN_TESTS || EXIT /B
|
||||
|
||||
)
|
||||
|
||||
:SETRUNPATH
|
||||
SET PATH=!PATH!;%WIN3P_ROOT%\dist\boost_%TP_BOOST_VERSION%\%BOOST_LIBDIR%
|
||||
SET PATH=!PATH!;%WIN3P_ROOT%\dist\openssl-%TP_OPENSSL_VERSION%\%COMPILER%\%ARCH%\%BUILDTYPE%\dynamic\bin
|
||||
SET PATH=!PATH!;%WIN3P_ROOT%\dist\zlib-%TP_ZLIB_VERSION%\%COMPILER%\%ARCH%\bin
|
||||
EXIT /B
|
||||
|
||||
ENDLOCAL
|
||||
EXIT /B
|
47
vendor/git.apache.org/thrift.git/build/wincpp/scripts/cl_setarch.bat
generated
vendored
Normal file
47
vendor/git.apache.org/thrift.git/build/wincpp/scripts/cl_setarch.bat
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Detect the architecture we're building for.
|
||||
:: Set the ARCH environment variable to one of:
|
||||
:: win32
|
||||
:: x64
|
||||
::
|
||||
:: Honors any existing ARCH environment variable
|
||||
:: setting instead of overwriting it, to allow it
|
||||
:: to be forced if needed.
|
||||
::
|
||||
:: Sets ERRORLEVEL to 0 if ARCH can be determined,
|
||||
:: to 1 if it cannot.
|
||||
::
|
||||
|
||||
IF DEFINED ARCH (
|
||||
ECHO [warn ] using existing environment variable ARCH
|
||||
EXIT /B 0
|
||||
)
|
||||
|
||||
CALL :CHECK x64
|
||||
IF %ERRORLEVEL% == 0 (SET ARCH=x64) ELSE (SET ARCH=win32)
|
||||
|
||||
IF NOT DEFINED ARCH (
|
||||
ECHO [error] unable to determine the target architecture
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
ECHO [info ] detected target architecture %ARCH%
|
||||
EXIT /B 0
|
||||
|
||||
:CHECK
|
||||
cl /? 2>&1 | findstr /C:" for %1%" > nul
|
||||
EXIT /B %ERRORLEVEL%
|
58
vendor/git.apache.org/thrift.git/build/wincpp/scripts/cl_setcompiler.bat
generated
vendored
Normal file
58
vendor/git.apache.org/thrift.git/build/wincpp/scripts/cl_setcompiler.bat
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Detect the compiler edition we're building in.
|
||||
:: Set the COMPILER environment variable to one of:
|
||||
:: vc100 = Visual Studio 2010
|
||||
:: vc110 = Visual Studio 2012
|
||||
:: vc120 = Visual Studio 2013
|
||||
:: vc140 = Visual Studio 2015
|
||||
:: vc150 = Visual Studio 2017
|
||||
::
|
||||
:: Honors any existing COMPILER environment variable
|
||||
:: setting instead of overwriting it, to allow it
|
||||
:: to be forced if needed.
|
||||
::
|
||||
:: Sets ERRORLEVEL to 0 if COMPILER can be determined,
|
||||
:: to 1 if it cannot.
|
||||
::
|
||||
|
||||
IF DEFINED COMPILER (
|
||||
ECHO [warn ] using existing environment variable COMPILER
|
||||
EXIT /B 0
|
||||
)
|
||||
|
||||
CALL :CHECK 16
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED COMPILER SET COMPILER=vc100)
|
||||
CALL :CHECK 17
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED COMPILER SET COMPILER=vc110)
|
||||
CALL :CHECK 18
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED COMPILER SET COMPILER=vc120)
|
||||
CALL :CHECK 19.00
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED COMPILER SET COMPILER=vc140)
|
||||
CALL :CHECK 19.10
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED COMPILER SET COMPILER=vc150)
|
||||
|
||||
IF NOT DEFINED COMPILER (
|
||||
ECHO [error] unable to determine the compiler edition
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
ECHO [info ] detected compiler edition %COMPILER%
|
||||
EXIT /B 0
|
||||
|
||||
:CHECK
|
||||
cl /? 2>&1 | findstr /C:"Version %1%." > nul
|
||||
EXIT /B %ERRORLEVEL%
|
69
vendor/git.apache.org/thrift.git/build/wincpp/scripts/cl_setgenerator.bat
generated
vendored
Normal file
69
vendor/git.apache.org/thrift.git/build/wincpp/scripts/cl_setgenerator.bat
generated
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Detect the compiler edition we're building in and then
|
||||
:: set the GENERATOR environment variable to one of:
|
||||
::
|
||||
:: Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
|
||||
:: Optional [arch] can be "Win64" or "ARM".
|
||||
:: Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
|
||||
:: Optional [arch] can be "Win64" or "ARM".
|
||||
:: Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
|
||||
:: Optional [arch] can be "Win64" or "ARM".
|
||||
:: Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
|
||||
:: Optional [arch] can be "Win64" or "ARM".
|
||||
:: Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
|
||||
:: Optional [arch] can be "Win64" or "IA64".
|
||||
::
|
||||
:: Honors any existing GENERATOR environment variable
|
||||
:: setting instead of overwriting it, to allow it
|
||||
:: to be forced if needed.
|
||||
::
|
||||
:: Sets ERRORLEVEL to 0 if GENERATOR can be determined,
|
||||
:: to 1 if it cannot.
|
||||
::
|
||||
:: Requires cl_setarch.bat to have been executed or the ARCH environment
|
||||
:: variable to be set.
|
||||
::
|
||||
|
||||
IF "%ARCH%" == "x64" (SET GENARCH= Win64)
|
||||
|
||||
IF DEFINED GENERATOR (
|
||||
ECHO [warn ] using existing environment variable GENERATOR
|
||||
EXIT /B 0
|
||||
)
|
||||
|
||||
CALL :CHECK 16
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED GENERATOR SET GENERATOR=Visual Studio 10 2010%GENARCH%)
|
||||
CALL :CHECK 17
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED GENERATOR SET GENERATOR=Visual Studio 11 2012%GENARCH%)
|
||||
CALL :CHECK 18
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED GENERATOR SET GENERATOR=Visual Studio 12 2013%GENARCH%)
|
||||
CALL :CHECK 19.00
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED GENERATOR SET GENERATOR=Visual Studio 14 2015%GENARCH%)
|
||||
CALL :CHECK 19.10
|
||||
IF %ERRORLEVEL% == 0 (IF NOT DEFINED GENERATOR SET GENERATOR=Visual Studio 15 2017%GENARCH%)
|
||||
|
||||
IF NOT DEFINED GENERATOR (
|
||||
ECHO [error] unable to determine the CMake generator to use
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
ECHO [info ] using CMake generator %GENERATOR%
|
||||
EXIT /B 0
|
||||
|
||||
:CHECK
|
||||
cl /? 2>&1 | findstr /C:"Version %1%." > nul
|
||||
EXIT /B %ERRORLEVEL%
|
24
vendor/git.apache.org/thrift.git/build/wincpp/scripts/tpversions.bat
generated
vendored
Normal file
24
vendor/git.apache.org/thrift.git/build/wincpp/scripts/tpversions.bat
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Set the versions of third party libraries to use.
|
||||
::
|
||||
|
||||
IF NOT DEFINED TP_BOOST_VERSION SET TP_BOOST_VERSION=1_62_0
|
||||
IF NOT DEFINED TP_LIBEVENT_VERSION SET TP_LIBEVENT_VERSION=2.1.7rc2
|
||||
IF NOT DEFINED TP_OPENSSL_VERSION SET TP_OPENSSL_VERSION=1.1.0c
|
||||
IF NOT DEFINED TP_ZLIB_VERSION SET TP_ZLIB_VERSION=1.2.9
|
||||
|
||||
EXIT /B 0
|
86
vendor/git.apache.org/thrift.git/build/wincpp/thirdparty/src/build-libevent.bat
generated
vendored
Normal file
86
vendor/git.apache.org/thrift.git/build/wincpp/thirdparty/src/build-libevent.bat
generated
vendored
Normal file
|
@ -0,0 +1,86 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Build script for libevent on windows
|
||||
:: Use libevent master from github which has cmake integration
|
||||
:: Uses the environment set up by a Visual Studio Command Prompt shortcut
|
||||
:: to target a specific architecture and compiler
|
||||
::
|
||||
:: Creates a static link library.
|
||||
:: Links against OpenSSL and zlib statically.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
:: Sets variables for third party versions used in build
|
||||
CALL ..\..\scripts\tpversions.bat || EXIT /B
|
||||
|
||||
:: use "build-libevent.bat /yes" to skip the question part
|
||||
IF /I "%1" == "/YES" SET NOASK=1
|
||||
|
||||
:: Set COMPILER to (vc100 - vc140) depending on the current environment
|
||||
CALL ..\..\scripts\cl_setcompiler.bat || EXIT /B
|
||||
|
||||
:: Set ARCH to either win32 or x64 depending on the current environment
|
||||
CALL ..\..\scripts\cl_setarch.bat || EXIT /B
|
||||
|
||||
IF NOT DEFINED GENERATOR SET GENERATOR=NMake Makefiles
|
||||
IF NOT DEFINED PACKAGE_NAME SET PACKAGE_NAME=libevent
|
||||
IF NOT DEFINED PACKAGE_VERSION SET PACKAGE_VERSION=%TP_LIBEVENT_VERSION%
|
||||
IF NOT DEFINED SOURCEDIR SET SOURCEDIR=%~dp0%PACKAGE_NAME%-%PACKAGE_VERSION%
|
||||
IF NOT DEFINED WIN3P_ROOT SET WIN3P_ROOT=%~dp0..
|
||||
|
||||
FOR %%X IN (
|
||||
Debug
|
||||
Release
|
||||
) DO (
|
||||
SET BUILDTYPE=%%X
|
||||
SET BUILDDIR=%WIN3P_ROOT%\build\%PACKAGE_NAME%\%PACKAGE_VERSION%\%COMPILER%\%ARCH%\!BUILDTYPE!
|
||||
SET OUTDIR=%WIN3P_ROOT%\dist\%PACKAGE_NAME%-%PACKAGE_VERSION%\%COMPILER%\%ARCH%\!BUILDTYPE!
|
||||
|
||||
IF "!BUILDTYPE!" == "Debug" (SET ZLIB_LIB_SUFFIX=d)
|
||||
|
||||
SET CMAKE_DEFS=^
|
||||
-DEVENT__DISABLE_SAMPLES=ON ^
|
||||
-DEVENT__DISABLE_TESTS=ON ^
|
||||
-DOPENSSL_USE_STATIC_LIBS=OFF ^
|
||||
-DOPENSSL_ROOT_DIR=%WIN3P_ROOT%\dist\openssl-%TP_OPENSSL_VERSION%\%COMPILER%\%ARCH%\!BUILDTYPE!\dynamic ^
|
||||
-DZLIB_LIBRARY=%WIN3P_ROOT%\dist\zlib-%TP_ZLIB_VERSION%\%COMPILER%\%ARCH%\lib\zlib!ZLIB_LIB_SUFFIX!.lib ^
|
||||
-DZLIB_ROOT=%WIN3P_ROOT%\dist\zlib-%TP_ZLIB_VERSION%\%COMPILER%\%ARCH%
|
||||
|
||||
ECHO/
|
||||
ECHO =========================================================================
|
||||
ECHO Building: %PACKAGE_NAME% v%PACKAGE_VERSION% %COMPILER%:%ARCH%:!BUILDTYPE! "%GENERATOR%"
|
||||
ECHO CMake Definitions: !CMAKE_DEFS!
|
||||
ECHO Build Directory: !BUILDDIR!
|
||||
ECHO Install Directory: !OUTDIR!
|
||||
ECHO Source Directory: %SOURCEDIR%
|
||||
ECHO =========================================================================
|
||||
ECHO/
|
||||
|
||||
IF NOT DEFINED NOASK (
|
||||
CHOICE /M "Do you want to build this configuration? " /c YN
|
||||
IF !ERRORLEVEL! NEQ 1 (EXIT /B !ERRORLEVEL!)
|
||||
)
|
||||
|
||||
MKDIR "!BUILDDIR!"
|
||||
CD "!BUILDDIR!" || EXIT /B
|
||||
|
||||
CMAKE.EXE -G"%GENERATOR%" -DCMAKE_INSTALL_PREFIX=!OUTDIR! -DCMAKE_BUILD_TYPE=!BUILDTYPE! !CMAKE_DEFS! "%SOURCEDIR%" || EXIT /B
|
||||
NMAKE /fMakefile install || EXIT /B
|
||||
)
|
||||
|
||||
ENDLOCAL
|
106
vendor/git.apache.org/thrift.git/build/wincpp/thirdparty/src/build-openssl.bat
generated
vendored
Normal file
106
vendor/git.apache.org/thrift.git/build/wincpp/thirdparty/src/build-openssl.bat
generated
vendored
Normal file
|
@ -0,0 +1,106 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Build script for openssl on windows
|
||||
:: openssl uses an in-tree build so you have to clean between each one
|
||||
::
|
||||
:: Uses the environment set up by a Visual Studio Command Prompt shortcut
|
||||
:: to target a specific architecture and compiler
|
||||
::
|
||||
:: If you use Lavasoft Ad-Aware, disable it for this build. It blocks the creation
|
||||
:: of any file named "clienthellotest.exe" for whatever reason, which breaks the build.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
:: Sets variables for third party versions used in build
|
||||
CALL ..\..\scripts\tpversions.bat || EXIT /B
|
||||
|
||||
:: use "build-openssl.bat /yes" to skip the question part
|
||||
IF /I "%1" == "/YES" SET NOASK=1
|
||||
|
||||
IF NOT DEFINED PACKAGE_NAME SET PACKAGE_NAME=openssl
|
||||
IF NOT DEFINED PACKAGE_VERSION SET PACKAGE_VERSION=%TP_OPENSSL_VERSION%
|
||||
IF NOT DEFINED SOURCEDIR SET SOURCEDIR=%~dp0%PACKAGE_NAME%-%PACKAGE_VERSION%
|
||||
IF NOT DEFINED WIN3P_ROOT SET WIN3P_ROOT=%~dp0..
|
||||
|
||||
:: Set COMPILER to (vc100 - vc140) depending on the current environment
|
||||
CALL ..\..\scripts\cl_setcompiler.bat || EXIT /B
|
||||
|
||||
:: Set ARCH to either win32 or x64 depending on the current environment
|
||||
CALL ..\..\scripts\cl_setarch.bat || EXIT /B
|
||||
|
||||
IF "%ARCH%" == "x64" (
|
||||
SET TODO=debug-VC-WIN64A VC-WIN64A
|
||||
) ELSE (
|
||||
SET TODO=debug-VC-WIN32 VC-WIN32
|
||||
)
|
||||
|
||||
FOR %%X IN ( !TODO! ) DO (
|
||||
SET BUILDTYPE=%%X
|
||||
FOR %%Y IN (
|
||||
nt
|
||||
ntdll
|
||||
) DO (
|
||||
SET LIBTYPE=%%Y
|
||||
|
||||
IF "!BUILDTYPE:~0,6!" == "debug-" (
|
||||
SET OUTBUILDTYPE=debug
|
||||
SET ZLIBLIBSUFFIX=d
|
||||
) ELSE (
|
||||
SET OUTBUILDTYPE=release
|
||||
SET ZLIBLIBSUFFIX=
|
||||
)
|
||||
|
||||
IF "!LIBTYPE!" == "ntdll" (
|
||||
SET BUILD_OPTIONS=shared
|
||||
SET OUTLIBTYPE=dynamic
|
||||
SET ZLIBLIB=zlib!ZLIBLIBSUFFIX!
|
||||
SET ZLIBOPT=zlib-dynamic
|
||||
) ELSE (
|
||||
SET BUILD_OPTIONS=no-shared
|
||||
SET OUTLIBTYPE=static
|
||||
SET ZLIBLIB=zlibstatic!ZLIBLIBSUFFIX!.lib
|
||||
SET ZLIBOPT=zlib
|
||||
)
|
||||
|
||||
SET LIB=%~dp0..\dist\zlib-%TP_ZLIB_VERSION%\!COMPILER!\!ARCH!\lib;!LIB!
|
||||
SET BUILD_OPTIONS=!BUILD_OPTIONS! no-asm no-unit-test !ZLIBOPT! --openssldir=ssl --with-zlib-include=%~dp0..\dist\zlib-%TP_ZLIB_VERSION%\!COMPILER!\!ARCH!\include --with-zlib-lib=!ZLIBLIB!
|
||||
SET OUTDIR=%WIN3P_ROOT%\dist\%PACKAGE_NAME%-%PACKAGE_VERSION%\%COMPILER%\%ARCH%\!OUTBUILDTYPE!\!OUTLIBTYPE!
|
||||
|
||||
ECHO/
|
||||
ECHO =========================================================================
|
||||
ECHO Building: %PACKAGE_NAME% %PACKAGE_VERSION% %COMPILER%:%ARCH%:!OUTBUILDTYPE!:!OUTLIBTYPE! [!BUILDTYPE!]
|
||||
ECHO Configure Options: !BUILD_OPTIONS!
|
||||
ECHO Install Directory: !OUTDIR!
|
||||
ECHO Source Directory: %SOURCEDIR%
|
||||
ECHO =========================================================================
|
||||
ECHO/
|
||||
|
||||
IF NOT DEFINED NOASK (
|
||||
CHOICE /M "Do you want to build this configuration? " /c YN
|
||||
IF !ERRORLEVEL! NEQ 1 (EXIT /B !ERRORLEVEL!)
|
||||
)
|
||||
|
||||
CD %SOURCEDIR% || EXIT /B
|
||||
perl Configure !BUILDTYPE! --prefix="!OUTDIR!" !BUILD_OPTIONS! || EXIT /B
|
||||
NMAKE /FMakefile install_sw || EXIT /B
|
||||
NMAKE /FMakefile clean || EXIT /B
|
||||
)
|
||||
)
|
||||
|
||||
ENDLOCAL
|
||||
EXIT /B
|
75
vendor/git.apache.org/thrift.git/build/wincpp/thirdparty/src/build-zlib.bat
generated
vendored
Normal file
75
vendor/git.apache.org/thrift.git/build/wincpp/thirdparty/src/build-zlib.bat
generated
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
::
|
||||
:: Licensed 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.
|
||||
::
|
||||
|
||||
::
|
||||
:: Build script for zlib on windows.
|
||||
:: Uses the environment set up by a Visual Studio Command Prompt shortcut
|
||||
:: to target a specific architecture and compiler.
|
||||
::
|
||||
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
:: Sets variables for third party versions used in build
|
||||
CALL ..\..\scripts\tpversions.bat || EXIT /B
|
||||
|
||||
:: use "build-zlib.bat /yes" to skip the question part
|
||||
IF /I "%1" == "/YES" SET NOASK=1
|
||||
|
||||
IF NOT DEFINED GENERATOR SET GENERATOR=NMake Makefiles
|
||||
IF NOT DEFINED PACKAGE_NAME SET PACKAGE_NAME=zlib
|
||||
IF NOT DEFINED PACKAGE_VERSION SET PACKAGE_VERSION=%TP_ZLIB_VERSION%
|
||||
IF NOT DEFINED SOURCE_DIR SET SOURCEDIR=%~dp0%PACKAGE_NAME%-%PACKAGE_VERSION%
|
||||
IF NOT DEFINED WIN3P_ROOT SET WIN3P_ROOT=%~dp0..
|
||||
|
||||
:: Set COMPILER to (vc100 - vc140) depending on the current environment
|
||||
CALL ..\..\scripts\cl_setcompiler.bat || EXIT /B
|
||||
|
||||
:: Set ARCH to either win32 or x64 depending on the current environment
|
||||
CALL ..\..\scripts\cl_setarch.bat || EXIT /B
|
||||
|
||||
FOR %%X IN (
|
||||
Debug
|
||||
Release
|
||||
) DO (
|
||||
SET BUILDTYPE=%%X
|
||||
SET BUILDDIR=%WIN3P_ROOT%\build\%PACKAGE_NAME%\%PACKAGE_VERSION%\%COMPILER%\%ARCH%\!BUILDTYPE!
|
||||
SET OUTDIR=%WIN3P_ROOT%\dist\%PACKAGE_NAME%-%PACKAGE_VERSION%\%COMPILER%\%ARCH%
|
||||
|
||||
ECHO/
|
||||
ECHO =========================================================================
|
||||
ECHO Building: %PACKAGE_NAME% v%PACKAGE_VERSION% %COMPILER%:%ARCH%:!BUILDTYPE! "%GENERATOR%"
|
||||
ECHO Build Directory: !BUILDDIR!
|
||||
ECHO Install Directory: !OUTDIR!
|
||||
ECHO Source Directory: %SOURCEDIR%
|
||||
ECHO =========================================================================
|
||||
ECHO/
|
||||
|
||||
IF NOT DEFINED NOASK (
|
||||
CHOICE /M "Do you want to build this configuration? " /c YN
|
||||
IF !ERRORLEVEL! NEQ 1 (EXIT /B !ERRORLEVEL!)
|
||||
)
|
||||
|
||||
MKDIR "!BUILDDIR!"
|
||||
CD "!BUILDDIR!" || EXIT /B
|
||||
|
||||
CMAKE.EXE -G"%GENERATOR%" -DCMAKE_INSTALL_PREFIX=!OUTDIR! -DCMAKE_BUILD_TYPE=!BUILDTYPE! "%SOURCEDIR%" || EXIT /B
|
||||
NMAKE /fMakefile install || EXIT /B
|
||||
|
||||
IF "!BUILDTYPE!" == "Debug" (
|
||||
COPY "!BUILDDIR!\zlibd.pdb" "!OUTDIR!\bin\" || EXIT /B
|
||||
)
|
||||
)
|
||||
|
||||
ENDLOCAL
|
39
vendor/git.apache.org/thrift.git/compiler/cpp/CMakeLists.txt
generated
vendored
39
vendor/git.apache.org/thrift.git/compiler/cpp/CMakeLists.txt
generated
vendored
|
@ -16,30 +16,37 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/thrift/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/thrift/version.h)
|
||||
if(MSVC)
|
||||
# The winflexbison generator outputs some macros that conflict with the Visual Studio 2010 copy of stdint.h
|
||||
# This might be fixed in later versions of Visual Studio, but an easy solution is to include stdint.h first
|
||||
if(HAVE_STDINT_H)
|
||||
add_definitions(-D__STDC_FORMAT_MACROS)
|
||||
add_definitions(-D__STDC_LIMIT_MACROS)
|
||||
add_definitions(/FI"stdint.h")
|
||||
endif(HAVE_STDINT_H)
|
||||
endif()
|
||||
|
||||
find_package(FLEX REQUIRED)
|
||||
find_package(BISON REQUIRED)
|
||||
|
||||
# create directory for thrifty and thriftl
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/thrift/)
|
||||
|
||||
# Create flex and bison files and build the lib parse static library
|
||||
BISON_TARGET(thrifty ${CMAKE_CURRENT_SOURCE_DIR}/src/thrift/thrifty.yy ${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.cc)
|
||||
FLEX_TARGET(thriftl ${CMAKE_CURRENT_SOURCE_DIR}/src/thrift/thriftl.ll ${CMAKE_CURRENT_BINARY_DIR}/thrift/thriftl.cc)
|
||||
ADD_FLEX_BISON_DEPENDENCY(thriftl thrifty)
|
||||
|
||||
# HACK: Work around the fact that bison crates a .hh file but we need a .h file
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.h
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.hh ${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.h
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.hh
|
||||
)
|
||||
|
||||
set(libparse_SOURCES
|
||||
set(parse_SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/thrift/thriftl.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.hh
|
||||
)
|
||||
|
||||
add_library(libparse STATIC ${libparse_SOURCES})
|
||||
add_library(parse STATIC ${parse_SOURCES})
|
||||
|
||||
# Create the thrift compiler
|
||||
set(compiler_core
|
||||
|
@ -55,6 +62,9 @@ set(thrift-compiler_SOURCES
|
|||
src/thrift/audit/t_audit.cpp
|
||||
)
|
||||
|
||||
set(thrift_compiler_LANGS
|
||||
)
|
||||
|
||||
# This macro adds an option THRIFT_COMPILER_${NAME}
|
||||
# that allows enabling or disabling certain languages
|
||||
macro(THRIFT_ADD_COMPILER name description initial)
|
||||
|
@ -63,6 +73,7 @@ macro(THRIFT_ADD_COMPILER name description initial)
|
|||
option(${enabler} ${description} ${initial})
|
||||
if(${enabler})
|
||||
list(APPEND thrift-compiler_SOURCES ${src})
|
||||
list(APPEND thrift_compiler_LANGS ${name})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
@ -74,6 +85,7 @@ THRIFT_ADD_COMPILER(as3 "Enable compiler for ActionScript 3" ON)
|
|||
THRIFT_ADD_COMPILER(dart "Enable compiler for Dart" ON)
|
||||
THRIFT_ADD_COMPILER(haxe "Enable compiler for Haxe" ON)
|
||||
THRIFT_ADD_COMPILER(csharp "Enable compiler for C#" ON)
|
||||
THRIFT_ADD_COMPILER(netcore "Enable compiler for .NET Core" ON)
|
||||
THRIFT_ADD_COMPILER(py "Enable compiler for Python 2.0" ON)
|
||||
THRIFT_ADD_COMPILER(rb "Enable compiler for Ruby" ON)
|
||||
THRIFT_ADD_COMPILER(perl "Enable compiler for Perl" ON)
|
||||
|
@ -94,6 +106,7 @@ THRIFT_ADD_COMPILER(go "Enable compiler for Go" ON)
|
|||
THRIFT_ADD_COMPILER(d "Enable compiler for D" ON)
|
||||
THRIFT_ADD_COMPILER(lua "Enable compiler for Lua" ON)
|
||||
THRIFT_ADD_COMPILER(gv "Enable compiler for GraphViz" ON)
|
||||
THRIFT_ADD_COMPILER(rs "Enable compiler for Rust" ON)
|
||||
THRIFT_ADD_COMPILER(xml "Enable compiler for XML" ON)
|
||||
|
||||
# Thrift is looking for include files in the src directory
|
||||
|
@ -103,6 +116,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} src)
|
|||
if(NOT ${WITH_PLUGIN})
|
||||
list(APPEND thrift-compiler_SOURCES ${compiler_core})
|
||||
endif()
|
||||
|
||||
add_executable(thrift-compiler ${thrift-compiler_SOURCES})
|
||||
|
||||
if(${WITH_PLUGIN})
|
||||
|
@ -111,7 +125,7 @@ if(${WITH_PLUGIN})
|
|||
src/thrift/audit/t_audit.cpp
|
||||
src/thrift/generate/t_cpp_generator.cc
|
||||
)
|
||||
target_link_libraries(thrift-bootstrap libparse)
|
||||
target_link_libraries(thrift-bootstrap parse)
|
||||
|
||||
set(PLUGIN_GEN_SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/thrift/plugin/plugin_types.h
|
||||
|
@ -144,11 +158,12 @@ if(${WITH_PLUGIN})
|
|||
LINK_AGAINST_THRIFT_LIBRARY(thrift-compiler thriftc)
|
||||
endif()
|
||||
|
||||
set_target_properties(thrift-compiler PROPERTIES RUNTIME_OUTPUT_DIRECTORY bin/)
|
||||
set_target_properties(thrift-compiler PROPERTIES OUTPUT_NAME thrift)
|
||||
|
||||
target_link_libraries(thrift-compiler libparse)
|
||||
target_link_libraries(thrift-compiler parse)
|
||||
|
||||
install(TARGETS thrift-compiler DESTINATION "${BIN_INSTALL_DIR}")
|
||||
install(TARGETS thrift-compiler DESTINATION bin)
|
||||
|
||||
if(${WITH_PLUGIN})
|
||||
# Install the headers
|
||||
|
|
12
vendor/git.apache.org/thrift.git/compiler/cpp/Makefile.am
generated
vendored
12
vendor/git.apache.org/thrift.git/compiler/cpp/Makefile.am
generated
vendored
|
@ -71,7 +71,7 @@ compiler_core = src/thrift/common.h \
|
|||
src/thrift/parse/parse.cc \
|
||||
src/thrift/generate/t_generator.h \
|
||||
src/thrift/generate/t_oop_generator.h \
|
||||
src/thrift/generate/t_html_generator.h
|
||||
src/thrift/generate/t_html_generator.h
|
||||
|
||||
thrift_SOURCES = src/thrift/main.h \
|
||||
src/thrift/main.cc \
|
||||
|
@ -87,6 +87,8 @@ thrift_SOURCES += src/thrift/generate/t_c_glib_generator.cc \
|
|||
src/thrift/generate/t_dart_generator.cc \
|
||||
src/thrift/generate/t_haxe_generator.cc \
|
||||
src/thrift/generate/t_csharp_generator.cc \
|
||||
src/thrift/generate/t_netcore_generator.cc \
|
||||
src/thrift/generate/t_netcore_generator.h \
|
||||
src/thrift/generate/t_py_generator.cc \
|
||||
src/thrift/generate/t_rb_generator.cc \
|
||||
src/thrift/generate/t_perl_generator.cc \
|
||||
|
@ -106,10 +108,12 @@ thrift_SOURCES += src/thrift/generate/t_c_glib_generator.cc \
|
|||
src/thrift/generate/t_go_generator.cc \
|
||||
src/thrift/generate/t_gv_generator.cc \
|
||||
src/thrift/generate/t_d_generator.cc \
|
||||
src/thrift/generate/t_lua_generator.cc
|
||||
src/thrift/generate/t_lua_generator.cc \
|
||||
src/thrift/generate/t_rs_generator.cc \
|
||||
src/thrift/generate/t_cl_generator.cc
|
||||
|
||||
thrift_CPPFLAGS = -I$(srcdir)/src
|
||||
thrift_CXXFLAGS = -Wall -Wextra -pedantic
|
||||
thrift_CXXFLAGS = -Wall -Wextra -pedantic -Werror
|
||||
thrift_LDADD = @LEXLIB@ src/thrift/libparse.a
|
||||
|
||||
if !WITH_PLUGIN
|
||||
|
@ -151,7 +155,7 @@ include_generatedir = $(include_thriftdir)/generate
|
|||
include_generate_HEADERS = src/thrift/generate/t_generator.h \
|
||||
src/thrift/generate/t_generator_registry.h \
|
||||
src/thrift/generate/t_oop_generator.h \
|
||||
src/thrift/generate/t_html_generator.h
|
||||
src/thrift/generate/t_html_generator.h
|
||||
|
||||
include_parsedir = $(include_thriftdir)/parse
|
||||
include_parse_HEADERS = src/thrift/parse/t_service.h \
|
||||
|
|
196
vendor/git.apache.org/thrift.git/compiler/cpp/README.md
generated
vendored
196
vendor/git.apache.org/thrift.git/compiler/cpp/README.md
generated
vendored
|
@ -1,83 +1,175 @@
|
|||
# Build compiler using CMake
|
||||
# Build Thrift IDL compiler using CMake
|
||||
|
||||
Use the following steps to build using cmake:
|
||||
<!-- TOC -->
|
||||
|
||||
mkdir cmake-build
|
||||
cd cmake-build
|
||||
cmake ..
|
||||
make
|
||||
- [Build Thrift IDL compiler using CMake](#build-thrift-idl-compiler-using-cmake)
|
||||
- [Build on Unix-like System](#build-on-unix-like-system)
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Build using CMake](#build-using-cmake)
|
||||
- [Build with Eclipse IDE](#build-with-eclipse-ide)
|
||||
- [Build with XCode IDE in MacOS](#build-with-xcode-ide-in-macos)
|
||||
- [Usage of other IDEs](#usage-of-other-ides)
|
||||
- [Build on Windows](#build-on-windows)
|
||||
- [Prerequisites](#prerequisites-1)
|
||||
- [Build using Git Bash](#build-using-git-bash)
|
||||
- [Using Visual Studio and Win flex-bison](#using-visual-studio-and-win-flex-bison)
|
||||
- [Cross compile using mingw32 and generate a Windows Installer with CPack](#cross-compile-using-mingw32-and-generate-a-windows-installer-with-cpack)
|
||||
- [Other cases](#other-cases)
|
||||
- [Building the Thrift IDL compiler in Windows without CMake](#building-the-thrift-idl-compiler-in-windows-without-cmake)
|
||||
- [Unit tests for compiler](#unit-tests-for-compiler)
|
||||
- [Using boost test](#using-boost-test)
|
||||
- [Using Catch C++ test library](#using-catch-c-test-library)
|
||||
- [Have a Happy free time and holidays](#have-a-happy-free-time-and-holidays)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
### Create an eclipse project
|
||||
## Build on Unix-like System
|
||||
|
||||
mkdir cmake-ec && cd cmake-ec
|
||||
cmake -G "Eclipse CDT4 - Unix Makefiles" ..
|
||||
make
|
||||
### Prerequisites
|
||||
- Install CMake
|
||||
- Install flex and bison
|
||||
|
||||
### Build using CMake
|
||||
|
||||
- Go to **thrift\compiler\cpp**
|
||||
- Use the following steps to build using cmake:
|
||||
|
||||
```
|
||||
mkdir cmake-build && cd cmake-build
|
||||
cmake ..
|
||||
make
|
||||
```
|
||||
|
||||
#### Build with Eclipse IDE
|
||||
|
||||
- Go to **thrift\compiler\cpp**
|
||||
- Use the following steps to build using cmake:
|
||||
|
||||
```
|
||||
mkdir cmake-ec && cd cmake-ec
|
||||
cmake -G "Eclipse CDT4 - Unix Makefiles" ..
|
||||
make
|
||||
```
|
||||
|
||||
Now open the folder cmake-ec using eclipse.
|
||||
|
||||
#### Build with XCode IDE in MacOS
|
||||
|
||||
- Install/update flex, bison and cmake with brew
|
||||
|
||||
```
|
||||
brew install cmake
|
||||
brew install bison
|
||||
```
|
||||
|
||||
- Go to **thrift\compiler\cpp**
|
||||
- Run commands in command line:
|
||||
|
||||
```
|
||||
mkdir cmake-build && cd cmake-build
|
||||
cmake -G "Xcode" -DWITH_PLUGIN=OFF ..
|
||||
cmake --build .
|
||||
```
|
||||
|
||||
#### Usage of other IDEs
|
||||
|
||||
Please check list of supported IDE
|
||||
|
||||
```
|
||||
cmake --help
|
||||
```
|
||||
|
||||
## Build on Windows
|
||||
|
||||
### Prerequisites
|
||||
- Install CMake - https://cmake.org/download/
|
||||
- In case if you want to build without Git Bash - install winflexbison - https://sourceforge.net/projects/winflexbison/
|
||||
- In case if you want to build with Visual Studio - install Visual Studio
|
||||
- Better to use the latest stable Visual Studio Community Edition - https://www.visualstudio.com/vs/whatsnew/ (ensure that you installed workload "Desktop Development with C++" for VS2017) - Microsoft added some support for CMake and improving it in Visual Studio
|
||||
|
||||
### Build using Git Bash
|
||||
|
||||
Git Bash provides flex and bison
|
||||
|
||||
- Go to **thrift\compiler\cpp**
|
||||
- Use the following steps to build using cmake:
|
||||
|
||||
```
|
||||
mkdir cmake-vs && cd cmake-vs
|
||||
cmake -DWITH_SHARED_LIB=off ..
|
||||
cmake --build .
|
||||
```
|
||||
|
||||
### Using Visual Studio and Win flex-bison
|
||||
|
||||
- Generate a Visual Studio project for version of Visual Studio which you have (**cmake --help** can show list of supportable VS versions):
|
||||
- Run commands in command line:
|
||||
```
|
||||
mkdir cmake-vs
|
||||
cd cmake-vs
|
||||
cmake -G "Visual Studio 15 2017" -DWITH_PLUGIN=OFF ..
|
||||
```
|
||||
- Now open the folder cmake-vs using Visual Studio.
|
||||
|
||||
### Cross compile using mingw32 and generate a Windows Installer with CPack
|
||||
|
||||
mkdir cmake-mingw32 && cd cmake-mingw32
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../build/cmake/mingw32-toolchain.cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF ..
|
||||
cpack
|
||||
|
||||
## Build on windows
|
||||
|
||||
### using Git Bash
|
||||
Git Bash provides flex and bison, so you just need to do this:
|
||||
|
||||
mkdir cmake-vs && cd cmake-vs
|
||||
cmake -DWITH_SHARED_LIB=off ..
|
||||
|
||||
### using Win flex-bison
|
||||
|
||||
In order to build on windows with winflexbison a few additional steps are necessary:
|
||||
|
||||
1. Download winflexbison from http://sourceforge.net/projects/winflexbison/
|
||||
2. Extract the winflex bison files to for e.g. C:\winflexbison
|
||||
3. Make the CMake variables point to the correct binaries.
|
||||
* FLEX_EXECUTABLE = C:/winbuild/win_flex.exe
|
||||
* BISON_EXECUTABLE = C:/winbuild/win_bison.exe
|
||||
4. Generate a Visual Studio project:
|
||||
```
|
||||
mkdir cmake-vs && cd cmake-vs
|
||||
cmake -G "Visual Studio 12" -DWITH_SHARED_LIB=off ..
|
||||
mkdir cmake-mingw32 && cd cmake-mingw32
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../build/cmake/mingw32-toolchain.cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF ..
|
||||
cpack
|
||||
```
|
||||
5. Now open the folder build_vs using Visual Studio 2013.
|
||||
|
||||
# Building the Thrift IDL compiler in Windows
|
||||
# Other cases
|
||||
|
||||
If you don't want to use CMake you can use the already available Visual Studio
|
||||
2010 solution.
|
||||
The Visual Studio project contains pre-build commands to generate the
|
||||
thriftl.cc, thrifty.cc and thrifty.hh files which are necessary to build
|
||||
the compiler. These depend on bison, flex and their dependencies to
|
||||
work properly.
|
||||
Download flex & bison as described above.
|
||||
Place these binaries somewhere in the path and
|
||||
rename win_flex.exe and win_bison.exe to flex.exe and bison.exe respectively.
|
||||
## Building the Thrift IDL compiler in Windows without CMake
|
||||
|
||||
If you don't want to use CMake you can use the already available Visual Studio 2010 solution.
|
||||
|
||||
The Visual Studio project contains pre-build commands to generate the thriftl.cc, thrifty.cc and thrifty.hh files which are necessary to build the compiler.
|
||||
|
||||
These depend on bison, flex and their dependencies to work properly.
|
||||
|
||||
Download flex & bison as described above.
|
||||
|
||||
Place these binaries somewhere in the path and rename win_flex.exe and win_bison.exe to flex.exe and bison.exe respectively.
|
||||
|
||||
If this doesn't work on a system, try these manual pre-build steps.
|
||||
|
||||
Open compiler.sln and remove the Pre-build commands under the project's
|
||||
Properties -> Build Events -> Pre-Build Events.
|
||||
Open compiler.sln and remove the Pre-build commands under the project's: Properties -> Build Events -> Pre-Build Events.
|
||||
|
||||
From a command prompt:
|
||||
> cd thrift/compiler/cpp
|
||||
> flex -osrc\thrift\thriftl.cc src\thrift\thriftl.ll
|
||||
```
|
||||
cd thrift/compiler/cpp
|
||||
flex -o src\thrift\thriftl.cc src\thrift\thriftl.ll
|
||||
```
|
||||
In the generated thriftl.cc, comment out #include <unistd.h>
|
||||
|
||||
Place a copy of bison.simple in thrift/compiler/cpp
|
||||
> bison -y -o "src/thrift/thrifty.cc" --defines src/thrift/thrifty.yy
|
||||
> move src\thrift\thrifty.cc.hh src\thrift\thrifty.hh
|
||||
```
|
||||
bison -y -o "src/thrift/thrifty.cc" --defines src/thrift/thrifty.yy
|
||||
move src\thrift\thrifty.cc.hh src\thrift\thrifty.hh
|
||||
```
|
||||
|
||||
Bison might generate the yacc header file "thrifty.cc.h" with just one h ".h" extension; in this case you'll have to rename to "thrifty.h".
|
||||
|
||||
> move src\thrift\version.h.in src\thrift\version.h
|
||||
```
|
||||
move src\thrift\version.h.in src\thrift\version.h
|
||||
```
|
||||
|
||||
Download inttypes.h from the interwebs and place it in an include path
|
||||
location (e.g. thrift/compiler/cpp/src).
|
||||
|
||||
Build the compiler in Visual Studio.
|
||||
|
||||
# Unit tests for compiler
|
||||
|
||||
## Using boost test
|
||||
- pls check **test** folder
|
||||
|
||||
## Using Catch C++ test library
|
||||
|
||||
Added generic way to cover code by tests for many languages (you just need to make a correct header file for generator for your language - example in **netcore** implementation)
|
||||
|
||||
- pls check **tests** folder
|
||||
|
||||
# Have a Happy free time and holidays
|
11
vendor/git.apache.org/thrift.git/compiler/cpp/compiler.vcxproj
generated
vendored
11
vendor/git.apache.org/thrift.git/compiler/cpp/compiler.vcxproj
generated
vendored
|
@ -51,12 +51,13 @@
|
|||
<ClInclude Include="src\thrift\version.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\thrift\audit\t_audit.cpp"/>
|
||||
<ClCompile Include="src\thrift\audit\t_audit.cpp" />
|
||||
<ClCompile Include="src\thrift\common.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_as3_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_cocoa_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_cpp_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_csharp_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_netcore_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_c_glib_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_d_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_dart_generator.cc" />
|
||||
|
@ -78,6 +79,7 @@
|
|||
<ClCompile Include="src\thrift\generate\t_php_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_py_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_rb_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_rs_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_st_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_swift_generator.cc" />
|
||||
<ClCompile Include="src\thrift\generate\t_xml_generator.cc" />
|
||||
|
@ -194,7 +196,6 @@
|
|||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>flex -o "src\\thrift\\thriftl.cc" src/thrift/thriftl.ll && bison -y -o "src\\thrift\\thrifty.cc" --defines="src\\thrift\\thrifty.hh" src/thrift/thrifty.yy</Command>
|
||||
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -208,6 +209,7 @@
|
|||
<PreprocessorDefinitions>WIN32;MINGW;YY_NO_UNISTD_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ForcedIncludeFiles>thrift\windows\config.h</ForcedIncludeFiles>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -217,7 +219,6 @@
|
|||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>flex -o "src\\thrift\\thriftl.cc" src/thrift/thriftl.ll && bison -y -o "src\\thrift\\thrifty.cc" --defines="src\\thrift\\thrifty.hh" src/thrift/thrifty.yy</Command>
|
||||
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -231,6 +232,7 @@
|
|||
<PreprocessorDefinitions>WIN32;MINGW;YY_NO_UNISTD_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ForcedIncludeFiles>thrift\windows\config.h</ForcedIncludeFiles>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -240,10 +242,9 @@
|
|||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>flex -o "src\\thrift\\thriftl.cc" src/thrift/thriftl.ll && bison -y -o "src\\thrift\\thrifty.cc" --defines="src\\thrift\\thrifty.hh" src/thrift/thrifty.yy</Command>
|
||||
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
5
vendor/git.apache.org/thrift.git/compiler/cpp/compiler.vcxproj.filters
generated
vendored
5
vendor/git.apache.org/thrift.git/compiler/cpp/compiler.vcxproj.filters
generated
vendored
|
@ -161,6 +161,9 @@
|
|||
<ClCompile Include="src\generate\t_rb_generator.cc">
|
||||
<Filter>generate</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\generate\t_rs_generator.cc">
|
||||
<Filter>generate</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\generate\t_st_generator.cc">
|
||||
<Filter>generate</Filter>
|
||||
</ClCompile>
|
||||
|
@ -193,4 +196,4 @@
|
|||
<None Include="src\thriftl.ll" />
|
||||
<None Include="src\thrifty.yy" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
4
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/audit/t_audit.cpp
generated
vendored
4
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/audit/t_audit.cpp
generated
vendored
|
@ -202,8 +202,8 @@ bool compare_defaults(t_const_value* newStructDefault, t_const_value* oldStructD
|
|||
}
|
||||
case t_const_value::CV_MAP:
|
||||
{
|
||||
const std::map<t_const_value*, t_const_value*> newMap = newStructDefault->get_map();
|
||||
const std::map<t_const_value*, t_const_value*> oldMap = oldStructDefault->get_map();
|
||||
const std::map<t_const_value*, t_const_value*, t_const_value::value_compare> newMap = newStructDefault->get_map();
|
||||
const std::map<t_const_value*, t_const_value*, t_const_value::value_compare> oldMap = oldStructDefault->get_map();
|
||||
|
||||
bool defaultValuesCompare = (oldMap.size() == newMap.size());
|
||||
|
||||
|
|
142
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_as3_generator.cc
generated
vendored
142
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_as3_generator.cc
generated
vendored
|
@ -31,7 +31,7 @@
|
|||
#include "thrift/generate/t_oop_generator.h"
|
||||
|
||||
using std::map;
|
||||
using std::ofstream;
|
||||
using std::ostream;
|
||||
using std::ostringstream;
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
|
@ -83,13 +83,13 @@ public:
|
|||
void generate_xception(t_struct* txception);
|
||||
void generate_service(t_service* tservice);
|
||||
|
||||
void print_const_value(std::ofstream& out,
|
||||
void print_const_value(std::ostream& out,
|
||||
std::string name,
|
||||
t_type* type,
|
||||
t_const_value* value,
|
||||
bool in_static,
|
||||
bool defval = false);
|
||||
std::string render_const_value(ofstream& out,
|
||||
std::string render_const_value(ostream& out,
|
||||
std::string name,
|
||||
t_type* type,
|
||||
t_const_value* value);
|
||||
|
@ -100,19 +100,19 @@ public:
|
|||
|
||||
void generate_as3_struct(t_struct* tstruct, bool is_exception);
|
||||
|
||||
void generate_as3_struct_definition(std::ofstream& out,
|
||||
void generate_as3_struct_definition(std::ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_xception = false,
|
||||
bool in_class = false,
|
||||
bool is_result = false);
|
||||
// removed -- equality,compare_to
|
||||
void generate_as3_struct_reader(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_as3_validator(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_as3_struct_result_writer(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_as3_struct_writer(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_as3_struct_tostring(std::ofstream& out, t_struct* tstruct, bool bindable);
|
||||
void generate_as3_meta_data_map(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_field_value_meta_data(std::ofstream& out, t_type* type);
|
||||
void generate_as3_struct_reader(std::ostream& out, t_struct* tstruct);
|
||||
void generate_as3_validator(std::ostream& out, t_struct* tstruct);
|
||||
void generate_as3_struct_result_writer(std::ostream& out, t_struct* tstruct);
|
||||
void generate_as3_struct_writer(std::ostream& out, t_struct* tstruct);
|
||||
void generate_as3_struct_tostring(std::ostream& out, t_struct* tstruct, bool bindable);
|
||||
void generate_as3_meta_data_map(std::ostream& out, t_struct* tstruct);
|
||||
void generate_field_value_meta_data(std::ostream& out, t_type* type);
|
||||
std::string get_as3_type_string(t_type* type);
|
||||
void generate_reflection_setters(std::ostringstream& out,
|
||||
t_type* type,
|
||||
|
@ -122,15 +122,15 @@ public:
|
|||
t_type* type,
|
||||
std::string field_name,
|
||||
std::string cap_name);
|
||||
void generate_generic_field_getters_setters(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_generic_isset_method(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_as3_bean_boilerplate(std::ofstream& out, t_struct* tstruct, bool bindable);
|
||||
void generate_generic_field_getters_setters(std::ostream& out, t_struct* tstruct);
|
||||
void generate_generic_isset_method(std::ostream& out, t_struct* tstruct);
|
||||
void generate_as3_bean_boilerplate(std::ostream& out, t_struct* tstruct, bool bindable);
|
||||
|
||||
void generate_function_helpers(t_function* tfunction);
|
||||
std::string get_cap_name(std::string name);
|
||||
std::string generate_isset_check(t_field* field);
|
||||
std::string generate_isset_check(std::string field);
|
||||
void generate_isset_set(ofstream& out, t_field* field);
|
||||
void generate_isset_set(ostream& out, t_field* field);
|
||||
// removed std::string isset_field_id(t_field* field);
|
||||
|
||||
void generate_service_interface(t_service* tservice);
|
||||
|
@ -143,38 +143,38 @@ public:
|
|||
* Serialization constructs
|
||||
*/
|
||||
|
||||
void generate_deserialize_field(std::ofstream& out, t_field* tfield, std::string prefix = "");
|
||||
void generate_deserialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
|
||||
|
||||
void generate_deserialize_struct(std::ofstream& out, t_struct* tstruct, std::string prefix = "");
|
||||
void generate_deserialize_struct(std::ostream& out, t_struct* tstruct, std::string prefix = "");
|
||||
|
||||
void generate_deserialize_container(std::ofstream& out, t_type* ttype, std::string prefix = "");
|
||||
void generate_deserialize_container(std::ostream& out, t_type* ttype, std::string prefix = "");
|
||||
|
||||
void generate_deserialize_set_element(std::ofstream& out, t_set* tset, std::string prefix = "");
|
||||
void generate_deserialize_set_element(std::ostream& out, t_set* tset, std::string prefix = "");
|
||||
|
||||
void generate_deserialize_map_element(std::ofstream& out, t_map* tmap, std::string prefix = "");
|
||||
void generate_deserialize_map_element(std::ostream& out, t_map* tmap, std::string prefix = "");
|
||||
|
||||
void generate_deserialize_list_element(std::ofstream& out,
|
||||
void generate_deserialize_list_element(std::ostream& out,
|
||||
t_list* tlist,
|
||||
std::string prefix = "");
|
||||
|
||||
void generate_serialize_field(std::ofstream& out, t_field* tfield, std::string prefix = "");
|
||||
void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
|
||||
|
||||
void generate_serialize_struct(std::ofstream& out, t_struct* tstruct, std::string prefix = "");
|
||||
void generate_serialize_struct(std::ostream& out, t_struct* tstruct, std::string prefix = "");
|
||||
|
||||
void generate_serialize_container(std::ofstream& out, t_type* ttype, std::string prefix = "");
|
||||
void generate_serialize_container(std::ostream& out, t_type* ttype, std::string prefix = "");
|
||||
|
||||
void generate_serialize_map_element(std::ofstream& out,
|
||||
void generate_serialize_map_element(std::ostream& out,
|
||||
t_map* tmap,
|
||||
std::string iter,
|
||||
std::string map);
|
||||
|
||||
void generate_serialize_set_element(std::ofstream& out, t_set* tmap, std::string iter);
|
||||
void generate_serialize_set_element(std::ostream& out, t_set* tmap, std::string iter);
|
||||
|
||||
void generate_serialize_list_element(std::ofstream& out, t_list* tlist, std::string iter);
|
||||
void generate_serialize_list_element(std::ostream& out, t_list* tlist, std::string iter);
|
||||
|
||||
void generate_as3_doc(std::ofstream& out, t_doc* tdoc);
|
||||
void generate_as3_doc(std::ostream& out, t_doc* tdoc);
|
||||
|
||||
void generate_as3_doc(std::ofstream& out, t_function* tdoc);
|
||||
void generate_as3_doc(std::ostream& out, t_function* tdoc);
|
||||
|
||||
/**
|
||||
* Helper rendering functions
|
||||
|
@ -208,7 +208,7 @@ private:
|
|||
*/
|
||||
|
||||
std::string package_name_;
|
||||
std::ofstream f_service_;
|
||||
ofstream_with_content_based_conditional_update f_service_;
|
||||
std::string package_dir_;
|
||||
|
||||
bool bindable_;
|
||||
|
@ -353,8 +353,8 @@ void t_as3_generator::generate_typedef(t_typedef* ttypedef) {
|
|||
void t_as3_generator::generate_enum(t_enum* tenum) {
|
||||
// Make output file
|
||||
string f_enum_name = package_dir_ + "/" + (tenum->get_name()) + ".as";
|
||||
ofstream f_enum;
|
||||
f_enum.open(f_enum_name.c_str());
|
||||
ofstream_with_content_based_conditional_update f_enum;
|
||||
f_enum.open(f_enum_name);
|
||||
|
||||
// Comment and package it
|
||||
f_enum << autogen_comment() << as3_package() << endl;
|
||||
|
@ -416,8 +416,8 @@ void t_as3_generator::generate_consts(std::vector<t_const*> consts) {
|
|||
}
|
||||
|
||||
string f_consts_name = package_dir_ + "/" + program_name_ + "Constants.as";
|
||||
ofstream f_consts;
|
||||
f_consts.open(f_consts_name.c_str());
|
||||
ofstream_with_content_based_conditional_update f_consts;
|
||||
f_consts.open(f_consts_name);
|
||||
|
||||
// Print header
|
||||
f_consts << autogen_comment() << as3_package();
|
||||
|
@ -443,7 +443,7 @@ void t_as3_generator::generate_consts(std::vector<t_const*> consts) {
|
|||
f_consts.close();
|
||||
}
|
||||
|
||||
void t_as3_generator::print_const_value(std::ofstream& out,
|
||||
void t_as3_generator::print_const_value(std::ostream& out,
|
||||
string name,
|
||||
t_type* type,
|
||||
t_const_value* value,
|
||||
|
@ -471,8 +471,8 @@ void t_as3_generator::print_const_value(std::ofstream& out,
|
|||
} else if (type->is_struct() || type->is_xception()) {
|
||||
const vector<t_field*>& fields = ((t_struct*)type)->get_members();
|
||||
vector<t_field*>::const_iterator f_iter;
|
||||
const map<t_const_value*, t_const_value*>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*>::const_iterator v_iter;
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
out << name << ":" << type_name(type) << " = new " << type_name(type, false, true) << "();"
|
||||
<< endl;
|
||||
if (!in_static) {
|
||||
|
@ -516,8 +516,8 @@ void t_as3_generator::print_const_value(std::ofstream& out,
|
|||
}
|
||||
t_type* ktype = ((t_map*)type)->get_key_type();
|
||||
t_type* vtype = ((t_map*)type)->get_val_type();
|
||||
const map<t_const_value*, t_const_value*>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*>::const_iterator v_iter;
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
for (v_iter = val.begin(); v_iter != val.end(); ++v_iter) {
|
||||
string key = render_const_value(out, name, ktype, v_iter->first);
|
||||
string val = render_const_value(out, name, vtype, v_iter->second);
|
||||
|
@ -567,7 +567,7 @@ void t_as3_generator::print_const_value(std::ofstream& out,
|
|||
}
|
||||
}
|
||||
|
||||
string t_as3_generator::render_const_value(ofstream& out,
|
||||
string t_as3_generator::render_const_value(ostream& out,
|
||||
string name,
|
||||
t_type* type,
|
||||
t_const_value* value) {
|
||||
|
@ -644,7 +644,7 @@ void t_as3_generator::generate_xception(t_struct* txception) {
|
|||
void t_as3_generator::generate_as3_struct(t_struct* tstruct, bool is_exception) {
|
||||
// Make output file
|
||||
string f_struct_name = package_dir_ + "/" + (tstruct->get_name()) + ".as";
|
||||
ofstream f_struct;
|
||||
ofstream_with_content_based_conditional_update f_struct;
|
||||
f_struct.open(f_struct_name.c_str());
|
||||
|
||||
f_struct << autogen_comment() << as3_package();
|
||||
|
@ -678,7 +678,7 @@ void t_as3_generator::generate_as3_struct(t_struct* tstruct, bool is_exception)
|
|||
* @param in_class If inside a class, needs to be static class
|
||||
* @param is_result If this is a result it needs a different writer
|
||||
*/
|
||||
void t_as3_generator::generate_as3_struct_definition(ofstream& out,
|
||||
void t_as3_generator::generate_as3_struct_definition(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception,
|
||||
bool in_class,
|
||||
|
@ -782,7 +782,7 @@ void t_as3_generator::generate_as3_struct_definition(ofstream& out,
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_as3_generator::generate_as3_struct_reader(ofstream& out, t_struct* tstruct) {
|
||||
void t_as3_generator::generate_as3_struct_reader(ostream& out, t_struct* tstruct) {
|
||||
out << indent() << "public function read(iprot:TProtocol):void {" << endl;
|
||||
indent_up();
|
||||
|
||||
|
@ -862,7 +862,7 @@ void t_as3_generator::generate_as3_struct_reader(ofstream& out, t_struct* tstruc
|
|||
|
||||
// generates as3 method to perform various checks
|
||||
// (e.g. check that all required fields are set)
|
||||
void t_as3_generator::generate_as3_validator(ofstream& out, t_struct* tstruct) {
|
||||
void t_as3_generator::generate_as3_validator(ostream& out, t_struct* tstruct) {
|
||||
indent(out) << "public function validate():void {" << endl;
|
||||
indent_up();
|
||||
|
||||
|
@ -912,7 +912,7 @@ void t_as3_generator::generate_as3_validator(ofstream& out, t_struct* tstruct) {
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_as3_generator::generate_as3_struct_writer(ofstream& out, t_struct* tstruct) {
|
||||
void t_as3_generator::generate_as3_struct_writer(ostream& out, t_struct* tstruct) {
|
||||
out << indent() << "public function write(oprot:TProtocol):void {" << endl;
|
||||
indent_up();
|
||||
|
||||
|
@ -971,7 +971,7 @@ void t_as3_generator::generate_as3_struct_writer(ofstream& out, t_struct* tstruc
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_as3_generator::generate_as3_struct_result_writer(ofstream& out, t_struct* tstruct) {
|
||||
void t_as3_generator::generate_as3_struct_result_writer(ostream& out, t_struct* tstruct) {
|
||||
out << indent() << "public function write(oprot:TProtocol):void {" << endl;
|
||||
indent_up();
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ void t_as3_generator::generate_reflection_setters(ostringstream& out,
|
|||
indent_down();
|
||||
}
|
||||
|
||||
void t_as3_generator::generate_generic_field_getters_setters(std::ofstream& out,
|
||||
void t_as3_generator::generate_generic_field_getters_setters(std::ostream& out,
|
||||
t_struct* tstruct) {
|
||||
|
||||
std::ostringstream getter_stream;
|
||||
|
@ -1100,7 +1100,7 @@ void t_as3_generator::generate_generic_field_getters_setters(std::ofstream& out,
|
|||
}
|
||||
|
||||
// Creates a generic isSet method that takes the field number as argument
|
||||
void t_as3_generator::generate_generic_isset_method(std::ofstream& out, t_struct* tstruct) {
|
||||
void t_as3_generator::generate_generic_isset_method(std::ostream& out, t_struct* tstruct) {
|
||||
const vector<t_field*>& fields = tstruct->get_members();
|
||||
vector<t_field*>::const_iterator f_iter;
|
||||
|
||||
|
@ -1134,7 +1134,7 @@ void t_as3_generator::generate_generic_isset_method(std::ofstream& out, t_struct
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_as3_generator::generate_as3_bean_boilerplate(ofstream& out,
|
||||
void t_as3_generator::generate_as3_bean_boilerplate(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool bindable) {
|
||||
const vector<t_field*>& fields = tstruct->get_members();
|
||||
|
@ -1216,7 +1216,7 @@ void t_as3_generator::generate_as3_bean_boilerplate(ofstream& out,
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_as3_generator::generate_as3_struct_tostring(ofstream& out,
|
||||
void t_as3_generator::generate_as3_struct_tostring(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool bindable) {
|
||||
// If it's bindable, it extends EventDispatcher so toString is an override.
|
||||
|
@ -1251,7 +1251,7 @@ void t_as3_generator::generate_as3_struct_tostring(ofstream& out,
|
|||
indent_up();
|
||||
}
|
||||
|
||||
if (field->get_type()->is_base_type() && ((t_base_type*)(field->get_type()))->is_binary()) {
|
||||
if (field->get_type()->is_binary()) {
|
||||
indent(out) << " ret += \"BINARY\";" << endl;
|
||||
} else if (field->get_type()->is_enum()) {
|
||||
indent(out) << "var " << field->get_name()
|
||||
|
@ -1293,7 +1293,7 @@ void t_as3_generator::generate_as3_struct_tostring(ofstream& out,
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_as3_generator::generate_as3_meta_data_map(ofstream& out, t_struct* tstruct) {
|
||||
void t_as3_generator::generate_as3_meta_data_map(ostream& out, t_struct* tstruct) {
|
||||
const vector<t_field*>& fields = tstruct->get_members();
|
||||
vector<t_field*>::const_iterator f_iter;
|
||||
|
||||
|
@ -1381,7 +1381,7 @@ std::string t_as3_generator::get_as3_type_string(t_type* type) {
|
|||
}
|
||||
}
|
||||
|
||||
void t_as3_generator::generate_field_value_meta_data(std::ofstream& out, t_type* type) {
|
||||
void t_as3_generator::generate_field_value_meta_data(std::ostream& out, t_type* type) {
|
||||
out << endl;
|
||||
indent_up();
|
||||
indent_up();
|
||||
|
@ -1960,7 +1960,7 @@ void t_as3_generator::generate_process_function(t_service* tservice, t_function*
|
|||
* @param tfield The field
|
||||
* @param prefix The variable name or container for this field
|
||||
*/
|
||||
void t_as3_generator::generate_deserialize_field(ofstream& out, t_field* tfield, string prefix) {
|
||||
void t_as3_generator::generate_deserialize_field(ostream& out, t_field* tfield, string prefix) {
|
||||
t_type* type = get_true_type(tfield->get_type());
|
||||
|
||||
if (type->is_void()) {
|
||||
|
@ -1984,7 +1984,7 @@ void t_as3_generator::generate_deserialize_field(ofstream& out, t_field* tfield,
|
|||
throw "compiler error: cannot serialize void field in a struct: " + name;
|
||||
break;
|
||||
case t_base_type::TYPE_STRING:
|
||||
if (((t_base_type*)type)->is_binary()) {
|
||||
if (type->is_binary()) {
|
||||
out << "readBinary();";
|
||||
} else {
|
||||
out << "readString();";
|
||||
|
@ -2025,7 +2025,7 @@ void t_as3_generator::generate_deserialize_field(ofstream& out, t_field* tfield,
|
|||
/**
|
||||
* Generates an unserializer for a struct, invokes read()
|
||||
*/
|
||||
void t_as3_generator::generate_deserialize_struct(ofstream& out, t_struct* tstruct, string prefix) {
|
||||
void t_as3_generator::generate_deserialize_struct(ostream& out, t_struct* tstruct, string prefix) {
|
||||
out << indent() << prefix << " = new " << type_name(tstruct) << "();" << endl << indent()
|
||||
<< prefix << ".read(iprot);" << endl;
|
||||
}
|
||||
|
@ -2033,7 +2033,7 @@ void t_as3_generator::generate_deserialize_struct(ofstream& out, t_struct* tstru
|
|||
/**
|
||||
* Deserializes a container by reading its size and then iterating
|
||||
*/
|
||||
void t_as3_generator::generate_deserialize_container(ofstream& out, t_type* ttype, string prefix) {
|
||||
void t_as3_generator::generate_deserialize_container(ostream& out, t_type* ttype, string prefix) {
|
||||
scope_up(out);
|
||||
|
||||
string obj;
|
||||
|
@ -2093,7 +2093,7 @@ void t_as3_generator::generate_deserialize_container(ofstream& out, t_type* ttyp
|
|||
/**
|
||||
* Generates code to deserialize a map
|
||||
*/
|
||||
void t_as3_generator::generate_deserialize_map_element(ofstream& out, t_map* tmap, string prefix) {
|
||||
void t_as3_generator::generate_deserialize_map_element(ostream& out, t_map* tmap, string prefix) {
|
||||
string key = tmp("_key");
|
||||
string val = tmp("_val");
|
||||
t_field fkey(tmap->get_key_type(), key);
|
||||
|
@ -2111,7 +2111,7 @@ void t_as3_generator::generate_deserialize_map_element(ofstream& out, t_map* tma
|
|||
/**
|
||||
* Deserializes a set element
|
||||
*/
|
||||
void t_as3_generator::generate_deserialize_set_element(ofstream& out, t_set* tset, string prefix) {
|
||||
void t_as3_generator::generate_deserialize_set_element(ostream& out, t_set* tset, string prefix) {
|
||||
string elem = tmp("_elem");
|
||||
t_field felem(tset->get_elem_type(), elem);
|
||||
|
||||
|
@ -2125,7 +2125,7 @@ void t_as3_generator::generate_deserialize_set_element(ofstream& out, t_set* tse
|
|||
/**
|
||||
* Deserializes a list element
|
||||
*/
|
||||
void t_as3_generator::generate_deserialize_list_element(ofstream& out,
|
||||
void t_as3_generator::generate_deserialize_list_element(ostream& out,
|
||||
t_list* tlist,
|
||||
string prefix) {
|
||||
string elem = tmp("_elem");
|
||||
|
@ -2144,7 +2144,7 @@ void t_as3_generator::generate_deserialize_list_element(ofstream& out,
|
|||
* @param tfield The field to serialize
|
||||
* @param prefix Name to prepend to field name
|
||||
*/
|
||||
void t_as3_generator::generate_serialize_field(ofstream& out, t_field* tfield, string prefix) {
|
||||
void t_as3_generator::generate_serialize_field(ostream& out, t_field* tfield, string prefix) {
|
||||
t_type* type = get_true_type(tfield->get_type());
|
||||
|
||||
// Do nothing for void types
|
||||
|
@ -2168,7 +2168,7 @@ void t_as3_generator::generate_serialize_field(ofstream& out, t_field* tfield, s
|
|||
throw "compiler error: cannot serialize void field in a struct: " + name;
|
||||
break;
|
||||
case t_base_type::TYPE_STRING:
|
||||
if (((t_base_type*)type)->is_binary()) {
|
||||
if (type->is_binary()) {
|
||||
out << "writeBinary(" << name << ");";
|
||||
} else {
|
||||
out << "writeString(" << name << ");";
|
||||
|
@ -2213,7 +2213,7 @@ void t_as3_generator::generate_serialize_field(ofstream& out, t_field* tfield, s
|
|||
* @param tstruct The struct to serialize
|
||||
* @param prefix String prefix to attach to all fields
|
||||
*/
|
||||
void t_as3_generator::generate_serialize_struct(ofstream& out, t_struct* tstruct, string prefix) {
|
||||
void t_as3_generator::generate_serialize_struct(ostream& out, t_struct* tstruct, string prefix) {
|
||||
(void)tstruct;
|
||||
out << indent() << prefix << ".write(oprot);" << endl;
|
||||
}
|
||||
|
@ -2224,7 +2224,7 @@ void t_as3_generator::generate_serialize_struct(ofstream& out, t_struct* tstruct
|
|||
* @param ttype The type of container
|
||||
* @param prefix String prefix for fields
|
||||
*/
|
||||
void t_as3_generator::generate_serialize_container(ofstream& out, t_type* ttype, string prefix) {
|
||||
void t_as3_generator::generate_serialize_container(ostream& out, t_type* ttype, string prefix) {
|
||||
scope_up(out);
|
||||
|
||||
if (ttype->is_map()) {
|
||||
|
@ -2282,7 +2282,7 @@ void t_as3_generator::generate_serialize_container(ofstream& out, t_type* ttype,
|
|||
/**
|
||||
* Serializes the members of a map.
|
||||
*/
|
||||
void t_as3_generator::generate_serialize_map_element(ofstream& out,
|
||||
void t_as3_generator::generate_serialize_map_element(ostream& out,
|
||||
t_map* tmap,
|
||||
string iter,
|
||||
string map) {
|
||||
|
@ -2295,7 +2295,7 @@ void t_as3_generator::generate_serialize_map_element(ofstream& out,
|
|||
/**
|
||||
* Serializes the members of a set.
|
||||
*/
|
||||
void t_as3_generator::generate_serialize_set_element(ofstream& out, t_set* tset, string iter) {
|
||||
void t_as3_generator::generate_serialize_set_element(ostream& out, t_set* tset, string iter) {
|
||||
t_field efield(tset->get_elem_type(), iter);
|
||||
generate_serialize_field(out, &efield, "");
|
||||
}
|
||||
|
@ -2303,7 +2303,7 @@ void t_as3_generator::generate_serialize_set_element(ofstream& out, t_set* tset,
|
|||
/**
|
||||
* Serializes the members of a list.
|
||||
*/
|
||||
void t_as3_generator::generate_serialize_list_element(ofstream& out, t_list* tlist, string iter) {
|
||||
void t_as3_generator::generate_serialize_list_element(ostream& out, t_list* tlist, string iter) {
|
||||
t_field efield(tlist->get_elem_type(), iter);
|
||||
generate_serialize_field(out, &efield, "");
|
||||
}
|
||||
|
@ -2390,7 +2390,7 @@ string t_as3_generator::declare_field(t_field* tfield, bool init) {
|
|||
if (init) {
|
||||
t_type* ttype = get_true_type(tfield->get_type());
|
||||
if (ttype->is_base_type() && tfield->get_value() != NULL) {
|
||||
ofstream dummy;
|
||||
std::ofstream dummy;
|
||||
result += " = " + render_const_value(dummy, tfield->get_name(), ttype, tfield->get_value());
|
||||
} else if (ttype->is_base_type()) {
|
||||
t_base_type::t_base tbase = ((t_base_type*)ttype)->get_base();
|
||||
|
@ -2539,7 +2539,7 @@ string t_as3_generator::constant_name(string name) {
|
|||
/**
|
||||
* Emits a As3Doc comment if the provided object has a doc in Thrift
|
||||
*/
|
||||
void t_as3_generator::generate_as3_doc(ofstream& out, t_doc* tdoc) {
|
||||
void t_as3_generator::generate_as3_doc(ostream& out, t_doc* tdoc) {
|
||||
if (tdoc->has_doc()) {
|
||||
generate_docstring_comment(out, "/**\n", " * ", tdoc->get_doc(), " */\n");
|
||||
}
|
||||
|
@ -2548,7 +2548,7 @@ void t_as3_generator::generate_as3_doc(ofstream& out, t_doc* tdoc) {
|
|||
/**
|
||||
* Emits a As3Doc comment if the provided function object has a doc in Thrift
|
||||
*/
|
||||
void t_as3_generator::generate_as3_doc(ofstream& out, t_function* tfunction) {
|
||||
void t_as3_generator::generate_as3_doc(ostream& out, t_function* tfunction) {
|
||||
if (tfunction->has_doc()) {
|
||||
stringstream ss;
|
||||
ss << tfunction->get_doc();
|
||||
|
@ -2573,7 +2573,7 @@ std::string t_as3_generator::generate_isset_check(std::string field_name) {
|
|||
return "is" + get_cap_name("set") + get_cap_name(field_name) + "()";
|
||||
}
|
||||
|
||||
void t_as3_generator::generate_isset_set(ofstream& out, t_field* field) {
|
||||
void t_as3_generator::generate_isset_set(ostream& out, t_field* field) {
|
||||
if (!type_can_be_null(field->get_type())) {
|
||||
indent(out) << "this.__isset_" << field->get_name() << " = true;" << endl;
|
||||
}
|
||||
|
|
151
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc
generated
vendored
151
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_c_glib_generator.cc
generated
vendored
|
@ -33,7 +33,7 @@
|
|||
#include "thrift/generate/t_oop_generator.h"
|
||||
|
||||
using std::map;
|
||||
using std::ofstream;
|
||||
using std::ostream;
|
||||
using std::ostringstream;
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
|
@ -116,10 +116,10 @@ public:
|
|||
|
||||
private:
|
||||
/* file streams */
|
||||
ofstream f_types_;
|
||||
ofstream f_types_impl_;
|
||||
ofstream f_header_;
|
||||
ofstream f_service_;
|
||||
ofstream_with_content_based_conditional_update f_types_;
|
||||
ofstream_with_content_based_conditional_update f_types_impl_;
|
||||
ofstream_with_content_based_conditional_update f_header_;
|
||||
ofstream_with_content_based_conditional_update f_service_;
|
||||
|
||||
/* namespace variables */
|
||||
string nspace;
|
||||
|
@ -145,8 +145,8 @@ private:
|
|||
bool pointer = false,
|
||||
bool constant = false,
|
||||
bool reference = false);
|
||||
void declare_local_variable(ofstream& out, t_type* ttype, string& base_name, bool for_hash_table);
|
||||
void declore_local_variable_for_write(ofstream& out, t_type* ttype, string& base_name);
|
||||
void declare_local_variable(ostream& out, t_type* ttype, string& base_name, bool for_hash_table);
|
||||
void declore_local_variable_for_write(ostream& out, t_type* ttype, string& base_name);
|
||||
|
||||
/* generation functions */
|
||||
void generate_const_initializer(string name,
|
||||
|
@ -159,51 +159,51 @@ private:
|
|||
void generate_service_processor(t_service* tservice);
|
||||
void generate_service_server(t_service* tservice);
|
||||
void generate_object(t_struct* tstruct);
|
||||
void generate_struct_writer(ofstream& out,
|
||||
void generate_struct_writer(ostream& out,
|
||||
t_struct* tstruct,
|
||||
string this_name,
|
||||
string this_get = "",
|
||||
bool is_function = true);
|
||||
void generate_struct_reader(ofstream& out,
|
||||
void generate_struct_reader(ostream& out,
|
||||
t_struct* tstruct,
|
||||
string this_name,
|
||||
string this_get = "",
|
||||
bool is_function = true);
|
||||
|
||||
void generate_serialize_field(ofstream& out,
|
||||
void generate_serialize_field(ostream& out,
|
||||
t_field* tfield,
|
||||
string prefix,
|
||||
string suffix,
|
||||
int error_ret);
|
||||
void generate_serialize_struct(ofstream& out, t_struct* tstruct, string prefix, int error_ret);
|
||||
void generate_serialize_container(ofstream& out, t_type* ttype, string prefix, int error_ret);
|
||||
void generate_serialize_map_element(ofstream& out,
|
||||
void generate_serialize_struct(ostream& out, t_struct* tstruct, string prefix, int error_ret);
|
||||
void generate_serialize_container(ostream& out, t_type* ttype, string prefix, int error_ret);
|
||||
void generate_serialize_map_element(ostream& out,
|
||||
t_map* tmap,
|
||||
string key,
|
||||
string value,
|
||||
int error_ret);
|
||||
void generate_serialize_set_element(ofstream& out, t_set* tset, string element, int error_ret);
|
||||
void generate_serialize_list_element(ofstream& out,
|
||||
void generate_serialize_set_element(ostream& out, t_set* tset, string element, int error_ret);
|
||||
void generate_serialize_list_element(ostream& out,
|
||||
t_list* tlist,
|
||||
string list,
|
||||
string index,
|
||||
int error_ret);
|
||||
|
||||
void generate_deserialize_field(ofstream& out,
|
||||
void generate_deserialize_field(ostream& out,
|
||||
t_field* tfield,
|
||||
string prefix,
|
||||
string suffix,
|
||||
int error_ret,
|
||||
bool allocate = true);
|
||||
void generate_deserialize_struct(ofstream& out,
|
||||
void generate_deserialize_struct(ostream& out,
|
||||
t_struct* tstruct,
|
||||
string prefix,
|
||||
int error_ret,
|
||||
bool allocate = true);
|
||||
void generate_deserialize_container(ofstream& out, t_type* ttype, string prefix, int error_ret);
|
||||
void generate_deserialize_map_element(ofstream& out, t_map* tmap, string prefix, int error_ret);
|
||||
void generate_deserialize_set_element(ofstream& out, t_set* tset, string prefix, int error_ret);
|
||||
void generate_deserialize_list_element(ofstream& out,
|
||||
void generate_deserialize_container(ostream& out, t_type* ttype, string prefix, int error_ret);
|
||||
void generate_deserialize_map_element(ostream& out, t_map* tmap, string prefix, int error_ret);
|
||||
void generate_deserialize_set_element(ostream& out, t_set* tset, string prefix, int error_ret);
|
||||
void generate_deserialize_list_element(ostream& out,
|
||||
t_list* tlist,
|
||||
string prefix,
|
||||
string index,
|
||||
|
@ -250,11 +250,21 @@ void t_c_glib_generator::init_generator() {
|
|||
|
||||
/* include other thrift includes */
|
||||
const vector<t_program*>& includes = program_->get_includes();
|
||||
for (size_t i = 0; i < includes.size(); ++i) {
|
||||
f_types_ << "/* other thrift includes */" << endl << "#include \"" << this->nspace_lc
|
||||
<< initial_caps_to_underscores(includes[i]->get_name()) << "_types.h\"" << endl;
|
||||
if (!includes.empty()) {
|
||||
f_types_ << "/* other thrift includes */" << endl;
|
||||
|
||||
for (vector<t_program*>::const_iterator iter = includes.begin();
|
||||
iter != includes.end();
|
||||
++iter) {
|
||||
const std::string& include_nspace = (*iter)->get_namespace("c_glib");
|
||||
std::string include_nspace_prefix =
|
||||
include_nspace.empty() ? "" : initial_caps_to_underscores(include_nspace) + "_";
|
||||
|
||||
f_types_ << "#include \"" << include_nspace_prefix
|
||||
<< initial_caps_to_underscores((*iter)->get_name()) << "_types.h\"" << endl;
|
||||
}
|
||||
f_types_ << endl;
|
||||
}
|
||||
f_types_ << endl;
|
||||
|
||||
/* include custom headers */
|
||||
const vector<string>& c_includes = program_->get_c_includes();
|
||||
|
@ -579,7 +589,7 @@ string t_c_glib_generator::type_name(t_type* ttype, bool in_typedef, bool is_con
|
|||
// TODO: discuss whether or not to implement TSet, THashSet or GHashSet
|
||||
cname = "GHashTable";
|
||||
} else if (ttype->is_list()) {
|
||||
t_type* etype = ((t_list*)ttype)->get_elem_type();
|
||||
t_type* etype = get_true_type(((t_list*)ttype)->get_elem_type());
|
||||
if (etype->is_void()) {
|
||||
throw std::runtime_error("compiler error: list element type cannot be void");
|
||||
}
|
||||
|
@ -602,7 +612,8 @@ string t_c_glib_generator::type_name(t_type* ttype, bool in_typedef, bool is_con
|
|||
}
|
||||
|
||||
// check for a namespace
|
||||
string pname = this->nspace + ttype->get_name();
|
||||
t_program* tprogram = ttype->get_program();
|
||||
string pname = (tprogram ? tprogram->get_namespace("c_glib") : "") + ttype->get_name();
|
||||
|
||||
if (is_complex_type(ttype)) {
|
||||
pname += " *";
|
||||
|
@ -997,8 +1008,8 @@ void t_c_glib_generator::generate_const_initializer(string name,
|
|||
if (type->is_struct() || type->is_xception()) {
|
||||
const vector<t_field*>& fields = ((t_struct*)type)->get_members();
|
||||
vector<t_field*>::const_iterator f_iter;
|
||||
const map<t_const_value*, t_const_value*>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*>::const_iterator v_iter;
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
ostringstream initializers;
|
||||
|
||||
// initialize any constants that may be referenced by this initializer
|
||||
|
@ -1171,8 +1182,8 @@ void t_c_glib_generator::generate_const_initializer(string name,
|
|||
} else if (type->is_map()) {
|
||||
t_type* ktype = ((t_map*)type)->get_key_type();
|
||||
t_type* vtype = ((t_map*)type)->get_val_type();
|
||||
const map<t_const_value*, t_const_value*>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*>::const_iterator v_iter;
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
ostringstream initializers;
|
||||
ostringstream appenders;
|
||||
|
||||
|
@ -1831,8 +1842,10 @@ void t_c_glib_generator::generate_service_handler(t_service* tservice) {
|
|||
string service_name_lc = to_lower_case(initial_caps_to_underscores(service_name_));
|
||||
string service_name_uc = to_upper_case(service_name_lc);
|
||||
|
||||
string class_name = this->nspace + service_name_ + "Handler";
|
||||
string class_name_lc = to_lower_case(initial_caps_to_underscores(class_name));
|
||||
string service_handler_name = service_name_ + "Handler";
|
||||
|
||||
string class_name = this->nspace + service_handler_name;
|
||||
string class_name_lc = this->nspace_lc + initial_caps_to_underscores(service_handler_name);
|
||||
string class_name_uc = to_upper_case(class_name_lc);
|
||||
|
||||
string parent_class_name;
|
||||
|
@ -2051,8 +2064,10 @@ void t_c_glib_generator::generate_service_processor(t_service* tservice) {
|
|||
string service_name_lc = to_lower_case(initial_caps_to_underscores(service_name_));
|
||||
string service_name_uc = to_upper_case(service_name_lc);
|
||||
|
||||
string class_name = this->nspace + service_name_ + "Processor";
|
||||
string class_name_lc = to_lower_case(initial_caps_to_underscores(class_name));
|
||||
string service_processor_name = service_name_ + "Processor";
|
||||
|
||||
string class_name = this->nspace + service_processor_name;
|
||||
string class_name_lc = this->nspace_lc + initial_caps_to_underscores(service_processor_name);
|
||||
string class_name_uc = to_upper_case(class_name_lc);
|
||||
|
||||
string parent_class_name;
|
||||
|
@ -2784,7 +2799,7 @@ void t_c_glib_generator::generate_object(t_struct* tstruct) {
|
|||
string name_uc = to_upper_case(name_u);
|
||||
|
||||
string class_name = this->nspace + name;
|
||||
string class_name_lc = to_lower_case(initial_caps_to_underscores(class_name));
|
||||
string class_name_lc = this->nspace_lc + initial_caps_to_underscores(name);
|
||||
string class_name_uc = to_upper_case(class_name_lc);
|
||||
|
||||
string function_name;
|
||||
|
@ -3124,7 +3139,8 @@ void t_c_glib_generator::generate_object(t_struct* tstruct) {
|
|||
<< "THRIFT_UNUSED_VAR (object);" << endl;
|
||||
|
||||
for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
|
||||
t_type* t = get_true_type((*m_iter)->get_type());
|
||||
t_type* member_type = (*m_iter)->get_type();
|
||||
t_type* t = get_true_type(member_type);
|
||||
if (t->is_base_type()) {
|
||||
string dval = " = ";
|
||||
if (t->is_enum()) {
|
||||
|
@ -3139,10 +3155,14 @@ void t_c_glib_generator::generate_object(t_struct* tstruct) {
|
|||
indent(f_types_impl_) << "object->" << (*m_iter)->get_name() << dval << ";" << endl;
|
||||
} else if (t->is_struct()) {
|
||||
string name = (*m_iter)->get_name();
|
||||
string type_name_uc
|
||||
= to_upper_case(initial_caps_to_underscores((*m_iter)->get_type()->get_name()));
|
||||
indent(f_types_impl_) << "object->" << name << " = g_object_new (" << this->nspace_uc
|
||||
<< "TYPE_" << type_name_uc << ", NULL);" << endl;
|
||||
t_program* type_program = member_type->get_program();
|
||||
string type_nspace = type_program ? type_program->get_namespace("c_glib") : "";
|
||||
string type_nspace_prefix =
|
||||
type_nspace.empty() ? "" : initial_caps_to_underscores(type_nspace) + "_";
|
||||
string type_name_uc = to_upper_case(initial_caps_to_underscores(member_type->get_name()));
|
||||
indent(f_types_impl_) << "object->" << name << " = g_object_new ("
|
||||
<< to_upper_case(type_nspace_prefix) << "TYPE_" << type_name_uc
|
||||
<< ", NULL);" << endl;
|
||||
} else if (t->is_xception()) {
|
||||
string name = (*m_iter)->get_name();
|
||||
indent(f_types_impl_) << "object->" << name << " = NULL;" << endl;
|
||||
|
@ -3424,7 +3444,12 @@ void t_c_glib_generator::generate_object(t_struct* tstruct) {
|
|||
<< "G_PARAM_READWRITE));" << endl;
|
||||
indent_down();
|
||||
} else if (member_type->is_struct() || member_type->is_xception()) {
|
||||
string param_type = this->nspace_uc + "TYPE_"
|
||||
t_program* type_program = member_type->get_program();
|
||||
string type_nspace = type_program ? type_program->get_namespace("c_glib") : "";
|
||||
string type_nspace_prefix =
|
||||
type_nspace.empty() ? "" : initial_caps_to_underscores(type_nspace) + "_";
|
||||
|
||||
string param_type = to_upper_case(type_nspace_prefix) + "TYPE_"
|
||||
+ to_upper_case(initial_caps_to_underscores(member_type->get_name()));
|
||||
|
||||
args_indent += string(20, ' ');
|
||||
|
@ -3480,7 +3505,7 @@ void t_c_glib_generator::generate_object(t_struct* tstruct) {
|
|||
/**
|
||||
* Generates functions to write Thrift structures to a stream.
|
||||
*/
|
||||
void t_c_glib_generator::generate_struct_writer(ofstream& out,
|
||||
void t_c_glib_generator::generate_struct_writer(ostream& out,
|
||||
t_struct* tstruct,
|
||||
string this_name,
|
||||
string this_get,
|
||||
|
@ -3553,7 +3578,7 @@ void t_c_glib_generator::generate_struct_writer(ofstream& out,
|
|||
/**
|
||||
* Generates code to read Thrift structures from a stream.
|
||||
*/
|
||||
void t_c_glib_generator::generate_struct_reader(ofstream& out,
|
||||
void t_c_glib_generator::generate_struct_reader(ostream& out,
|
||||
t_struct* tstruct,
|
||||
string this_name,
|
||||
string this_get,
|
||||
|
@ -3690,7 +3715,7 @@ void t_c_glib_generator::generate_struct_reader(ofstream& out,
|
|||
indent(out) << "}" << endl << endl;
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_serialize_field(ofstream& out,
|
||||
void t_c_glib_generator::generate_serialize_field(ostream& out,
|
||||
t_field* tfield,
|
||||
string prefix,
|
||||
string suffix,
|
||||
|
@ -3734,7 +3759,7 @@ void t_c_glib_generator::generate_serialize_field(ofstream& out,
|
|||
out << "double (protocol, " << name;
|
||||
break;
|
||||
case t_base_type::TYPE_STRING:
|
||||
if (((t_base_type*)type)->is_binary()) {
|
||||
if (type->is_binary()) {
|
||||
out << "binary (protocol, " << name << " ? ((GByteArray *) " << name << ")->data : NULL, "
|
||||
<< name << " ? ((GByteArray *) " << name << ")->len : 0";
|
||||
} else {
|
||||
|
@ -3756,7 +3781,7 @@ void t_c_glib_generator::generate_serialize_field(ofstream& out,
|
|||
}
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_serialize_struct(ofstream& out,
|
||||
void t_c_glib_generator::generate_serialize_struct(ostream& out,
|
||||
t_struct* tstruct,
|
||||
string prefix,
|
||||
int error_ret) {
|
||||
|
@ -3766,7 +3791,7 @@ void t_c_glib_generator::generate_serialize_struct(ofstream& out,
|
|||
<< indent() << "xfer += ret;" << endl << endl;
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_serialize_container(ofstream& out,
|
||||
void t_c_glib_generator::generate_serialize_container(ostream& out,
|
||||
t_type* ttype,
|
||||
string prefix,
|
||||
int error_ret) {
|
||||
|
@ -3923,7 +3948,7 @@ void t_c_glib_generator::generate_serialize_container(ofstream& out,
|
|||
scope_down(out);
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_serialize_map_element(ofstream& out,
|
||||
void t_c_glib_generator::generate_serialize_map_element(ostream& out,
|
||||
t_map* tmap,
|
||||
string key,
|
||||
string value,
|
||||
|
@ -3935,7 +3960,7 @@ void t_c_glib_generator::generate_serialize_map_element(ofstream& out,
|
|||
generate_serialize_field(out, &vfield, "", "", error_ret);
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_serialize_set_element(ofstream& out,
|
||||
void t_c_glib_generator::generate_serialize_set_element(ostream& out,
|
||||
t_set* tset,
|
||||
string element,
|
||||
int error_ret) {
|
||||
|
@ -3943,7 +3968,7 @@ void t_c_glib_generator::generate_serialize_set_element(ofstream& out,
|
|||
generate_serialize_field(out, &efield, "", "", error_ret);
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_serialize_list_element(ofstream& out,
|
||||
void t_c_glib_generator::generate_serialize_list_element(ostream& out,
|
||||
t_list* tlist,
|
||||
string list,
|
||||
string index,
|
||||
|
@ -3975,7 +4000,7 @@ void t_c_glib_generator::generate_serialize_list_element(ofstream& out,
|
|||
}
|
||||
|
||||
/* deserializes a field of any type. */
|
||||
void t_c_glib_generator::generate_deserialize_field(ofstream& out,
|
||||
void t_c_glib_generator::generate_deserialize_field(ostream& out,
|
||||
t_field* tfield,
|
||||
string prefix,
|
||||
string suffix,
|
||||
|
@ -4010,7 +4035,7 @@ void t_c_glib_generator::generate_deserialize_field(ofstream& out,
|
|||
throw "compiler error: cannot serialize void field in a struct: " + name;
|
||||
break;
|
||||
case t_base_type::TYPE_STRING:
|
||||
if (((t_base_type*)type)->is_binary()) {
|
||||
if (type->is_binary()) {
|
||||
out << "binary (protocol, &data, &len";
|
||||
} else {
|
||||
out << "string (protocol, &" << name;
|
||||
|
@ -4042,7 +4067,7 @@ void t_c_glib_generator::generate_deserialize_field(ofstream& out,
|
|||
<< endl;
|
||||
|
||||
// load the byte array with the data
|
||||
if (tbase == t_base_type::TYPE_STRING && ((t_base_type*)type)->is_binary()) {
|
||||
if (tbase == t_base_type::TYPE_STRING && type->is_binary()) {
|
||||
indent(out) << name << " = g_byte_array_new();" << endl;
|
||||
indent(out) << "g_byte_array_append (" << name << ", (guint8 *) data, (guint) len);" << endl;
|
||||
indent(out) << "g_free (data);" << endl;
|
||||
|
@ -4061,14 +4086,14 @@ void t_c_glib_generator::generate_deserialize_field(ofstream& out,
|
|||
// if the type is not required and this is a thrift struct (no prefix),
|
||||
// set the isset variable. if the type is required, then set the
|
||||
// local variable indicating the value was set, so that we can do // validation later.
|
||||
if (tfield->get_req() != t_field::T_REQUIRED && prefix != "") {
|
||||
if (prefix != "" && tfield->get_req() != t_field::T_REQUIRED) {
|
||||
indent(out) << prefix << "__isset_" << tfield->get_name() << suffix << " = TRUE;" << endl;
|
||||
} else if (tfield->get_req() == t_field::T_REQUIRED && prefix != "") {
|
||||
} else if (prefix != "" && tfield->get_req() == t_field::T_REQUIRED) {
|
||||
indent(out) << "isset_" << tfield->get_name() << " = TRUE;" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_deserialize_struct(ofstream& out,
|
||||
void t_c_glib_generator::generate_deserialize_struct(ostream& out,
|
||||
t_struct* tstruct,
|
||||
string prefix,
|
||||
int error_ret,
|
||||
|
@ -4101,7 +4126,7 @@ void t_c_glib_generator::generate_deserialize_struct(ofstream& out,
|
|||
out << indent() << "}" << endl << indent() << "xfer += ret;" << endl;
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_deserialize_container(ofstream& out,
|
||||
void t_c_glib_generator::generate_deserialize_container(ostream& out,
|
||||
t_type* ttype,
|
||||
string prefix,
|
||||
int error_ret) {
|
||||
|
@ -4202,7 +4227,7 @@ void t_c_glib_generator::generate_deserialize_container(ofstream& out,
|
|||
scope_down(out);
|
||||
}
|
||||
|
||||
void t_c_glib_generator::declare_local_variable(ofstream& out, t_type* ttype, string& name, bool for_hash_table) {
|
||||
void t_c_glib_generator::declare_local_variable(ostream& out, t_type* ttype, string& name, bool for_hash_table) {
|
||||
string tname = type_name(ttype);
|
||||
|
||||
/* If the given type is a typedef, find its underlying type so we
|
||||
|
@ -4226,7 +4251,7 @@ void t_c_glib_generator::declare_local_variable(ofstream& out, t_type* ttype, st
|
|||
}
|
||||
}
|
||||
|
||||
void t_c_glib_generator::declore_local_variable_for_write(ofstream& out,
|
||||
void t_c_glib_generator::declore_local_variable_for_write(ostream& out,
|
||||
t_type* ttype,
|
||||
string& name) {
|
||||
string tname = type_name(ttype);
|
||||
|
@ -4236,7 +4261,7 @@ void t_c_glib_generator::declore_local_variable_for_write(ofstream& out,
|
|||
out << indent() << tname << ptr << name << init_val << ";" << endl;
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_deserialize_map_element(ofstream& out,
|
||||
void t_c_glib_generator::generate_deserialize_map_element(ostream& out,
|
||||
t_map* tmap,
|
||||
string prefix,
|
||||
int error_ret) {
|
||||
|
@ -4270,7 +4295,7 @@ void t_c_glib_generator::generate_deserialize_map_element(ofstream& out,
|
|||
indent_down();
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_deserialize_set_element(ofstream& out,
|
||||
void t_c_glib_generator::generate_deserialize_set_element(ostream& out,
|
||||
t_set* tset,
|
||||
string prefix,
|
||||
int error_ret) {
|
||||
|
@ -4290,7 +4315,7 @@ void t_c_glib_generator::generate_deserialize_set_element(ofstream& out,
|
|||
indent_down();
|
||||
}
|
||||
|
||||
void t_c_glib_generator::generate_deserialize_list_element(ofstream& out,
|
||||
void t_c_glib_generator::generate_deserialize_list_element(ostream& out,
|
||||
t_list* tlist,
|
||||
string prefix,
|
||||
string index,
|
||||
|
|
558
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_cl_generator.cc
generated
vendored
Normal file
558
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_cl_generator.cc
generated
vendored
Normal file
|
@ -0,0 +1,558 @@
|
|||
/*
|
||||
* Copyright (c) 2008- Patrick Collison <patrick@collison.ie>
|
||||
* Copyright (c) 2006- Facebook
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <boost/tokenizer.hpp>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
#include "thrift/platform.h"
|
||||
#include "t_oop_generator.h"
|
||||
using namespace std;
|
||||
|
||||
|
||||
/**
|
||||
* Common Lisp code generator.
|
||||
*
|
||||
* @author Patrick Collison <patrick@collison.ie>
|
||||
*/
|
||||
class t_cl_generator : public t_oop_generator {
|
||||
public:
|
||||
t_cl_generator(
|
||||
t_program* program,
|
||||
const std::map<std::string, std::string>& parsed_options,
|
||||
const std::string& option_string)
|
||||
: t_oop_generator(program)
|
||||
{
|
||||
no_asd = false;
|
||||
system_prefix = "thrift-gen-";
|
||||
|
||||
std::map<std::string, std::string>::const_iterator iter;
|
||||
|
||||
for(iter = parsed_options.begin(); iter != parsed_options.end(); ++iter) {
|
||||
if(iter->first.compare("no_asd") == 0) {
|
||||
no_asd = true;
|
||||
} else if (iter->first.compare("sys_pref") == 0) {
|
||||
system_prefix = iter->second;
|
||||
} else {
|
||||
throw "unknown option cl:" + iter->first;
|
||||
}
|
||||
}
|
||||
|
||||
out_dir_base_ = "gen-cl";
|
||||
copy_options_ = option_string;
|
||||
}
|
||||
|
||||
void init_generator();
|
||||
void close_generator();
|
||||
|
||||
void generate_typedef (t_typedef* ttypedef);
|
||||
void generate_enum (t_enum* tenum);
|
||||
void generate_const (t_const* tconst);
|
||||
void generate_struct (t_struct* tstruct);
|
||||
void generate_xception (t_struct* txception);
|
||||
void generate_service (t_service* tservice);
|
||||
void generate_cl_struct (std::ostream& out, t_struct* tstruct, bool is_exception);
|
||||
void generate_cl_struct_internal (std::ostream& out, t_struct* tstruct, bool is_exception);
|
||||
void generate_exception_sig(std::ostream& out, t_function* f);
|
||||
std::string render_const_value(t_type* type, t_const_value* value);
|
||||
|
||||
std::string cl_autogen_comment();
|
||||
void asdf_def(std::ostream &out);
|
||||
void package_def(std::ostream &out);
|
||||
void package_in(std::ostream &out);
|
||||
std::string generated_package();
|
||||
std::string prefix(std::string name);
|
||||
std::string package_of(t_program* program);
|
||||
std::string package();
|
||||
std::string render_includes();
|
||||
|
||||
std::string type_name(t_type* ttype);
|
||||
std::string typespec (t_type *t);
|
||||
std::string function_signature(t_function* tfunction);
|
||||
std::string argument_list(t_struct* tstruct);
|
||||
|
||||
std::string cl_docstring(std::string raw);
|
||||
|
||||
private:
|
||||
|
||||
int temporary_var;
|
||||
/**
|
||||
* Isolate the variable definitions, as they can require structure definitions
|
||||
*/
|
||||
ofstream_with_content_based_conditional_update f_asd_;
|
||||
ofstream_with_content_based_conditional_update f_types_;
|
||||
ofstream_with_content_based_conditional_update f_vars_;
|
||||
|
||||
std::string copy_options_;
|
||||
|
||||
bool no_asd;
|
||||
std::string system_prefix;
|
||||
};
|
||||
|
||||
|
||||
void t_cl_generator::init_generator() {
|
||||
MKDIR(get_out_dir().c_str());
|
||||
string program_dir = get_out_dir() + "/" + program_name_;
|
||||
MKDIR(program_dir.c_str());
|
||||
|
||||
temporary_var = 0;
|
||||
|
||||
string f_types_name = program_dir + "/" + program_name_ + "-types.lisp";
|
||||
string f_vars_name = program_dir + "/" + program_name_ + "-vars.lisp";
|
||||
|
||||
f_types_.open(f_types_name.c_str());
|
||||
f_types_ << cl_autogen_comment() << endl;
|
||||
f_vars_.open(f_vars_name.c_str());
|
||||
f_vars_ << cl_autogen_comment() << endl;
|
||||
|
||||
package_def(f_types_);
|
||||
package_in(f_types_);
|
||||
package_in(f_vars_);
|
||||
|
||||
if (!no_asd) {
|
||||
string f_asd_name = program_dir + "/" + system_prefix + program_name_ + ".asd";
|
||||
f_asd_.open(f_asd_name.c_str());
|
||||
f_asd_ << cl_autogen_comment() << endl;
|
||||
asdf_def(f_asd_);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders all the imports necessary for including another Thrift program
|
||||
*/
|
||||
string t_cl_generator::render_includes() {
|
||||
const vector<t_program*>& includes = program_->get_includes();
|
||||
string result = "";
|
||||
result += ":depends-on (:thrift";
|
||||
for (size_t i = 0; i < includes.size(); ++i) {
|
||||
result += " :" + system_prefix + underscore(includes[i]->get_name());
|
||||
}
|
||||
result += ")\n";
|
||||
return result;
|
||||
}
|
||||
|
||||
string t_cl_generator::package_of(t_program* program) {
|
||||
string prefix = program->get_namespace("cl");
|
||||
return prefix.empty() ? "thrift-generated" : prefix;
|
||||
}
|
||||
|
||||
string t_cl_generator::package() {
|
||||
return package_of(program_);
|
||||
}
|
||||
|
||||
string t_cl_generator::prefix(string symbol) {
|
||||
return "\"" + symbol + "\"";
|
||||
}
|
||||
|
||||
string t_cl_generator::cl_autogen_comment() {
|
||||
return
|
||||
std::string(";;; ") + "Autogenerated by Thrift\n" +
|
||||
";;; DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +
|
||||
";;; options string: " + copy_options_ + "\n";
|
||||
}
|
||||
|
||||
string t_cl_generator::cl_docstring(string raw) {
|
||||
replace(raw.begin(), raw.end(), '"', '\'');
|
||||
return raw;
|
||||
}
|
||||
|
||||
|
||||
void t_cl_generator::close_generator() {
|
||||
f_asd_.close();
|
||||
f_types_.close();
|
||||
f_vars_.close();
|
||||
}
|
||||
|
||||
string t_cl_generator::generated_package() {
|
||||
return program_->get_namespace("cpp");
|
||||
}
|
||||
|
||||
void t_cl_generator::asdf_def(std::ostream &out) {
|
||||
out << "(asdf:defsystem #:" << system_prefix << program_name_ << endl;
|
||||
indent_up();
|
||||
out << indent() << render_includes()
|
||||
<< indent() << ":serial t" << endl
|
||||
<< indent() << ":components ("
|
||||
<< "(:file \"" << program_name_ << "-types\") "
|
||||
<< "(:file \"" << program_name_ << "-vars\")))" << endl;
|
||||
indent_down();
|
||||
}
|
||||
|
||||
/***
|
||||
* Generate a package definition. Add use references equivalent to the idl file's include statements.
|
||||
*/
|
||||
void t_cl_generator::package_def(std::ostream &out) {
|
||||
const vector<t_program*>& includes = program_->get_includes();
|
||||
|
||||
out << "(thrift:def-package :" << package();
|
||||
if ( includes.size() > 0 ) {
|
||||
out << " :use (";
|
||||
for (size_t i = 0; i < includes.size(); ++i) {
|
||||
out << " :" << includes[i]->get_name();
|
||||
}
|
||||
out << ")";
|
||||
}
|
||||
out << ")" << endl << endl;
|
||||
}
|
||||
|
||||
void t_cl_generator::package_in(std::ostream &out) {
|
||||
out << "(cl:in-package :" << package() << ")" << endl << endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a typedef. This is not done in Common Lisp, types are all implicit.
|
||||
*
|
||||
* @param ttypedef The type definition
|
||||
*/
|
||||
void t_cl_generator::generate_typedef(t_typedef* ttypedef) {
|
||||
(void)ttypedef;
|
||||
}
|
||||
|
||||
void t_cl_generator::generate_enum(t_enum* tenum) {
|
||||
f_types_ << "(thrift:def-enum " << prefix(tenum->get_name()) << endl;
|
||||
|
||||
vector<t_enum_value*> constants = tenum->get_constants();
|
||||
vector<t_enum_value*>::iterator c_iter;
|
||||
int value = -1;
|
||||
|
||||
indent_up();
|
||||
f_types_ << indent() << "(";
|
||||
for (c_iter = constants.begin(); c_iter != constants.end(); ++c_iter) {
|
||||
value = (*c_iter)->get_value();
|
||||
|
||||
if(c_iter != constants.begin()) f_types_ << endl << indent() << " ";
|
||||
|
||||
f_types_ << "(\"" << (*c_iter)->get_name() << "\" . " << value << ")";
|
||||
}
|
||||
indent_down();
|
||||
f_types_ << "))" << endl << endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a constant value
|
||||
*/
|
||||
void t_cl_generator::generate_const(t_const* tconst) {
|
||||
t_type* type = tconst->get_type();
|
||||
string name = tconst->get_name();
|
||||
t_const_value* value = tconst->get_value();
|
||||
|
||||
f_vars_ << "(thrift:def-constant " << prefix(name) << " " << render_const_value(type, value) << ")"
|
||||
<< endl << endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the value of a constant with the given type. Note that type checking
|
||||
* is NOT performed in this function as it is always run beforehand using the
|
||||
* validate_types method in main.cc
|
||||
*/
|
||||
string t_cl_generator::render_const_value(t_type* type, t_const_value* value) {
|
||||
type = get_true_type(type);
|
||||
std::ostringstream out;
|
||||
if (type->is_base_type()) {
|
||||
t_base_type::t_base tbase = ((t_base_type*)type)->get_base();
|
||||
switch (tbase) {
|
||||
case t_base_type::TYPE_STRING:
|
||||
out << "\"" << value->get_string() << "\"";
|
||||
break;
|
||||
case t_base_type::TYPE_BOOL:
|
||||
out << (value->get_integer() > 0 ? "t" : "nil");
|
||||
break;
|
||||
case t_base_type::TYPE_I8:
|
||||
case t_base_type::TYPE_I16:
|
||||
case t_base_type::TYPE_I32:
|
||||
case t_base_type::TYPE_I64:
|
||||
out << value->get_integer();
|
||||
break;
|
||||
case t_base_type::TYPE_DOUBLE:
|
||||
if (value->get_type() == t_const_value::CV_INTEGER) {
|
||||
out << value->get_integer();
|
||||
} else {
|
||||
out << value->get_double();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw "compiler error: no const of base type " + t_base_type::t_base_name(tbase);
|
||||
}
|
||||
} else if (type->is_enum()) {
|
||||
indent(out) << value->get_integer();
|
||||
} else if (type->is_struct() || type->is_xception()) {
|
||||
out << (type->is_struct() ? "(make-instance '" : "(make-exception '") <<
|
||||
lowercase(type->get_name()) << " " << endl;
|
||||
indent_up();
|
||||
|
||||
const vector<t_field*>& fields = ((t_struct*)type)->get_members();
|
||||
vector<t_field*>::const_iterator f_iter;
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
|
||||
for (v_iter = val.begin(); v_iter != val.end(); ++v_iter) {
|
||||
t_type* field_type = NULL;
|
||||
for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
|
||||
if ((*f_iter)->get_name() == v_iter->first->get_string()) {
|
||||
field_type = (*f_iter)->get_type();
|
||||
}
|
||||
}
|
||||
if (field_type == NULL) {
|
||||
throw "type error: " + type->get_name() + " has no field " + v_iter->first->get_string();
|
||||
}
|
||||
|
||||
out << indent() << ":" << v_iter->first->get_string() << " " <<
|
||||
render_const_value(field_type, v_iter->second) << endl;
|
||||
}
|
||||
out << indent() << ")";
|
||||
|
||||
indent_down();
|
||||
} else if (type->is_map()) {
|
||||
// emit an hash form with both keys and values to be evaluated
|
||||
t_type* ktype = ((t_map*)type)->get_key_type();
|
||||
t_type* vtype = ((t_map*)type)->get_val_type();
|
||||
out << "(thrift:map ";
|
||||
indent_up();
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
for (v_iter = val.begin(); v_iter != val.end(); ++v_iter) {
|
||||
out << endl << indent()
|
||||
<< "(cl:cons " << render_const_value(ktype, v_iter->first) << " "
|
||||
<< render_const_value(vtype, v_iter->second) << ")";
|
||||
}
|
||||
indent_down();
|
||||
out << indent() << ")";
|
||||
} else if (type->is_list() || type->is_set()) {
|
||||
t_type* etype;
|
||||
if (type->is_list()) {
|
||||
etype = ((t_list*)type)->get_elem_type();
|
||||
} else {
|
||||
etype = ((t_set*)type)->get_elem_type();
|
||||
}
|
||||
if (type->is_set()) {
|
||||
out << "(thrift:set" << endl;
|
||||
} else {
|
||||
out << "(thrift:list" << endl;
|
||||
}
|
||||
indent_up();
|
||||
indent_up();
|
||||
const vector<t_const_value*>& val = value->get_list();
|
||||
vector<t_const_value*>::const_iterator v_iter;
|
||||
for (v_iter = val.begin(); v_iter != val.end(); ++v_iter) {
|
||||
out << indent() << render_const_value(etype, *v_iter) << endl;
|
||||
}
|
||||
out << indent() << ")";
|
||||
indent_down();
|
||||
indent_down();
|
||||
} else {
|
||||
throw "CANNOT GENERATE CONSTANT FOR TYPE: " + type->get_name();
|
||||
}
|
||||
return out.str();
|
||||
}
|
||||
|
||||
void t_cl_generator::generate_struct(t_struct* tstruct) {
|
||||
generate_cl_struct(f_types_, tstruct, false);
|
||||
}
|
||||
|
||||
void t_cl_generator::generate_xception(t_struct* txception) {
|
||||
generate_cl_struct(f_types_, txception, true);
|
||||
}
|
||||
|
||||
void t_cl_generator::generate_cl_struct_internal(std::ostream& out, t_struct* tstruct, bool is_exception) {
|
||||
(void)is_exception;
|
||||
const vector<t_field*>& members = tstruct->get_members();
|
||||
vector<t_field*>::const_iterator m_iter;
|
||||
|
||||
out << "(";
|
||||
|
||||
for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
|
||||
t_const_value* value = (*m_iter)->get_value();
|
||||
t_type* type = (*m_iter)->get_type();
|
||||
|
||||
if (m_iter != members.begin()) {
|
||||
out << endl << indent() << " ";
|
||||
}
|
||||
out << "(" << prefix((*m_iter)->get_name()) << " " <<
|
||||
( (NULL != value) ? render_const_value(type, value) : "nil" ) <<
|
||||
" :id " << (*m_iter)->get_key();
|
||||
if ( type->is_base_type() && "string" == typespec(type) )
|
||||
if ( ((t_base_type*)type)->is_binary() )
|
||||
out << " :type binary";
|
||||
else
|
||||
out << " :type string";
|
||||
else
|
||||
out << " :type " << typespec(type);
|
||||
if ( (*m_iter)->get_req() == t_field::T_OPTIONAL ) {
|
||||
out << " :optional t";
|
||||
}
|
||||
if ( (*m_iter)->has_doc()) {
|
||||
out << " :documentation \"" << cl_docstring((*m_iter)->get_doc()) << "\"";
|
||||
}
|
||||
out <<")";
|
||||
}
|
||||
|
||||
out << ")";
|
||||
}
|
||||
|
||||
void t_cl_generator::generate_cl_struct(std::ostream& out, t_struct* tstruct, bool is_exception = false) {
|
||||
std::string name = type_name(tstruct);
|
||||
out << (is_exception ? "(thrift:def-exception " : "(thrift:def-struct ") <<
|
||||
prefix(name) << endl;
|
||||
indent_up();
|
||||
if ( tstruct->has_doc() ) {
|
||||
out << indent() ;
|
||||
out << "\"" << cl_docstring(tstruct->get_doc()) << "\"" << endl;
|
||||
}
|
||||
out << indent() ;
|
||||
generate_cl_struct_internal(out, tstruct, is_exception);
|
||||
indent_down();
|
||||
out << ")" << endl << endl;
|
||||
}
|
||||
|
||||
void t_cl_generator::generate_exception_sig(std::ostream& out, t_function* f) {
|
||||
generate_cl_struct_internal(out, f->get_xceptions(), true);
|
||||
}
|
||||
|
||||
void t_cl_generator::generate_service(t_service* tservice) {
|
||||
string extends_client;
|
||||
vector<t_function*> functions = tservice->get_functions();
|
||||
vector<t_function*>::iterator f_iter;
|
||||
|
||||
if (tservice->get_extends() != NULL) {
|
||||
extends_client = type_name(tservice->get_extends());
|
||||
}
|
||||
|
||||
extends_client = extends_client.empty() ? "nil" : prefix(extends_client);
|
||||
|
||||
f_types_ << "(thrift:def-service " << prefix(service_name_) << " "
|
||||
<< extends_client;
|
||||
|
||||
indent_up();
|
||||
|
||||
if ( tservice->has_doc()) {
|
||||
f_types_ << endl << indent()
|
||||
<< "(:documentation \"" << cl_docstring(tservice->get_doc()) << "\")";
|
||||
}
|
||||
|
||||
for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
|
||||
t_function* function = *f_iter;
|
||||
string fname = function->get_name();
|
||||
string signature = function_signature(function);
|
||||
t_struct* exceptions = function->get_xceptions();
|
||||
const vector<t_field*>& xmembers = exceptions->get_members();
|
||||
|
||||
f_types_ << endl << indent() << "(:method " << prefix(fname);
|
||||
f_types_ << " (" << signature << " " << typespec((*f_iter)->get_returntype()) << ")";
|
||||
if (xmembers.size() > 0) {
|
||||
f_types_ << endl << indent() << " :exceptions " ;
|
||||
generate_exception_sig(f_types_, function);
|
||||
}
|
||||
if ( (*f_iter)->is_oneway() ) {
|
||||
f_types_ << endl << indent() << " :oneway t";
|
||||
}
|
||||
if ( (*f_iter)->has_doc() ) {
|
||||
f_types_ << endl << indent() << " :documentation \""
|
||||
<< cl_docstring((*f_iter)->get_doc()) << "\"";
|
||||
}
|
||||
f_types_ << ")";
|
||||
}
|
||||
|
||||
f_types_ << ")" << endl << endl;
|
||||
|
||||
indent_down();
|
||||
}
|
||||
|
||||
string t_cl_generator::typespec(t_type *t) {
|
||||
t = get_true_type(t);
|
||||
|
||||
if (t -> is_binary()){
|
||||
return "binary";
|
||||
} else if (t->is_base_type()) {
|
||||
return type_name(t);
|
||||
} else if (t->is_map()) {
|
||||
t_map *m = (t_map*) t;
|
||||
return "(thrift:map " + typespec(m->get_key_type()) + " " +
|
||||
typespec(m->get_val_type()) + ")";
|
||||
} else if (t->is_struct() || t->is_xception()) {
|
||||
return "(struct " + prefix(type_name(t)) + ")";
|
||||
} else if (t->is_list()) {
|
||||
return "(thrift:list " + typespec(((t_list*) t)->get_elem_type()) + ")";
|
||||
} else if (t->is_set()) {
|
||||
return "(thrift:set " + typespec(((t_set*) t)->get_elem_type()) + ")";
|
||||
} else if (t->is_enum()) {
|
||||
return "(enum \"" + ((t_enum*) t)->get_name() + "\")";
|
||||
} else {
|
||||
throw "Sorry, I don't know how to generate this: " + type_name(t);
|
||||
}
|
||||
}
|
||||
|
||||
string t_cl_generator::function_signature(t_function* tfunction) {
|
||||
return argument_list(tfunction->get_arglist());
|
||||
}
|
||||
|
||||
string t_cl_generator::argument_list(t_struct* tstruct) {
|
||||
stringstream res;
|
||||
res << "(";
|
||||
|
||||
const vector<t_field*>& fields = tstruct->get_members();
|
||||
vector<t_field*>::const_iterator f_iter;
|
||||
bool first = true;
|
||||
for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
|
||||
if (first) {
|
||||
first = false;
|
||||
} else {
|
||||
res << " ";
|
||||
}
|
||||
res << "(" + prefix((*f_iter)->get_name()) << " " <<
|
||||
typespec((*f_iter)->get_type()) << " " <<
|
||||
(*f_iter)->get_key() << ")";
|
||||
|
||||
|
||||
}
|
||||
res << ")";
|
||||
return res.str();
|
||||
}
|
||||
|
||||
string t_cl_generator::type_name(t_type* ttype) {
|
||||
string prefix = "";
|
||||
t_program* program = ttype->get_program();
|
||||
|
||||
if (program != NULL && program != program_)
|
||||
prefix = package_of(program) == package() ? "" : package_of(program) + ":";
|
||||
|
||||
string name = ttype->get_name();
|
||||
|
||||
if (ttype->is_struct() || ttype->is_xception())
|
||||
name = lowercase(ttype->get_name());
|
||||
|
||||
return prefix + name;
|
||||
}
|
||||
|
||||
THRIFT_REGISTER_GENERATOR(
|
||||
cl,
|
||||
"Common Lisp",
|
||||
" no_asd: Do not define ASDF systems for each generated Thrift program.\n"
|
||||
" sys_pref= The prefix to give ASDF system names. Default: thrift-gen-\n")
|
188
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_cocoa_generator.cc
generated
vendored
188
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_cocoa_generator.cc
generated
vendored
|
@ -109,35 +109,35 @@ public:
|
|||
bool box_it = false);
|
||||
|
||||
void generate_cocoa_struct(t_struct* tstruct, bool is_exception);
|
||||
void generate_cocoa_struct_interface(std::ofstream& out,
|
||||
void generate_cocoa_struct_interface(std::ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_xception = false);
|
||||
void generate_cocoa_struct_implementation(std::ofstream& out,
|
||||
void generate_cocoa_struct_implementation(std::ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_xception = false,
|
||||
bool is_result = false);
|
||||
void generate_cocoa_struct_initializer_signature(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_init_with_coder_method(ofstream& out,
|
||||
void generate_cocoa_struct_initializer_signature(std::ostream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_init_with_coder_method(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception);
|
||||
void generate_cocoa_struct_encode_with_coder_method(ofstream& out,
|
||||
void generate_cocoa_struct_encode_with_coder_method(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception);
|
||||
void generate_cocoa_struct_copy_method(ofstream& out,
|
||||
void generate_cocoa_struct_copy_method(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception);
|
||||
void generate_cocoa_struct_hash_method(ofstream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_is_equal_method(ofstream& out,
|
||||
void generate_cocoa_struct_hash_method(ostream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_is_equal_method(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception);
|
||||
void generate_cocoa_struct_field_accessor_implementations(std::ofstream& out,
|
||||
void generate_cocoa_struct_field_accessor_implementations(std::ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception);
|
||||
void generate_cocoa_struct_reader(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_result_writer(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_writer(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_validator(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_description(std::ofstream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_reader(std::ostream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_result_writer(std::ostream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_writer(std::ostream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_validator(std::ostream& out, t_struct* tstruct);
|
||||
void generate_cocoa_struct_description(std::ostream& out, t_struct* tstruct);
|
||||
|
||||
std::string function_result_helper_struct_type(t_service *tservice, t_function* tfunction);
|
||||
std::string function_args_helper_struct_type(t_service* tservice, t_function* tfunction);
|
||||
|
@ -147,29 +147,29 @@ public:
|
|||
* Service-level generation functions
|
||||
*/
|
||||
|
||||
void generate_cocoa_service_protocol(std::ofstream& out, t_service* tservice);
|
||||
void generate_cocoa_service_async_protocol(std::ofstream& out, t_service* tservice);
|
||||
void generate_cocoa_service_protocol(std::ostream& out, t_service* tservice);
|
||||
void generate_cocoa_service_async_protocol(std::ostream& out, t_service* tservice);
|
||||
|
||||
void generate_cocoa_service_client_interface(std::ofstream& out, t_service* tservice);
|
||||
void generate_cocoa_service_client_async_interface(std::ofstream& out, t_service* tservice);
|
||||
void generate_cocoa_service_client_interface(std::ostream& out, t_service* tservice);
|
||||
void generate_cocoa_service_client_async_interface(std::ostream& out, t_service* tservice);
|
||||
|
||||
void generate_cocoa_service_client_send_function_implementation(ofstream& out,
|
||||
void generate_cocoa_service_client_send_function_implementation(ostream& out,
|
||||
t_service* tservice,
|
||||
t_function* tfunction,
|
||||
bool needs_protocol);
|
||||
void generate_cocoa_service_client_send_function_invocation(ofstream& out, t_function* tfunction);
|
||||
void generate_cocoa_service_client_send_async_function_invocation(ofstream& out,
|
||||
void generate_cocoa_service_client_send_function_invocation(ostream& out, t_function* tfunction);
|
||||
void generate_cocoa_service_client_send_async_function_invocation(ostream& out,
|
||||
t_function* tfunction,
|
||||
string failureBlockName);
|
||||
void generate_cocoa_service_client_recv_function_implementation(ofstream& out,
|
||||
void generate_cocoa_service_client_recv_function_implementation(ostream& out,
|
||||
t_service* tservice,
|
||||
t_function* tfunction,
|
||||
bool needs_protocol);
|
||||
void generate_cocoa_service_client_implementation(std::ofstream& out, t_service* tservice);
|
||||
void generate_cocoa_service_client_async_implementation(std::ofstream& out, t_service* tservice);
|
||||
void generate_cocoa_service_client_implementation(std::ostream& out, t_service* tservice);
|
||||
void generate_cocoa_service_client_async_implementation(std::ostream& out, t_service* tservice);
|
||||
|
||||
void generate_cocoa_service_server_interface(std::ofstream& out, t_service* tservice);
|
||||
void generate_cocoa_service_server_implementation(std::ofstream& out, t_service* tservice);
|
||||
void generate_cocoa_service_server_interface(std::ostream& out, t_service* tservice);
|
||||
void generate_cocoa_service_server_implementation(std::ostream& out, t_service* tservice);
|
||||
void generate_cocoa_service_helpers(t_service* tservice);
|
||||
void generate_service_client(t_service* tservice);
|
||||
void generate_service_server(t_service* tservice);
|
||||
|
@ -179,34 +179,34 @@ public:
|
|||
* Serialization constructs
|
||||
*/
|
||||
|
||||
void generate_deserialize_field(std::ofstream& out, t_field* tfield, std::string fieldName);
|
||||
void generate_deserialize_field(std::ostream& out, t_field* tfield, std::string fieldName);
|
||||
|
||||
void generate_deserialize_struct(std::ofstream& out, t_struct* tstruct, std::string prefix = "");
|
||||
void generate_deserialize_struct(std::ostream& out, t_struct* tstruct, std::string prefix = "");
|
||||
|
||||
void generate_deserialize_container(std::ofstream& out, t_type* ttype, std::string prefix = "");
|
||||
void generate_deserialize_container(std::ostream& out, t_type* ttype, std::string prefix = "");
|
||||
|
||||
void generate_deserialize_set_element(std::ofstream& out, t_set* tset, std::string prefix = "");
|
||||
void generate_deserialize_set_element(std::ostream& out, t_set* tset, std::string prefix = "");
|
||||
|
||||
void generate_deserialize_map_element(std::ofstream& out, t_map* tmap, std::string prefix = "");
|
||||
void generate_deserialize_map_element(std::ostream& out, t_map* tmap, std::string prefix = "");
|
||||
|
||||
void generate_deserialize_list_element(std::ofstream& out,
|
||||
void generate_deserialize_list_element(std::ostream& out,
|
||||
t_list* tlist,
|
||||
std::string prefix = "");
|
||||
|
||||
void generate_serialize_field(std::ofstream& out, t_field* tfield, std::string prefix = "");
|
||||
void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
|
||||
|
||||
void generate_serialize_struct(std::ofstream& out, t_struct* tstruct, std::string fieldName = "");
|
||||
void generate_serialize_struct(std::ostream& out, t_struct* tstruct, std::string fieldName = "");
|
||||
|
||||
void generate_serialize_container(std::ofstream& out, t_type* ttype, std::string prefix = "");
|
||||
void generate_serialize_container(std::ostream& out, t_type* ttype, std::string prefix = "");
|
||||
|
||||
void generate_serialize_map_element(std::ofstream& out,
|
||||
void generate_serialize_map_element(std::ostream& out,
|
||||
t_map* tmap,
|
||||
std::string iter,
|
||||
std::string map);
|
||||
|
||||
void generate_serialize_set_element(std::ofstream& out, t_set* tmap, std::string iter);
|
||||
void generate_serialize_set_element(std::ostream& out, t_set* tmap, std::string iter);
|
||||
|
||||
void generate_serialize_list_element(std::ofstream& out,
|
||||
void generate_serialize_list_element(std::ostream& out,
|
||||
t_list* tlist,
|
||||
std::string index,
|
||||
std::string listName);
|
||||
|
@ -238,6 +238,12 @@ public:
|
|||
std::string getter_name(string field_name);
|
||||
std::string setter_name(string field_name);
|
||||
|
||||
bool type_can_be_copy(t_type* ttype) {
|
||||
ttype = get_true_type(ttype);
|
||||
|
||||
return ttype->is_string();
|
||||
}
|
||||
|
||||
bool type_can_be_null(t_type* ttype) {
|
||||
ttype = get_true_type(ttype);
|
||||
|
||||
|
@ -254,8 +260,8 @@ private:
|
|||
* File streams
|
||||
*/
|
||||
|
||||
std::ofstream f_header_;
|
||||
std::ofstream f_impl_;
|
||||
ofstream_with_content_based_conditional_update f_header_;
|
||||
ofstream_with_content_based_conditional_update f_impl_;
|
||||
|
||||
bool log_unexpected_;
|
||||
bool validate_required_;
|
||||
|
@ -568,7 +574,7 @@ void t_cocoa_generator::generate_xception(t_struct* txception) {
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_interface(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_struct_interface(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception) {
|
||||
|
||||
|
@ -618,7 +624,7 @@ void t_cocoa_generator::generate_cocoa_struct_interface(ofstream& out,
|
|||
* Generate signature for initializer of struct with a parameter for
|
||||
* each field.
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_initializer_signature(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_struct_initializer_signature(ostream& out,
|
||||
t_struct* tstruct) {
|
||||
const vector<t_field*>& members = tstruct->get_members();
|
||||
vector<t_field*>::const_iterator m_iter;
|
||||
|
@ -641,7 +647,7 @@ void t_cocoa_generator::generate_cocoa_struct_initializer_signature(ofstream& ou
|
|||
* Generate the initWithCoder method for this struct so it's compatible with
|
||||
* the NSCoding protocol
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_init_with_coder_method(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_struct_init_with_coder_method(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception) {
|
||||
|
||||
|
@ -713,7 +719,7 @@ void t_cocoa_generator::generate_cocoa_struct_init_with_coder_method(ofstream& o
|
|||
* Generate the encodeWithCoder method for this struct so it's compatible with
|
||||
* the NSCoding protocol
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_encode_with_coder_method(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_struct_encode_with_coder_method(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception) {
|
||||
|
||||
|
@ -780,7 +786,7 @@ void t_cocoa_generator::generate_cocoa_struct_encode_with_coder_method(ofstream&
|
|||
/**
|
||||
* Generate the copy method for this struct
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_copy_method(ofstream& out, t_struct* tstruct, bool is_exception) {
|
||||
void t_cocoa_generator::generate_cocoa_struct_copy_method(ostream& out, t_struct* tstruct, bool is_exception) {
|
||||
out << indent() << "- (instancetype) copyWithZone:(NSZone *)zone" << endl;
|
||||
scope_up(out);
|
||||
|
||||
|
@ -815,7 +821,7 @@ void t_cocoa_generator::generate_cocoa_struct_copy_method(ofstream& out, t_struc
|
|||
/**
|
||||
* Generate the hash method for this struct
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_hash_method(ofstream& out, t_struct* tstruct) {
|
||||
void t_cocoa_generator::generate_cocoa_struct_hash_method(ostream& out, t_struct* tstruct) {
|
||||
indent(out) << "- (NSUInteger) hash" << endl;
|
||||
scope_up(out);
|
||||
out << indent() << "NSUInteger hash = 17;" << endl;
|
||||
|
@ -846,7 +852,7 @@ void t_cocoa_generator::generate_cocoa_struct_hash_method(ofstream& out, t_struc
|
|||
/**
|
||||
* Generate the isEqual method for this struct
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_is_equal_method(ofstream& out, t_struct* tstruct, bool is_exception) {
|
||||
void t_cocoa_generator::generate_cocoa_struct_is_equal_method(ostream& out, t_struct* tstruct, bool is_exception) {
|
||||
indent(out) << "- (BOOL) isEqual: (id) anObject" << endl;
|
||||
scope_up(out);
|
||||
|
||||
|
@ -913,7 +919,7 @@ void t_cocoa_generator::generate_cocoa_struct_is_equal_method(ofstream& out, t_s
|
|||
* @param is_exception Is this an exception?
|
||||
* @param is_result If this is a result it needs a different writer
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_implementation(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_struct_implementation(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception,
|
||||
bool is_result) {
|
||||
|
@ -1017,7 +1023,7 @@ void t_cocoa_generator::generate_cocoa_struct_implementation(ofstream& out,
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_reader(ofstream& out, t_struct* tstruct) {
|
||||
void t_cocoa_generator::generate_cocoa_struct_reader(ostream& out, t_struct* tstruct) {
|
||||
out << "- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError" << endl;
|
||||
scope_up(out);
|
||||
|
||||
|
@ -1111,7 +1117,7 @@ void t_cocoa_generator::generate_cocoa_struct_reader(ofstream& out, t_struct* ts
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_writer(ofstream& out, t_struct* tstruct) {
|
||||
void t_cocoa_generator::generate_cocoa_struct_writer(ostream& out, t_struct* tstruct) {
|
||||
out << indent() << "- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {" << endl;
|
||||
indent_up();
|
||||
|
||||
|
@ -1162,7 +1168,7 @@ void t_cocoa_generator::generate_cocoa_struct_writer(ofstream& out, t_struct* ts
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_result_writer(ofstream& out, t_struct* tstruct) {
|
||||
void t_cocoa_generator::generate_cocoa_struct_result_writer(ostream& out, t_struct* tstruct) {
|
||||
out << indent() << "- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {" << endl;
|
||||
indent_up();
|
||||
|
||||
|
@ -1225,7 +1231,7 @@ void t_cocoa_generator::generate_cocoa_struct_result_writer(ofstream& out, t_str
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_validator(ofstream& out, t_struct* tstruct) {
|
||||
void t_cocoa_generator::generate_cocoa_struct_validator(ostream& out, t_struct* tstruct) {
|
||||
out << indent() << "- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {" << endl;
|
||||
indent_up();
|
||||
|
||||
|
@ -1259,7 +1265,7 @@ void t_cocoa_generator::generate_cocoa_struct_validator(ofstream& out, t_struct*
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_field_accessor_implementations(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_struct_field_accessor_implementations(ostream& out,
|
||||
t_struct* tstruct,
|
||||
bool is_exception) {
|
||||
(void)is_exception;
|
||||
|
@ -1298,7 +1304,7 @@ void t_cocoa_generator::generate_cocoa_struct_field_accessor_implementations(ofs
|
|||
*
|
||||
* @param tstruct The struct definition
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_struct_description(ofstream& out, t_struct* tstruct) {
|
||||
void t_cocoa_generator::generate_cocoa_struct_description(ostream& out, t_struct* tstruct) {
|
||||
|
||||
// Allow use of debugDescription so the app can add description via a cateogory/extension
|
||||
if (debug_descriptions_) {
|
||||
|
@ -1428,7 +1434,7 @@ void t_cocoa_generator::generate_function_helpers(t_service *tservice, t_functio
|
|||
*
|
||||
* @param tservice The service to generate a protocol definition for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_protocol(ofstream& out, t_service* tservice) {
|
||||
void t_cocoa_generator::generate_cocoa_service_protocol(ostream& out, t_service* tservice) {
|
||||
out << "@protocol " << cocoa_prefix_ << tservice->get_name() << " <NSObject>" << endl;
|
||||
|
||||
vector<t_function*> functions = tservice->get_functions();
|
||||
|
@ -1452,7 +1458,7 @@ void t_cocoa_generator::generate_cocoa_service_protocol(ofstream& out, t_service
|
|||
*
|
||||
* @param tservice The service to generate a protocol definition for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_async_protocol(ofstream& out, t_service* tservice) {
|
||||
void t_cocoa_generator::generate_cocoa_service_async_protocol(ostream& out, t_service* tservice) {
|
||||
out << "@protocol " << cocoa_prefix_ << tservice->get_name() << "Async"
|
||||
<< " <NSObject>" << endl;
|
||||
|
||||
|
@ -1472,7 +1478,7 @@ void t_cocoa_generator::generate_cocoa_service_async_protocol(ofstream& out, t_s
|
|||
*
|
||||
* @param tservice The service to generate a client interface definition for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_client_interface(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_service_client_interface(ostream& out,
|
||||
t_service* tservice) {
|
||||
out << "@interface " << cocoa_prefix_ << tservice->get_name() << "Client : TBaseClient <"
|
||||
<< cocoa_prefix_ << tservice->get_name() << "> " << endl;
|
||||
|
@ -1488,7 +1494,7 @@ void t_cocoa_generator::generate_cocoa_service_client_interface(ofstream& out,
|
|||
*
|
||||
* @param tservice The service to generate a client interface definition for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_client_async_interface(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_service_client_async_interface(ostream& out,
|
||||
t_service* tservice) {
|
||||
out << "@interface " << cocoa_prefix_ << tservice->get_name() << "ClientAsync : TBaseClient <"
|
||||
<< cocoa_prefix_ << tservice->get_name() << "Async> " << endl
|
||||
|
@ -1506,7 +1512,7 @@ void t_cocoa_generator::generate_cocoa_service_client_async_interface(ofstream&
|
|||
*
|
||||
* @param tservice The service to generate a client interface definition for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_server_interface(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_service_server_interface(ostream& out,
|
||||
t_service* tservice) {
|
||||
out << "@interface " << cocoa_prefix_ << tservice->get_name()
|
||||
<< "Processor : NSObject <TProcessor> " << endl;
|
||||
|
@ -1519,7 +1525,7 @@ void t_cocoa_generator::generate_cocoa_service_server_interface(ofstream& out,
|
|||
}
|
||||
|
||||
void t_cocoa_generator::generate_cocoa_service_client_send_function_implementation(
|
||||
ofstream& out,
|
||||
ostream& out,
|
||||
t_service *tservice,
|
||||
t_function* tfunction,
|
||||
bool needs_protocol) {
|
||||
|
@ -1577,7 +1583,7 @@ void t_cocoa_generator::generate_cocoa_service_client_send_function_implementati
|
|||
}
|
||||
|
||||
void t_cocoa_generator::generate_cocoa_service_client_recv_function_implementation(
|
||||
ofstream& out,
|
||||
ostream& out,
|
||||
t_service* tservice,
|
||||
t_function* tfunction,
|
||||
bool needs_protocol) {
|
||||
|
@ -1666,7 +1672,7 @@ void t_cocoa_generator::generate_cocoa_service_client_recv_function_implementati
|
|||
* @param tfunction The service to generate an implementation for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_client_send_function_invocation(
|
||||
ofstream& out,
|
||||
ostream& out,
|
||||
t_function* tfunction) {
|
||||
|
||||
t_struct* arg_struct = tfunction->get_arglist();
|
||||
|
@ -1696,7 +1702,7 @@ void t_cocoa_generator::generate_cocoa_service_client_send_function_invocation(
|
|||
* @param tfunction The service to generate an implementation for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_client_send_async_function_invocation(
|
||||
ofstream& out,
|
||||
ostream& out,
|
||||
t_function* tfunction,
|
||||
string failureBlockName) {
|
||||
|
||||
|
@ -1730,7 +1736,7 @@ void t_cocoa_generator::generate_cocoa_service_client_send_async_function_invoca
|
|||
*
|
||||
* @param tservice The service to generate an implementation for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_client_implementation(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_service_client_implementation(ostream& out,
|
||||
t_service* tservice) {
|
||||
|
||||
string name = cocoa_prefix_ + tservice->get_name() + "Client";
|
||||
|
@ -1814,7 +1820,7 @@ void t_cocoa_generator::generate_cocoa_service_client_implementation(ofstream& o
|
|||
*
|
||||
* @param tservice The service to generate an implementation for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_client_async_implementation(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_service_client_async_implementation(ostream& out,
|
||||
t_service* tservice) {
|
||||
|
||||
string name = cocoa_prefix_ + tservice->get_name() + "ClientAsync";
|
||||
|
@ -1974,7 +1980,7 @@ void t_cocoa_generator::generate_cocoa_service_client_async_implementation(ofstr
|
|||
*
|
||||
* @param tservice The service to generate an implementation for
|
||||
*/
|
||||
void t_cocoa_generator::generate_cocoa_service_server_implementation(ofstream& out,
|
||||
void t_cocoa_generator::generate_cocoa_service_server_implementation(ostream& out,
|
||||
t_service* tservice) {
|
||||
|
||||
string name = cocoa_prefix_ + tservice->get_name() + "Processor";
|
||||
|
@ -2150,7 +2156,7 @@ void t_cocoa_generator::generate_cocoa_service_server_implementation(ofstream& o
|
|||
* @param tfield The field
|
||||
* @param fieldName The variable name for this field
|
||||
*/
|
||||
void t_cocoa_generator::generate_deserialize_field(ofstream& out,
|
||||
void t_cocoa_generator::generate_deserialize_field(ostream& out,
|
||||
t_field* tfield,
|
||||
string fieldName) {
|
||||
t_type* type = get_true_type(tfield->get_type());
|
||||
|
@ -2174,7 +2180,7 @@ void t_cocoa_generator::generate_deserialize_field(ofstream& out,
|
|||
throw "compiler error: cannot serialize void field in a struct: " + tfield->get_name();
|
||||
break;
|
||||
case t_base_type::TYPE_STRING:
|
||||
if (((t_base_type*)type)->is_binary()) {
|
||||
if (type->is_binary()) {
|
||||
out << "readBinary:&" << fieldName << " error: __thriftError]";
|
||||
} else {
|
||||
out << "readString:&" << fieldName << " error: __thriftError]";
|
||||
|
@ -2216,7 +2222,7 @@ void t_cocoa_generator::generate_deserialize_field(ofstream& out,
|
|||
/**
|
||||
* Generates an unserializer for a struct, allocates the struct and invokes read:
|
||||
*/
|
||||
void t_cocoa_generator::generate_deserialize_struct(ofstream& out,
|
||||
void t_cocoa_generator::generate_deserialize_struct(ostream& out,
|
||||
t_struct* tstruct,
|
||||
string fieldName) {
|
||||
indent(out) << type_name(tstruct) << fieldName << " = [[" << type_name(tstruct, true)
|
||||
|
@ -2227,7 +2233,7 @@ void t_cocoa_generator::generate_deserialize_struct(ofstream& out,
|
|||
/**
|
||||
* Deserializes a container by reading its size and then iterating
|
||||
*/
|
||||
void t_cocoa_generator::generate_deserialize_container(ofstream& out,
|
||||
void t_cocoa_generator::generate_deserialize_container(ostream& out,
|
||||
t_type* ttype,
|
||||
string fieldName) {
|
||||
string size = tmp("_size");
|
||||
|
@ -2348,7 +2354,7 @@ string t_cocoa_generator::unbox(t_type* ttype, string field_name) {
|
|||
/**
|
||||
* Generates code to deserialize a map element
|
||||
*/
|
||||
void t_cocoa_generator::generate_deserialize_map_element(ofstream& out,
|
||||
void t_cocoa_generator::generate_deserialize_map_element(ostream& out,
|
||||
t_map* tmap,
|
||||
string fieldName) {
|
||||
string key = tmp("_key");
|
||||
|
@ -2368,7 +2374,7 @@ void t_cocoa_generator::generate_deserialize_map_element(ofstream& out,
|
|||
/**
|
||||
* Deserializes a set element
|
||||
*/
|
||||
void t_cocoa_generator::generate_deserialize_set_element(ofstream& out,
|
||||
void t_cocoa_generator::generate_deserialize_set_element(ostream& out,
|
||||
t_set* tset,
|
||||
string fieldName) {
|
||||
string elem = tmp("_elem");
|
||||
|
@ -2383,7 +2389,7 @@ void t_cocoa_generator::generate_deserialize_set_element(ofstream& out,
|
|||
/**
|
||||
* Deserializes a list element
|
||||
*/
|
||||
void t_cocoa_generator::generate_deserialize_list_element(ofstream& out,
|
||||
void t_cocoa_generator::generate_deserialize_list_element(ostream& out,
|
||||
t_list* tlist,
|
||||
string fieldName) {
|
||||
string elem = tmp("_elem");
|
||||
|
@ -2401,7 +2407,7 @@ void t_cocoa_generator::generate_deserialize_list_element(ofstream& out,
|
|||
* @param tfield The field to serialize
|
||||
* @param fieldName Name to of the variable holding the field
|
||||
*/
|
||||
void t_cocoa_generator::generate_serialize_field(ofstream& out, t_field* tfield, string fieldName) {
|
||||
void t_cocoa_generator::generate_serialize_field(ostream& out, t_field* tfield, string fieldName) {
|
||||
t_type* type = get_true_type(tfield->get_type());
|
||||
|
||||
// Do nothing for void types
|
||||
|
@ -2423,7 +2429,7 @@ void t_cocoa_generator::generate_serialize_field(ofstream& out, t_field* tfield,
|
|||
throw "compiler error: cannot serialize void field in a struct: " + fieldName;
|
||||
break;
|
||||
case t_base_type::TYPE_STRING:
|
||||
if (((t_base_type*)type)->is_binary()) {
|
||||
if (type->is_binary()) {
|
||||
out << "writeBinary: " << fieldName << " error: __thriftError]";
|
||||
} else {
|
||||
out << "writeString: " << fieldName << " error: __thriftError]";
|
||||
|
@ -2468,7 +2474,7 @@ void t_cocoa_generator::generate_serialize_field(ofstream& out, t_field* tfield,
|
|||
* @param tstruct The struct to serialize
|
||||
* @param fieldName Name of variable holding struct
|
||||
*/
|
||||
void t_cocoa_generator::generate_serialize_struct(ofstream& out,
|
||||
void t_cocoa_generator::generate_serialize_struct(ostream& out,
|
||||
t_struct* tstruct,
|
||||
string fieldName) {
|
||||
(void)tstruct;
|
||||
|
@ -2481,7 +2487,7 @@ void t_cocoa_generator::generate_serialize_struct(ofstream& out,
|
|||
* @param ttype The type of container
|
||||
* @param fieldName Name of variable holding container
|
||||
*/
|
||||
void t_cocoa_generator::generate_serialize_container(ofstream& out,
|
||||
void t_cocoa_generator::generate_serialize_container(ostream& out,
|
||||
t_type* ttype,
|
||||
string fieldName) {
|
||||
scope_up(out);
|
||||
|
@ -2547,7 +2553,7 @@ void t_cocoa_generator::generate_serialize_container(ofstream& out,
|
|||
/**
|
||||
* Serializes the members of a map.
|
||||
*/
|
||||
void t_cocoa_generator::generate_serialize_map_element(ofstream& out,
|
||||
void t_cocoa_generator::generate_serialize_map_element(ostream& out,
|
||||
t_map* tmap,
|
||||
string key,
|
||||
string mapName) {
|
||||
|
@ -2560,7 +2566,7 @@ void t_cocoa_generator::generate_serialize_map_element(ofstream& out,
|
|||
/**
|
||||
* Serializes the members of a set.
|
||||
*/
|
||||
void t_cocoa_generator::generate_serialize_set_element(ofstream& out,
|
||||
void t_cocoa_generator::generate_serialize_set_element(ostream& out,
|
||||
t_set* tset,
|
||||
string elementName) {
|
||||
t_field efield(tset->get_elem_type(), elementName);
|
||||
|
@ -2570,7 +2576,7 @@ void t_cocoa_generator::generate_serialize_set_element(ofstream& out,
|
|||
/**
|
||||
* Serializes the members of a list.
|
||||
*/
|
||||
void t_cocoa_generator::generate_serialize_list_element(ofstream& out,
|
||||
void t_cocoa_generator::generate_serialize_list_element(ostream& out,
|
||||
t_list* tlist,
|
||||
string index,
|
||||
string listName) {
|
||||
|
@ -2733,8 +2739,8 @@ void t_cocoa_generator::print_const_value(ostream& out,
|
|||
indent(out);
|
||||
const vector<t_field*>& fields = ((t_struct*)type)->get_members();
|
||||
vector<t_field*>::const_iterator f_iter;
|
||||
const map<t_const_value*, t_const_value*>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*>::const_iterator v_iter;
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
if (defval)
|
||||
out << type_name(type) << " ";
|
||||
out << name << " = [" << type_name(type, true) << " new];"
|
||||
|
@ -2758,8 +2764,8 @@ void t_cocoa_generator::print_const_value(ostream& out,
|
|||
indent(mapout);
|
||||
t_type* ktype = ((t_map*)type)->get_key_type();
|
||||
t_type* vtype = ((t_map*)type)->get_val_type();
|
||||
const map<t_const_value*, t_const_value*>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*>::const_iterator v_iter;
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
if (defval)
|
||||
mapout << type_name(type) << " ";
|
||||
mapout << name << " = @{";
|
||||
|
@ -2824,7 +2830,7 @@ string t_cocoa_generator::render_const_value(ostream& out,
|
|||
case t_base_type::TYPE_STRING:
|
||||
// We must handle binary constant but the syntax of IDL defines
|
||||
// nothing about binary constant.
|
||||
// if ((t_base_type*)type)->is_binary())
|
||||
// if type->is_binary())
|
||||
// // binary code
|
||||
render << "@\"" << get_escaped_string(value) << '"';
|
||||
break;
|
||||
|
@ -2904,8 +2910,8 @@ string t_cocoa_generator::render_const_value(string name,
|
|||
} else if (type->is_struct() || type->is_xception()) {
|
||||
const vector<t_field*>& fields = ((t_struct*)type)->get_members();
|
||||
vector<t_field*>::const_iterator f_iter;
|
||||
const map<t_const_value*, t_const_value*>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*>::const_iterator v_iter;
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
if (val.size() > 0)
|
||||
render << "[[" << type_name(type, true) << " alloc] initWith";
|
||||
else
|
||||
|
@ -2937,8 +2943,8 @@ string t_cocoa_generator::render_const_value(string name,
|
|||
render << "[[NSDictionary alloc] initWithObjectsAndKeys: ";
|
||||
t_type* ktype = ((t_map*)type)->get_key_type();
|
||||
t_type* vtype = ((t_map*)type)->get_val_type();
|
||||
const map<t_const_value*, t_const_value*>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*>::const_iterator v_iter;
|
||||
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
|
||||
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
|
||||
bool first = true;
|
||||
for (v_iter = val.begin(); v_iter != val.end(); ++v_iter) {
|
||||
string key = render_const_value(name, ktype, v_iter->first, true);
|
||||
|
@ -3011,7 +3017,9 @@ string t_cocoa_generator::declare_property(t_field* tfield) {
|
|||
std::ostringstream render;
|
||||
render << "@property (";
|
||||
|
||||
if (type_can_be_null(tfield->get_type())) {
|
||||
if (type_can_be_copy(tfield->get_type())) {
|
||||
render << "copy, ";
|
||||
} else if (type_can_be_null(tfield->get_type())) {
|
||||
render << "strong, ";
|
||||
} else {
|
||||
render << "assign, ";
|
||||
|
|
469
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
generated
vendored
469
vendor/git.apache.org/thrift.git/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
generated
vendored
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue