diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/CMakeLists.txt.template | 35 | ||||
-rw-r--r-- | templates/Makefile.template | 4 | ||||
-rw-r--r-- | templates/gRPC-Core.podspec.template | 4 | ||||
-rw-r--r-- | templates/package.xml.template | 13 | ||||
-rw-r--r-- | templates/tools/dockerfile/clang5.include (renamed from templates/tools/dockerfile/clang_format.include) | 2 | ||||
-rw-r--r-- | templates/tools/dockerfile/grpc_clang_format/Dockerfile.template | 4 | ||||
-rw-r--r-- | templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template | 24 | ||||
-rw-r--r-- | templates/tools/dockerfile/test/sanity/Dockerfile.template | 2 |
8 files changed, 55 insertions, 33 deletions
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index 8de0ccde82..de0f2eb328 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -48,7 +48,10 @@ deps.append("${_gRPC_CARES_LIBRARIES}") deps.append("${_gRPC_ALLTARGETS_LIBRARIES}") for d in target_dict.get('deps', []): - deps.append(d) + if d == 'benchmark': + deps.append("${_gRPC_BENCHMARK_LIBRARIES}") + else: + deps.append(d) if target_dict.build == 'test' and target_dict.language == 'c++': deps.append("${_gRPC_GFLAGS_LIBRARIES}") return deps @@ -90,6 +93,10 @@ set(gRPC_INSTALL <%text>${gRPC_INSTALL_default}</%text> CACHE BOOL "Generate installation target: gRPC_ZLIB_PROVIDER, gRPC_CARES_PROVIDER, gRPC_SSL_PROVIDER and gRPC_PROTOBUF_PROVIDER must all be \"package\"") + # Providers for third-party dependencies (gRPC_*_PROVIDER properties): + # "module": build the dependency using sources from git submodule (under third_party) + # "package": use cmake's find_package functionality to locate a pre-installed dependency + set(gRPC_ZLIB_PROVIDER "module" CACHE STRING "Provider of zlib library") set_property(CACHE gRPC_ZLIB_PROVIDER PROPERTY STRINGS "module" "package") @@ -190,7 +197,7 @@ return() endif() - set(_protobuf_include_path -I . -I <%text>${PROTOBUF_WELLKNOWN_IMPORT_DIR}</%text>) + set(_protobuf_include_path -I . -I <%text>${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}</%text>) foreach(FIL <%text>${ARGN}</%text>) get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE) get_filename_component(FIL_WE <%text>${FIL}</%text> NAME_WE) @@ -346,13 +353,11 @@ PUBLIC <%text>$<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include></%text> PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text> PRIVATE <%text>${_gRPC_SSL_INCLUDE_DIR}</%text> - PRIVATE <%text>${PROTOBUF_ROOT_DIR}</%text>/src - PRIVATE <%text>${ZLIB_INCLUDE_DIR}</%text> - PRIVATE <%text>${BENCHMARK}</%text>/include - PRIVATE <%text>${CMAKE_CURRENT_BINARY_DIR}</%text>/third_party/zlib - PRIVATE <%text>${CARES_INCLUDE_DIR}</%text> - PRIVATE <%text>${CMAKE_CURRENT_BINARY_DIR}</%text>/third_party/cares/cares - PRIVATE <%text>${CMAKE_CURRENT_BINARY_DIR}</%text>/third_party/gflags/include + PRIVATE <%text>${_gRPC_PROTOBUF_INCLUDE_DIR}</%text> + PRIVATE <%text>${_gRPC_ZLIB_INCLUDE_DIR}</%text> + PRIVATE <%text>${_gRPC_BENCHMARK_INCLUDE_DIR}</%text> + PRIVATE <%text>${_gRPC_CARES_INCLUDE_DIR}</%text> + PRIVATE <%text>${_gRPC_GFLAGS_INCLUDE_DIR}</%text> % if lib.build in ['test', 'private'] and lib.language == 'c++': PRIVATE third_party/googletest/googletest/include PRIVATE third_party/googletest/googletest @@ -417,13 +422,11 @@ PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text> PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/include PRIVATE <%text>${_gRPC_SSL_INCLUDE_DIR}</%text> - PRIVATE <%text>${PROTOBUF_ROOT_DIR}</%text>/src - PRIVATE <%text>${BENCHMARK_ROOT_DIR}</%text>/include - PRIVATE <%text>${ZLIB_ROOT_DIR}</%text> - PRIVATE <%text>${CMAKE_CURRENT_BINARY_DIR}</%text>/third_party/zlib - PRIVATE <%text>${CARES_INCLUDE_DIR}</%text> - PRIVATE <%text>${CMAKE_CURRENT_BINARY_DIR}</%text>/third_party/cares/cares - PRIVATE <%text>${CMAKE_CURRENT_BINARY_DIR}</%text>/third_party/gflags/include + PRIVATE <%text>${_gRPC_PROTOBUF_INCLUDE_DIR}</%text> + PRIVATE <%text>${_gRPC_ZLIB_INCLUDE_DIR}</%text> + PRIVATE <%text>${_gRPC_BENCHMARK_INCLUDE_DIR}</%text> + PRIVATE <%text>${_gRPC_CARES_INCLUDE_DIR}</%text> + PRIVATE <%text>${_gRPC_GFLAGS_INCLUDE_DIR}</%text> % if tgt.build in ['test', 'private'] and tgt.language == 'c++': PRIVATE third_party/googletest/googletest/include PRIVATE third_party/googletest/googletest diff --git a/templates/Makefile.template b/templates/Makefile.template index 954bea7e17..b8e26b646b 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -563,7 +563,6 @@ ZLIB_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libz.a ZLIB_MERGE_OBJS = $(LIBZ_OBJS) CPPFLAGS += -Ithird_party/zlib - LDFLAGS += -L$(LIBDIR)/$(CONFIG)/zlib else ifeq ($(HAS_PKG_CONFIG),true) CPPFLAGS += $(shell $(PKG_CONFIG) --cflags zlib) @@ -594,7 +593,6 @@ CARES_MERGE_OBJS = $(LIBARES_OBJS) CARES_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libares.a CPPFLAGS := -Ithird_party/cares -Ithird_party/cares/cares $(CPPFLAGS) - LDFLAGS := -L$(LIBDIR)/$(CONFIG)/c-ares $(LDFLAGS) else ifeq ($(HAS_PKG_CONFIG),true) PC_REQUIRES_GRPC += libcares @@ -896,10 +894,10 @@ $(LIBDIR)/$(CONFIG)/protobuf/libprotobuf.a: third_party/protobuf/configure $(E) "[MAKE] Building protobuf" + $(Q)mkdir -p $(LIBDIR)/$(CONFIG)/protobuf $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g $(PROTOBUF_LDFLAGS_EXTRA)" CPPFLAGS="$(PIC_CPPFLAGS) $(CPPFLAGS_$(CONFIG)) -g $(PROTOBUF_CPPFLAGS_EXTRA)" ./configure --disable-shared --enable-static $(PROTOBUF_CONFIG_OPTS)) $(Q)$(MAKE) -C third_party/protobuf clean $(Q)$(MAKE) -C third_party/protobuf - $(Q)mkdir -p $(LIBDIR)/$(CONFIG)/protobuf $(Q)mkdir -p $(BINDIR)/$(CONFIG)/protobuf $(Q)cp third_party/protobuf/src/.libs/libprotoc.a $(LIBDIR)/$(CONFIG)/protobuf $(Q)cp third_party/protobuf/src/.libs/libprotobuf.a $(LIBDIR)/$(CONFIG)/protobuf diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 9785d150e4..2be7692e04 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -135,7 +135,7 @@ 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', # If we don't set these two settings, `include/grpc/support/time.h` and - # `src/core/lib/support/string.h` shadow the system `<time.h>` and `<string.h>`, breaking the + # `src/core/lib/gpr/string.h` shadow the system `<time.h>` and `<string.h>`, breaking the # build. 'USE_HEADERMAP' => 'NO', 'ALWAYS_SEARCH_USER_PATHS' => 'NO', @@ -202,6 +202,6 @@ # TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path? s.prepare_command = <<-END_OF_COMMAND - find src/core/ -type f -exec sed -E -i '.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\; + find src/core/ -type f -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\; END_OF_COMMAND end diff --git a/templates/package.xml.template b/templates/package.xml.template index f10f75b8c0..7f201970b3 100644 --- a/templates/package.xml.template +++ b/templates/package.xml.template @@ -12,24 +12,19 @@ <email>grpc-packages@google.com</email> <active>yes</active> </lead> - <date>2017-08-24</date> + <date>2018-01-19</date> <time>16:06:07</time> <version> <release>${settings.php_version.php()}</release> <api>${settings.php_version.php()}</api> </version> <stability> - <release>beta</release> - <api>beta</api> + <release>${settings.php_version.php_stability()}</release> + <api>${settings.php_version.php_stability()}</api> </stability> <license>Apache 2.0</license> <notes> - - Channel are now by default persistent #11878 - - Some bug fixes from 1.4 branch #12109, #12123 - - Fixed hang bug when fork() was used #11814 - - License changed to Apache 2.0 - - Added support for php_namespace option in codegen plugin #11886 - - Updated gRPC C Core library version 1.6 + - TBD </notes> <contents> <dir baseinstalldir="/" name="/"> diff --git a/templates/tools/dockerfile/clang_format.include b/templates/tools/dockerfile/clang5.include index 79d0ff286f..11ff442787 100644 --- a/templates/tools/dockerfile/clang_format.include +++ b/templates/tools/dockerfile/clang5.include @@ -3,3 +3,5 @@ RUN wget http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-linux-x86_64-ubuntu14.0 RUN tar xf clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-format /usr/local/bin/clang-format ENV CLANG_FORMAT=clang-format +RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-tidy /usr/local/bin/clang-tidy +ENV CLANG_TIDY=clang-tidy diff --git a/templates/tools/dockerfile/grpc_clang_format/Dockerfile.template b/templates/tools/dockerfile/grpc_clang_format/Dockerfile.template index 1ab667c95d..4f24a025c6 100644 --- a/templates/tools/dockerfile/grpc_clang_format/Dockerfile.template +++ b/templates/tools/dockerfile/grpc_clang_format/Dockerfile.template @@ -16,8 +16,8 @@ FROM debian:jessie - <%include file="../clang_format.include"/> + <%include file="../clang5.include"/> ADD clang_format_all_the_things.sh / CMD ["echo 'Run with tools/distrib/clang_format_code.sh'"] -
\ No newline at end of file + diff --git a/templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template b/templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template new file mode 100644 index 0000000000..f5bceaa5f3 --- /dev/null +++ b/templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template @@ -0,0 +1,24 @@ +%YAML 1.2 +--- | + # Copyright 2015 gRPC authors. + # + # 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. + + FROM debian:jessie + + <%include file="../clang5.include"/> + <%include file="../python_deps.include"/> + ADD clang_tidy_all_the_things.sh / + CMD ["echo 'Run with tools/distrib/clang_tidy_code.sh'"] + + diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template index c98f7d4176..7453e6c460 100644 --- a/templates/tools/dockerfile/test/sanity/Dockerfile.template +++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template @@ -53,7 +53,7 @@ RUN chmod +x ./bazel-0.4.4-installer-linux-x86_64.sh RUN ./bazel-0.4.4-installer-linux-x86_64.sh - <%include file="../../clang_format.include"/> + <%include file="../../clang5.include"/> <%include file="../../run_tests_addons.include"/> # Define the default command. |