{"id":25204917,"url":"https://github.com/jamesnulliu/vsc-cmake-cxx-project-template","last_synced_at":"2026-02-17T15:02:33.594Z","repository":{"id":261536932,"uuid":"884208890","full_name":"jamesnulliu/VSC-CMake-CXX-Project-Template","owner":"jamesnulliu","description":"A Template of Cross-Platform CMake-C++ Project for Visual Studio Code with Github Actions CI/CD.","archived":false,"fork":false,"pushed_at":"2025-09-17T06:33:04.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T03:39:35.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesnulliu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-06T10:49:11.000Z","updated_at":"2025-09-17T06:33:07.000Z","dependencies_parsed_at":"2024-11-29T16:21:47.024Z","dependency_job_id":"ff297b22-2575-45d8-aff5-099fc1e18d93","html_url":"https://github.com/jamesnulliu/VSC-CMake-CXX-Project-Template","commit_stats":null,"previous_names":["jamesnulliu/vsc-cpp-template","jamesnulliu/vsc-cmake-cxx-project-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/jamesnulliu/VSC-CMake-CXX-Project-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2FVSC-CMake-CXX-Project-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2FVSC-CMake-CXX-Project-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2FVSC-CMake-CXX-Project-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2FVSC-CMake-CXX-Project-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesnulliu","download_url":"https://codeload.github.com/jamesnulliu/VSC-CMake-CXX-Project-Template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2FVSC-CMake-CXX-Project-Template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29548201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-02-10T09:18:10.654Z","updated_at":"2026-02-17T15:02:33.564Z","avatar_url":"https://github.com/jamesnulliu.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- omit from toc --\u003e\n# VSC-CMake-CXX-Project-Template\nA Template of Cross-Platform CMake-C++ Project for Visual Studio Code with Github Actions CI/CD.\n\n- [1. Environment Setup](#1-environment-setup)\n  - [1.1. Linux with GCC and Clang](#11-linux-with-gcc-and-clang)\n  - [1.2. Windows with MSVC](#12-windows-with-msvc)\n  - [1.3. Windows with MinGW](#13-windows-with-mingw)\n- [2. How to Use this Template](#2-how-to-use-this-template)\n  - [2.1. Create Your Own Repository](#21-create-your-own-repository)\n  - [2.2 Generate a Project](#22-generate-a-project)\n  - [2.3. Build a Executable or Library](#23-build-a-executable-or-library)\n  - [2.4. Reset Project](#24-reset-project)\n- [5. Remove Template](#5-remove-template)\n\n\n## 1. Environment Setup\n\n### 1.1. Linux with GCC and Clang\n\nInstall the following softwares:\n\n```bash\nexport LLVM_VERSION=20\n\napt-get install -y \\\n    git apt-utils lsb-release software-properties-common gnupg  \\\n    ninja-build pkg-config build-essential gdb curl wget\n  \ncd /usr/local \u0026\u0026 git clone https://github.com/microsoft/vcpkg.git \u0026\u0026 \\ \ncd vcpkg \u0026\u0026 ./bootstrap-vcpkg.sh  \u0026\u0026 \\\nwget -O /tmp/kitware-archive.sh \\\n    https://apt.kitware.com/kitware-archive.sh \u0026\u0026 \\\nbash /tmp/kitware-archive.sh \u0026\u0026 \\\napt-get update \u0026\u0026 apt-get install -y cmake \u0026\u0026 \\\nwget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh \u0026\u0026 \\\nchmod +x /tmp/llvm.sh \u0026\u0026 /tmp/llvm.sh ${LLVM_VERSION} \u0026\u0026 \\\napt-get install -y libomp-${LLVM_VERSION}-dev  \n\n# Add VCPKG_ROOT to environment variables\necho \"export VCPKG_ROOT=/usr/local/vcpkg\" \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n```\n\n### 1.2. Windows with MSVC\n\nIf you are using Windows, first install [Visual Studio](https://visualstudio.microsoft.com/) **IN DEFAULT INSTALLATION PATH**, and then choose the `Desktop development with C++` workload. \n\nvcpkg, CMake and Ninja will be installed automatically by Visual Studio Installer.\n\n### 1.3. Windows with MinGW\n\nYou can skip the Visual Studio installation but install MinGW with scoop directly:\n\n```pwsh\n# Allow script execution\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n\n# Install scoop\nInvoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression\n\n# Install softwares\nscoop install cmake ninja git mingw vcpkg\n```\n\n## 2. How to Use this Template\n### 2.1. Create Your Own Repository\n\n1. Click `Use this template` -\u003e `Create a new repository` on the top right corner of this page.\n2. Clone your repository to your local machine.\n\n\n### 2.2 Generate a Project\n\nParameters:\n\n- `\u003cproject-name\u003e`: Name of your project. Can be any valid identifier.\n- `\u003cproject-type\u003e`: Type of the project you want to use. Can be:\n  - `0`: cxx_exe, a simple C++ executable project.\n  - `1`: cxx_lib, a C++ lib \u0026 test project.\n  - `2`: cuda_exe, a CUDA executable project.\n  - `3`: cuda_lib, a CUDA lib \u0026 test project.\n\n```bash\npython ./.templates/gen_project.py -n \u003cproject-name\u003e -t \u003cproject-type\u003e\n```\n\n### 2.3. Build a Executable or Library\n\nAfter generation, build the project by:\n\n```bash\nbash ./scripts/build.sh\n```\n\nOr if you are using windows and want to use MSVC deliberately, run the following command in Powershell or CMD:\n\n```pwsh\n.\\scripts\\msvc-bash.bat .\\scripts\\build.sh\n```\n\nUse `-h` or `--help` flag to see all available options.\n\n### 2.4. Reset Project\n\nIf you chose a wrong template, don't be worry. Reset the project by:\n\n```bash\npython ./.templates/gen_project.py --reset\n```\n\nOr directly switch to a new template:\n\n```bash\npython ./.templates/gen_project.py -n \u003cproject-name\u003e -t \u003cproject-type\u003e\n```\n\n## 5. Remove Template\n\nAfter generating your project, you can remove the \".template\" directory by deleting it directly, or use the following command:\n\n```bash\npython ./.templates/gen_project.py --remove-templates\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesnulliu%2Fvsc-cmake-cxx-project-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesnulliu%2Fvsc-cmake-cxx-project-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesnulliu%2Fvsc-cmake-cxx-project-template/lists"}