{"id":13494938,"url":"https://github.com/google/cppdap","last_synced_at":"2025-03-28T15:32:11.539Z","repository":{"id":44423045,"uuid":"220553951","full_name":"google/cppdap","owner":"google","description":"C++ library for the Debug Adapter Protocol","archived":false,"fork":false,"pushed_at":"2025-02-22T22:18:35.000Z","size":299,"stargazers_count":162,"open_issues_count":14,"forks_count":51,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-22T00:41:24.890Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-08T21:57:13.000Z","updated_at":"2025-03-09T16:21:02.000Z","dependencies_parsed_at":"2024-01-08T11:24:29.560Z","dependency_job_id":"202931b8-e253-49b3-badf-5fbfc64fe0ac","html_url":"https://github.com/google/cppdap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fcppdap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fcppdap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fcppdap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fcppdap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/cppdap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246053861,"owners_count":20716274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:01:29.683Z","updated_at":"2025-03-28T15:32:11.142Z","avatar_url":"https://github.com/google.png","language":"C++","readme":"# cppdap\n\n## About\n\n`cppdap` is a C++11 library ([\"SDK\"](https://microsoft.github.io/debug-adapter-protocol/implementors/sdks/)) implementation of the [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/), providing an API for implementing a DAP client or server.\n\n`cppdap` provides C++ type-safe structures for the full [DAP specification](https://microsoft.github.io/debug-adapter-protocol/specification), and provides a simple way to add custom protocol messages.\n\n## Fetching dependencies\n\n`cppdap` provides CMake build files to build the library, unit tests and examples.\n\n`cppdap` depends on the [`nlohmann/json` library](https://github.com/nlohmann/json), and the unit tests depend on the [`googletest` library](https://github.com/google/googletest). Both are referenced as a git submodules.\n\nBefore building, fetch the git submodules with:\n\n```bash\ncd \u003cpath-to-cppdap\u003e\ngit submodule update --init\n```\n\nAlternatively, `cppdap` can use the [`RapidJSON` library](https://rapidjson.org/) or the [`JsonCpp` library](https://github.com/open-source-parsers/jsoncpp) for JSON serialization. Use the `CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE`, `CPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE`, and `CPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE` CMake cache variables to select which library to use.\n\n## Building\n\n### Linux and macOS\n\nNext, generate the build files:\n\n```bash\ncd \u003cpath-to-cppdap\u003e\nmkdir build\ncd build\ncmake ..\n```\n\nYou may wish to suffix the `cmake ..` line with any of the following flags:\n\n* `-DCPPDAP_BUILD_TESTS=1` - Builds the `cppdap` unit tests\n* `-DCPPDAP_BUILD_EXAMPLES=1` - Builds the `cppdap` examples\n* `-DCPPDAP_INSTALL_VSCODE_EXAMPLES=1` - Installs the  `cppdap` examples as Visual Studio Code extensions\n* `-DCPPDAP_WARNINGS_AS_ERRORS=1` - Treats all compiler warnings as errors.\n\nFinally, build the project:\n\n`make`\n\n### Windows\n\n`cppdap` can be built using [Visual Studio 2019's CMake integration](https://docs.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=vs-2019).\n\n\n### Using `cppdap` in your CMake project\n\nYou can build and link `cppdap` using `add_subdirectory()` in your project's `CMakeLists.txt` file:\n```cmake\nset(CPPDAP_DIR \u003cpath-to-cppdap\u003e) # example \u003cpath-to-cppdap\u003e: \"${CMAKE_CURRENT_SOURCE_DIR}/third_party/cppdap\"\nadd_subdirectory(${CPPDAP_DIR})\n```\n\nThis will define the `cppdap` library target, which you can pass to `target_link_libraries()`:\n\n```cmake\ntarget_link_libraries(\u003ctarget\u003e cppdap) # replace \u003ctarget\u003e with the name of your project's target\n```\n\nYou may also wish to specify your own paths to the third party libraries used by `cppdap`.\nYou can do this by setting any of the following variables before the call to `add_subdirectory()`:\n\n```cmake\nset(CPPDAP_THIRD_PARTY_DIR \u003cthird-party-root-directory\u003e) # defaults to ${CPPDAP_DIR}/third_party\nset(CPPDAP_JSON_DIR        \u003cpath-to-nlohmann-json\u003e)      # defaults to ${CPPDAP_THIRD_PARTY_DIR}/json\nset(CPPDAP_GOOGLETEST_DIR  \u003cpath-to-googletest\u003e)         # defaults to ${CPPDAP_THIRD_PARTY_DIR}/googletest\nadd_subdirectory(${CPPDAP_DIR})\n```\n\n---\n\nNote: This is not an officially supported Google product\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fcppdap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fcppdap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fcppdap/lists"}