Compare commits

..

10 Commits

Author SHA1 Message Date
David Neto
6464cd7bd0
kokoro: use new cpp-builder image (#146)
Some checks are pending
/ ci (clang, clang++) (push) Waiting to run
/ ci (gcc, g++) (push) Waiting to run
BUG=391948942
2025-02-22 17:18:35 -05:00
David Neto
40461f0f95
Reformat source (#144) 2025-02-22 04:28:29 -05:00
David Neto
4954832054
Fix copyright owner on clang-format-all.sh (#145)
Originally authored by Ben Clayton while employed by Google.
Marl is a different project.  Change copyright owner to Google LLC
like all the other source files.
2025-02-22 04:24:57 -05:00
David Neto
3c3c32a059
kokoro: use lightweight license-checker image (#143)
BUG=393622588
2025-02-19 10:01:24 -05:00
David Neto
d01c822bf0
github actions: Update actions/upload-artifact@v4 (#142) 2025-01-31 17:40:47 -05:00
David Neto
a43b6c36e8
kokoro: Remove VS2017 configs (#140) 2025-01-21 11:24:41 -05:00
David Neto
167b131a66
kokoro: Add vs2022 configs (#139)
Pass target CPU architecture explicitly vis BUILD_TARGET_ARCH

Use cmake --build to build, instead of hardcoding the path to msbuild
2025-01-10 17:29:58 -05:00
David Neto
82beeea910
update to cmake 3.22, update googletest (#138)
* Update googletest

* cmake_minimum_version 3.22

That's the one included in Ubuntu 2022.04
2024-12-23 16:17:52 -05:00
David Neto
9fd09d6dce
kokoro: update tooling, fix warnings
Kokoro changes:
-  Linux: gcc-13, cmake-3.31.2
- Windows: python 3.12, cmake-3.31.2

* Disable warnings in gtest, gmock

This is required in order to build with GCC 13, and Apple Clang with warnings-as-errors

Bug: crbug.com/383538610

* disable license check on .github/workflows/main.yml

* Use add_subdirectory for internal gtest, gmock

---------

Co-authored-by: Antonio Maiorano <amaiorano@google.com>
2024-12-16 10:51:28 -05:00
Sergei Trofimovich
c69444ed76
include/dap/network.h: add <stdint.h> include for gcc-15 (#133)
On `gcc-15` without the include header can't be used as is. I noticed
`cmake` build failing as:

    dap/network.h:31:39: error: 'uint32_t' has not been declared
       31 |                                       uint32_t timeoutMillis = 0);
          |                                       ^~~~~~~~

The change adds `uint32_t` declaration via `<stdint.h>`.
2024-08-02 11:38:40 -04:00
16 changed files with 35 additions and 56 deletions

View File

@ -42,7 +42,7 @@ jobs:
cmake --build .
DESTDIR=../out cmake --install .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cppdap
path: out/usr/local/
name: cppdap-${{ matrix.CC }}
path: out/usr/local/

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.22)
project(cppdap VERSION 1.65.0 LANGUAGES CXX C)
@ -298,21 +298,19 @@ if(CPPDAP_BUILD_TESTS)
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
find_package(GTest REQUIRED)
else()
list(APPEND DAP_TEST_LIST
${CPPDAP_GOOGLETEST_DIR}/googletest/src/gtest-all.cc
)
set(DAP_TEST_INCLUDE_DIR
${CPPDAP_GOOGLETEST_DIR}/googlemock/include/
${CPPDAP_GOOGLETEST_DIR}/googletest/
${CPPDAP_GOOGLETEST_DIR}/googletest/include/
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
add_subdirectory(${CPPDAP_GOOGLETEST_DIR})
# googletest has -Werror=maybe-uninitialized problems.
# Disable all warnings in googletest code.
target_compile_options(gtest PRIVATE -w)
# gmock has -Werror=deprecated-copy problems.
target_compile_options(gmock PRIVATE -w)
endif()
add_executable(cppdap-unittests ${DAP_TEST_LIST})
add_test(NAME cppdap-unittests COMMAND cppdap-unittests)
target_include_directories(cppdap-unittests PUBLIC ${DAP_TEST_INCLUDE_DIR} )
set_target_properties(cppdap-unittests PROPERTIES
FOLDER "Tests"
)
@ -326,7 +324,7 @@ if(CPPDAP_BUILD_TESTS)
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
target_link_libraries(cppdap-unittests PRIVATE cppdap GTest::gtest)
else()
target_link_libraries(cppdap-unittests PRIVATE cppdap)
target_link_libraries(cppdap-unittests PRIVATE cppdap gtest gmock)
endif()
endif(CPPDAP_BUILD_TESTS)

View File

@ -1,4 +1,4 @@
# Copyright 2020 The Marl Authors.
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -17,6 +17,7 @@
#include <functional>
#include <memory>
#include <stdint.h>
namespace dap {
class ReaderWriter;

View File

@ -20,8 +20,6 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )"
docker run --rm -i \
--volume "${ROOT_DIR}:${ROOT_DIR}" \
--volume "${KOKORO_ARTIFACTS_DIR}:/mnt/artifacts" \
--volume "${ROOT_DIR}:${ROOT_DIR}:ro" \
--workdir "${ROOT_DIR}" \
--entrypoint "${SCRIPT_DIR}/presubmit-docker.sh" \
"gcr.io/shaderc-build/radial-build:latest"
us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/license-checker

View File

@ -1,19 +0,0 @@
#!/bin/bash
# Copyright 2020 The Marl 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
#
# https://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 -e # Fail on any error.
license-checker

View File

@ -1,4 +1,4 @@
# Format: //devtools/kokoro/config/proto/build.proto
build_file: "cppdap/kokoro/license-check/presubmit.sh"
build_file: "cppdap/kokoro/license-check/build.sh"

View File

@ -28,8 +28,8 @@ git config --global --add safe.directory '*'
git submodule update --init
if [ "$BUILD_SYSTEM" == "cmake" ]; then
using cmake-3.17.2
using gcc-9
using cmake-3.31.2
using gcc-13
mkdir build
cd build

View File

@ -29,4 +29,4 @@ docker run --rm -i \
--env BUILD_TARGET_ARCH=$BUILD_TARGET_ARCH \
--env BUILD_SANITIZER=$BUILD_SANITIZER \
--entrypoint "${SCRIPT_DIR}/presubmit-docker.sh" \
"gcr.io/shaderc-build/radial-build:latest"
us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder

View File

@ -17,7 +17,7 @@ REM limitations under the License.
SETLOCAL ENABLEDELAYEDEXPANSION
SET BUILD_ROOT=%cd%
SET PATH=C:\python36;C:\Program Files\cmake-3.23.1-windows-x86_64\bin;%PATH%
SET PATH=C:\python312;C:\cmake-3.31.2\bin;%PATH%
SET SRC=%cd%\github\cppdap
cd %SRC%
@ -26,7 +26,6 @@ if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
git submodule update --init
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
SET MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild"
SET CONFIG=Release
mkdir %SRC%\build
@ -34,11 +33,11 @@ cd %SRC%\build
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
IF /I "%BUILD_SYSTEM%"=="cmake" (
cmake .. -G "%BUILD_GENERATOR%" "-DCPPDAP_BUILD_TESTS=1" "-DCPPDAP_BUILD_EXAMPLES=1" "-DCPPDAP_WARNINGS_AS_ERRORS=1"
cmake .. -G "%BUILD_GENERATOR%" -A %BUILD_TARGET_ARCH% "-DCPPDAP_BUILD_TESTS=1" "-DCPPDAP_BUILD_EXAMPLES=1" "-DCPPDAP_WARNINGS_AS_ERRORS=1"
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
%MSBUILD% /p:Configuration=%CONFIG% cppdap.sln
cmake --build . --config %CONFIG%
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
Release\cppdap-unittests.exe
%CONFIG%\cppdap-unittests.exe
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
) ELSE (
echo "Unknown build system: %BUILD_SYSTEM%"

View File

@ -10,7 +10,7 @@ env_vars {
env_vars {
key: "BUILD_GENERATOR"
value: "Visual Studio 15 2017 Win64"
value: "Visual Studio 17 2022"
}
env_vars {

View File

@ -10,10 +10,10 @@ env_vars {
env_vars {
key: "BUILD_GENERATOR"
value: "Visual Studio 15 2017"
value: "Visual Studio 17 2022"
}
env_vars {
key: "BUILD_TARGET_ARCH"
value: "x86"
value: "Win32"
}

View File

@ -8,6 +8,7 @@
"exclude": [
".clang-format",
".gitattributes",
".github/workflows/main.yml",
".gitignore",
".gitmodules",
".vscode/*.json",

View File

@ -104,9 +104,9 @@ bool RapidDeserializer::deserialize(dap::any* v) const {
return false;
}
*v = obj;
} else if (json()->IsArray()){
} else if (json()->IsArray()) {
dap::array<any> arr;
if (!deserialize(&arr)){
if (!deserialize(&arr)) {
return false;
}
*v = arr;
@ -220,7 +220,8 @@ bool RapidSerializer::serialize(const dap::any& v) {
return serialize(v.get<dap::object>());
} else if (v.is<dap::null>()) {
} else {
// reachable if array or custom serialized type is nested inside other dap::object
// reachable if array or custom serialized type is nested inside other
// dap::object
auto type = get_any_type(v);
auto value = get_any_val(v);
if (type && value) {

View File

@ -117,7 +117,7 @@ class dap::Socket::Shared : public dap::ReaderWriter {
~Shared() {
if (info) {
freeaddrinfo(info);
freeaddrinfo(info);
}
close();
term();

@ -1 +1 @@
Subproject commit 0a03480824b4fc7883255dbd2fd8940c9f81e22e
Subproject commit f3c355f9dd382bc2c323be2713e351a578b68c61