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 .
|
cmake --build .
|
||||||
DESTDIR=../out cmake --install .
|
DESTDIR=../out cmake --install .
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cppdap
|
name: cppdap-${{ matrix.CC }}
|
||||||
path: out/usr/local/
|
path: out/usr/local/
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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)
|
project(cppdap VERSION 1.65.0 LANGUAGES CXX C)
|
||||||
|
|
||||||
@ -298,21 +298,19 @@ if(CPPDAP_BUILD_TESTS)
|
|||||||
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
||||||
find_package(GTest REQUIRED)
|
find_package(GTest REQUIRED)
|
||||||
else()
|
else()
|
||||||
list(APPEND DAP_TEST_LIST
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
${CPPDAP_GOOGLETEST_DIR}/googletest/src/gtest-all.cc
|
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
|
||||||
)
|
add_subdirectory(${CPPDAP_GOOGLETEST_DIR})
|
||||||
|
# googletest has -Werror=maybe-uninitialized problems.
|
||||||
set(DAP_TEST_INCLUDE_DIR
|
# Disable all warnings in googletest code.
|
||||||
${CPPDAP_GOOGLETEST_DIR}/googlemock/include/
|
target_compile_options(gtest PRIVATE -w)
|
||||||
${CPPDAP_GOOGLETEST_DIR}/googletest/
|
# gmock has -Werror=deprecated-copy problems.
|
||||||
${CPPDAP_GOOGLETEST_DIR}/googletest/include/
|
target_compile_options(gmock PRIVATE -w)
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(cppdap-unittests ${DAP_TEST_LIST})
|
add_executable(cppdap-unittests ${DAP_TEST_LIST})
|
||||||
add_test(NAME cppdap-unittests COMMAND cppdap-unittests)
|
add_test(NAME cppdap-unittests COMMAND cppdap-unittests)
|
||||||
|
|
||||||
target_include_directories(cppdap-unittests PUBLIC ${DAP_TEST_INCLUDE_DIR} )
|
|
||||||
set_target_properties(cppdap-unittests PROPERTIES
|
set_target_properties(cppdap-unittests PROPERTIES
|
||||||
FOLDER "Tests"
|
FOLDER "Tests"
|
||||||
)
|
)
|
||||||
@ -326,7 +324,7 @@ if(CPPDAP_BUILD_TESTS)
|
|||||||
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
||||||
target_link_libraries(cppdap-unittests PRIVATE cppdap GTest::gtest)
|
target_link_libraries(cppdap-unittests PRIVATE cppdap GTest::gtest)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(cppdap-unittests PRIVATE cppdap)
|
target_link_libraries(cppdap-unittests PRIVATE cppdap gtest gmock)
|
||||||
endif()
|
endif()
|
||||||
endif(CPPDAP_BUILD_TESTS)
|
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");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace dap {
|
namespace dap {
|
||||||
class ReaderWriter;
|
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 )"
|
ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
docker run --rm -i \
|
docker run --rm -i \
|
||||||
--volume "${ROOT_DIR}:${ROOT_DIR}" \
|
--volume "${ROOT_DIR}:${ROOT_DIR}:ro" \
|
||||||
--volume "${KOKORO_ARTIFACTS_DIR}:/mnt/artifacts" \
|
|
||||||
--workdir "${ROOT_DIR}" \
|
--workdir "${ROOT_DIR}" \
|
||||||
--entrypoint "${SCRIPT_DIR}/presubmit-docker.sh" \
|
us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/license-checker
|
||||||
"gcr.io/shaderc-build/radial-build:latest"
|
|
@ -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
|
# 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
|
git submodule update --init
|
||||||
|
|
||||||
if [ "$BUILD_SYSTEM" == "cmake" ]; then
|
if [ "$BUILD_SYSTEM" == "cmake" ]; then
|
||||||
using cmake-3.17.2
|
using cmake-3.31.2
|
||||||
using gcc-9
|
using gcc-13
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
@ -29,4 +29,4 @@ docker run --rm -i \
|
|||||||
--env BUILD_TARGET_ARCH=$BUILD_TARGET_ARCH \
|
--env BUILD_TARGET_ARCH=$BUILD_TARGET_ARCH \
|
||||||
--env BUILD_SANITIZER=$BUILD_SANITIZER \
|
--env BUILD_SANITIZER=$BUILD_SANITIZER \
|
||||||
--entrypoint "${SCRIPT_DIR}/presubmit-docker.sh" \
|
--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
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
SET BUILD_ROOT=%cd%
|
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
|
SET SRC=%cd%\github\cppdap
|
||||||
|
|
||||||
cd %SRC%
|
cd %SRC%
|
||||||
@ -26,7 +26,6 @@ if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
|||||||
git submodule update --init
|
git submodule update --init
|
||||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
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
|
SET CONFIG=Release
|
||||||
|
|
||||||
mkdir %SRC%\build
|
mkdir %SRC%\build
|
||||||
@ -34,11 +33,11 @@ cd %SRC%\build
|
|||||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||||
|
|
||||||
IF /I "%BUILD_SYSTEM%"=="cmake" (
|
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!
|
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||||
%MSBUILD% /p:Configuration=%CONFIG% cppdap.sln
|
cmake --build . --config %CONFIG%
|
||||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||||
Release\cppdap-unittests.exe
|
%CONFIG%\cppdap-unittests.exe
|
||||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||||
) ELSE (
|
) ELSE (
|
||||||
echo "Unknown build system: %BUILD_SYSTEM%"
|
echo "Unknown build system: %BUILD_SYSTEM%"
|
||||||
|
@ -10,7 +10,7 @@ env_vars {
|
|||||||
|
|
||||||
env_vars {
|
env_vars {
|
||||||
key: "BUILD_GENERATOR"
|
key: "BUILD_GENERATOR"
|
||||||
value: "Visual Studio 15 2017 Win64"
|
value: "Visual Studio 17 2022"
|
||||||
}
|
}
|
||||||
|
|
||||||
env_vars {
|
env_vars {
|
@ -10,10 +10,10 @@ env_vars {
|
|||||||
|
|
||||||
env_vars {
|
env_vars {
|
||||||
key: "BUILD_GENERATOR"
|
key: "BUILD_GENERATOR"
|
||||||
value: "Visual Studio 15 2017"
|
value: "Visual Studio 17 2022"
|
||||||
}
|
}
|
||||||
|
|
||||||
env_vars {
|
env_vars {
|
||||||
key: "BUILD_TARGET_ARCH"
|
key: "BUILD_TARGET_ARCH"
|
||||||
value: "x86"
|
value: "Win32"
|
||||||
}
|
}
|
@ -8,6 +8,7 @@
|
|||||||
"exclude": [
|
"exclude": [
|
||||||
".clang-format",
|
".clang-format",
|
||||||
".gitattributes",
|
".gitattributes",
|
||||||
|
".github/workflows/main.yml",
|
||||||
".gitignore",
|
".gitignore",
|
||||||
".gitmodules",
|
".gitmodules",
|
||||||
".vscode/*.json",
|
".vscode/*.json",
|
||||||
|
@ -104,9 +104,9 @@ bool RapidDeserializer::deserialize(dap::any* v) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*v = obj;
|
*v = obj;
|
||||||
} else if (json()->IsArray()){
|
} else if (json()->IsArray()) {
|
||||||
dap::array<any> arr;
|
dap::array<any> arr;
|
||||||
if (!deserialize(&arr)){
|
if (!deserialize(&arr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*v = arr;
|
*v = arr;
|
||||||
@ -220,7 +220,8 @@ bool RapidSerializer::serialize(const dap::any& v) {
|
|||||||
return serialize(v.get<dap::object>());
|
return serialize(v.get<dap::object>());
|
||||||
} else if (v.is<dap::null>()) {
|
} else if (v.is<dap::null>()) {
|
||||||
} else {
|
} 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 type = get_any_type(v);
|
||||||
auto value = get_any_val(v);
|
auto value = get_any_val(v);
|
||||||
if (type && value) {
|
if (type && value) {
|
||||||
|
@ -117,7 +117,7 @@ class dap::Socket::Shared : public dap::ReaderWriter {
|
|||||||
|
|
||||||
~Shared() {
|
~Shared() {
|
||||||
if (info) {
|
if (info) {
|
||||||
freeaddrinfo(info);
|
freeaddrinfo(info);
|
||||||
}
|
}
|
||||||
close();
|
close();
|
||||||
term();
|
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