Compare commits
10 Commits
0f943b3357
...
6464cd7bd0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6464cd7bd0 | ||
![]() |
40461f0f95 | ||
![]() |
4954832054 | ||
![]() |
3c3c32a059 | ||
![]() |
d01c822bf0 | ||
![]() |
a43b6c36e8 | ||
![]() |
167b131a66 | ||
![]() |
82beeea910 | ||
![]() |
9fd09d6dce | ||
![]() |
c69444ed76 |
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@ -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/
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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.
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace dap {
|
||||
class ReaderWriter;
|
||||
|
@ -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
|
@ -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
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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%"
|
||||
|
@ -10,7 +10,7 @@ env_vars {
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_GENERATOR"
|
||||
value: "Visual Studio 15 2017 Win64"
|
||||
value: "Visual Studio 17 2022"
|
||||
}
|
||||
|
||||
env_vars {
|
@ -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"
|
||||
}
|
@ -8,6 +8,7 @@
|
||||
"exclude": [
|
||||
".clang-format",
|
||||
".gitattributes",
|
||||
".github/workflows/main.yml",
|
||||
".gitignore",
|
||||
".gitmodules",
|
||||
".vscode/*.json",
|
||||
|
@ -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) {
|
||||
|
@ -117,7 +117,7 @@ class dap::Socket::Shared : public dap::ReaderWriter {
|
||||
|
||||
~Shared() {
|
||||
if (info) {
|
||||
freeaddrinfo(info);
|
||||
freeaddrinfo(info);
|
||||
}
|
||||
close();
|
||||
term();
|
||||
|
2
third_party/googletest
vendored
2
third_party/googletest
vendored
@ -1 +1 @@
|
||||
Subproject commit 0a03480824b4fc7883255dbd2fd8940c9f81e22e
|
||||
Subproject commit f3c355f9dd382bc2c323be2713e351a578b68c61
|
Loading…
x
Reference in New Issue
Block a user