Skip to content

Commit

Permalink
[crashpad]:添加,等待vcpkg修复linux下编译[#38322](microsoft/vcpkg#38322);
Browse files Browse the repository at this point in the history
[automic queue]:移除;
  • Loading branch information
RealChuan committed Apr 25, 2024
1 parent 185196b commit e55e55e
Show file tree
Hide file tree
Showing 32 changed files with 282 additions and 305 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ jobs:
shell: bash
run: |
brew install ninja
pip3 install setuptools
ninja --version
cmake --version
clang --version
- name: Install dependencies on ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install ninja-build
sudo apt-get install ninja-build clang
ninja --version
cmake --version
gcc --version
Expand All @@ -83,11 +84,12 @@ jobs:
${{ runner.os }}-
save-always: true

- name: Enable Developer Command Prompt
- name: Configure msvc for amd64
if: startsWith(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1.12.1
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64

- name: Configure windows
if: startsWith(matrix.os, 'windows')
shell: bash
Expand All @@ -99,7 +101,7 @@ jobs:
-DCMAKE_CXX_COMPILER=cl \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-G "${{ matrix.generators }}" \
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|| (cat ./build/vcpkg_installed/vcpkg/issue_body.md && exit 1)
- name: Configure macos or ubuntu
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
shell: bash
Expand All @@ -109,7 +111,7 @@ jobs:
-B ./build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-G "${{ matrix.generators }}" \
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|| (cat ./build/vcpkg_installed/vcpkg/issue_body.md && exit 1)
- name: Build
shell: bash
run: |
Expand Down
5 changes: 0 additions & 5 deletions AtomicQueue/CMakeLists.txt

This file was deleted.

71 changes: 0 additions & 71 deletions AtomicQueue/atomicqueue.hpp

This file was deleted.

101 changes: 0 additions & 101 deletions AtomicQueue/atomicqueue_unittest.cc

This file was deleted.

7 changes: 4 additions & 3 deletions Breakpad/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
add_executable(Breakpad main.cc breakpad.cc breakpad.hpp)
target_link_libraries(Breakpad PRIVATE unofficial::breakpad::libbreakpad
unofficial::breakpad::libbreakpad_client)
add_executable(breakpad_test main.cc breakpad.cc breakpad.hpp)
target_link_libraries(
breakpad_test PRIVATE unofficial::breakpad::libbreakpad
unofficial::breakpad::libbreakpad_client)
6 changes: 4 additions & 2 deletions Breakpad/breakpad.hpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#pragma once

#include <utils/object.hpp>

#include <memory>
#include <string>

namespace google_breakpad {
class ExceptionHandler;
}

class Breakpad
class Breakpad : noncopyable
{
public:
Breakpad(const std::string &dump_path);
explicit Breakpad(const std::string &dump_path);
~Breakpad();

private:
Expand Down
17 changes: 15 additions & 2 deletions Breakpad/main.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
#include "breakpad.hpp"

auto main(int argc, char *argv[]) -> int
#include <filesystem>

void crash()
{
Breakpad breakpad("./");
int *p = nullptr;
*p = 1;
}

auto main(int argc, char *argv[]) -> int
{
auto dumpPath = std::filesystem::current_path() / "breakpad";
if (!std::filesystem::exists(dumpPath)) {
std::filesystem::create_directory(dumpPath);
}

Breakpad breakpad(dumpPath.string());

crash();

return 0;
}
Loading

0 comments on commit e55e55e

Please sign in to comment.