From 9c408a0e4cf021ba28f4749953231dd21a486af6 Mon Sep 17 00:00:00 2001 From: Dennis Hezel Date: Thu, 9 Sep 2021 23:54:40 +0200 Subject: [PATCH] docs: Add license header to more files --- CMakeLists.txt | 14 ++++++++++++++ benchmark/CMakeLists.txt | 14 ++++++++++++++ cmake-format.yaml | 2 +- cmake/AsioGrpcCheckBoostVersion.cmake | 14 ++++++++++++++ cmake/AsioGrpcCompileOptions.cmake | 14 ++++++++++++++ cmake/AsioGrpcCoverage.cmake | 14 ++++++++++++++ cmake/AsioGrpcProtobufGenerator.cmake | 14 ++++++++++++++ example/CMakeLists.txt | 14 ++++++++++++++ example/protos/example.proto | 22 ++++++++++++++++++++-- src/CMakeLists.txt | 14 ++++++++++++++ src/asioGrpc.cpp | 14 ++++++++++++++ test/CMakeLists.txt | 14 ++++++++++++++ test/main.cpp | 14 ++++++++++++++ test/protos/test.proto | 22 ++++++++++++++++++++-- test/test-asio-grpc-20.cpp | 14 ++++++++++++++ test/test-asio-grpc.cpp | 14 ++++++++++++++ test/utils/asioUtils.hpp | 14 ++++++++++++++ test/utils/freePort.cpp | 14 ++++++++++++++ test/utils/freePort.hpp | 14 ++++++++++++++ test/utils/grpcClientServerTest.cpp | 14 ++++++++++++++ test/utils/grpcClientServerTest.hpp | 14 ++++++++++++++ test/utils/grpcContextTest.hpp | 14 ++++++++++++++ test/utils/precompiledHeader.hpp | 14 ++++++++++++++ 23 files changed, 321 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13af94d8..57640b2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,17 @@ +# Copyright 2021 Dennis Hezel +# +# 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. + cmake_minimum_required(VERSION 3.19) project( diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index 49902b37..1e2585b4 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -1,3 +1,17 @@ +# Copyright 2021 Dennis Hezel +# +# 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. + include(AsioGrpcProtobufGenerator) set(ASIO_GRPC_GENERATED_BENCHMARK_PROTOS_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") asio_grpc_protobuf_generate( diff --git a/cmake-format.yaml b/cmake-format.yaml index 749054df..b5fba882 100644 --- a/cmake-format.yaml +++ b/cmake-format.yaml @@ -14,7 +14,7 @@ dangle_parens: false enable_markup: true enum_char: . fence_pattern: ^\s*([`~]{3}[`~]*)(.*)$ -first_comment_is_literal: false +first_comment_is_literal: true keyword_case: unchanged line_ending: unix line_width: 120 diff --git a/cmake/AsioGrpcCheckBoostVersion.cmake b/cmake/AsioGrpcCheckBoostVersion.cmake index c5f6e1e7..807c1698 100644 --- a/cmake/AsioGrpcCheckBoostVersion.cmake +++ b/cmake/AsioGrpcCheckBoostVersion.cmake @@ -1,3 +1,17 @@ +# Copyright 2021 Dennis Hezel +# +# 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. + try_compile( ASIO_GRPC_BOOST_ASIO_HAS_CO_AWAIT "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_LIST_DIR}/check_boost_asio_has_co_await.cpp" diff --git a/cmake/AsioGrpcCompileOptions.cmake b/cmake/AsioGrpcCompileOptions.cmake index ae0ad9a0..528739d7 100644 --- a/cmake/AsioGrpcCompileOptions.cmake +++ b/cmake/AsioGrpcCompileOptions.cmake @@ -1,3 +1,17 @@ +# Copyright 2021 Dennis Hezel +# +# 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. + # common compile options add_library(asio-grpc-common-compile-options INTERFACE) diff --git a/cmake/AsioGrpcCoverage.cmake b/cmake/AsioGrpcCoverage.cmake index 664edb41..2bad7930 100644 --- a/cmake/AsioGrpcCoverage.cmake +++ b/cmake/AsioGrpcCoverage.cmake @@ -1,3 +1,17 @@ +# Copyright 2021 Dennis Hezel +# +# 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. + function(asio_grpc_add_coverage_flags _asio_grpc_target) target_compile_options(${_asio_grpc_target} PRIVATE --coverage) target_link_libraries(${_asio_grpc_target} PRIVATE gcov) diff --git a/cmake/AsioGrpcProtobufGenerator.cmake b/cmake/AsioGrpcProtobufGenerator.cmake index d7fccae8..95ef33f8 100644 --- a/cmake/AsioGrpcProtobufGenerator.cmake +++ b/cmake/AsioGrpcProtobufGenerator.cmake @@ -1,3 +1,17 @@ +# Copyright 2021 Dennis Hezel +# +# 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. + # Adapted from the original protobuf_generate provided by protobuf-config.cmake function(asio_grpc_protobuf_generate) include(CMakeParseArguments) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 691c9acf..2e0c4da5 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -1,3 +1,17 @@ +# Copyright 2021 Dennis Hezel +# +# 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. + include(AsioGrpcProtobufGenerator) set(ASIO_GRPC_GENERATED_EXAMPLE_PROTOS_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") asio_grpc_protobuf_generate( diff --git a/example/protos/example.proto b/example/protos/example.proto index ac7442d3..29e105c4 100644 --- a/example/protos/example.proto +++ b/example/protos/example.proto @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + syntax = "proto3"; package example.v1; @@ -12,6 +26,10 @@ service Example { rpc Unary(Request) returns (Response) {} } -message Request { int32 integer = 1; } +message Request { + int32 integer = 1; +} -message Response { int32 integer = 1; } \ No newline at end of file +message Response { + int32 integer = 1; +} \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e6c2d66c..9d14c459 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,17 @@ +# Copyright 2021 Dennis Hezel +# +# 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. + # asio-grpc add_library(asio-grpc INTERFACE) add_library(asio-grpc::asio-grpc ALIAS asio-grpc) diff --git a/src/asioGrpc.cpp b/src/asioGrpc.cpp index 975b7aa6..fdf548e8 100644 --- a/src/asioGrpc.cpp +++ b/src/asioGrpc.cpp @@ -1 +1,15 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #include "agrpc/asioGrpc.hpp" \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 90e88c66..98e3f697 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,3 +1,17 @@ +# Copyright 2021 Dennis Hezel +# +# 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. + # grpc generate include(AsioGrpcProtobufGenerator) set(ASIO_GRPC_GENERATED_PROTOS_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") diff --git a/test/main.cpp b/test/main.cpp index 0a3f254e..d7bd0b61 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -1,2 +1,16 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include diff --git a/test/protos/test.proto b/test/protos/test.proto index 94dac72c..2eb820b8 100644 --- a/test/protos/test.proto +++ b/test/protos/test.proto @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + syntax = "proto3"; package agrpc.test.v1; @@ -12,6 +26,10 @@ service Test { rpc Unary(Request) returns (Response) {} } -message Request { int32 integer = 1; } +message Request { + int32 integer = 1; +} -message Response { int32 integer = 1; } \ No newline at end of file +message Response { + int32 integer = 1; +} \ No newline at end of file diff --git a/test/test-asio-grpc-20.cpp b/test/test-asio-grpc-20.cpp index 1819b61f..4bc71c7b 100644 --- a/test/test-asio-grpc-20.cpp +++ b/test/test-asio-grpc-20.cpp @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #include "agrpc/asioGrpc.hpp" #include "protos/test.grpc.pb.h" #include "utils/asioUtils.hpp" diff --git a/test/test-asio-grpc.cpp b/test/test-asio-grpc.cpp index e7ec79a6..4c942ac0 100644 --- a/test/test-asio-grpc.cpp +++ b/test/test-asio-grpc.cpp @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #include "agrpc/asioGrpc.hpp" #include "protos/test.grpc.pb.h" #include "utils/asioUtils.hpp" diff --git a/test/utils/asioUtils.hpp b/test/utils/asioUtils.hpp index 27ccfbb8..5a6e9237 100644 --- a/test/utils/asioUtils.hpp +++ b/test/utils/asioUtils.hpp @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #ifndef AGRPC_UTILS_ASIOUTILS_HPP #define AGRPC_UTILS_ASIOUTILS_HPP diff --git a/test/utils/freePort.cpp b/test/utils/freePort.cpp index 86724a57..867e5926 100644 --- a/test/utils/freePort.cpp +++ b/test/utils/freePort.cpp @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #include "utils/freePort.hpp" #include diff --git a/test/utils/freePort.hpp b/test/utils/freePort.hpp index d95fa6dd..0f7153d6 100644 --- a/test/utils/freePort.hpp +++ b/test/utils/freePort.hpp @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #ifndef AGRPC_UTILS_FREEPORT_HPP #define AGRPC_UTILS_FREEPORT_HPP diff --git a/test/utils/grpcClientServerTest.cpp b/test/utils/grpcClientServerTest.cpp index 04c49646..6566b2c4 100644 --- a/test/utils/grpcClientServerTest.cpp +++ b/test/utils/grpcClientServerTest.cpp @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #include "utils/grpcClientServerTest.hpp" #include "protos/test.grpc.pb.h" diff --git a/test/utils/grpcClientServerTest.hpp b/test/utils/grpcClientServerTest.hpp index e63069f5..08529579 100644 --- a/test/utils/grpcClientServerTest.hpp +++ b/test/utils/grpcClientServerTest.hpp @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #ifndef AGRPC_UTILS_GRPCCLIENTSERVERTEST_HPP #define AGRPC_UTILS_GRPCCLIENTSERVERTEST_HPP diff --git a/test/utils/grpcContextTest.hpp b/test/utils/grpcContextTest.hpp index f2fb877d..f99aafc4 100644 --- a/test/utils/grpcContextTest.hpp +++ b/test/utils/grpcContextTest.hpp @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #ifndef AGRPC_UTILS_GRPCTEST_HPP #define AGRPC_UTILS_GRPCTEST_HPP diff --git a/test/utils/precompiledHeader.hpp b/test/utils/precompiledHeader.hpp index 575d29cc..48f8ba93 100644 --- a/test/utils/precompiledHeader.hpp +++ b/test/utils/precompiledHeader.hpp @@ -1,3 +1,17 @@ +// Copyright 2021 Dennis Hezel +// +// 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. + #include #include #include