{"id":30176435,"url":"https://github.com/jamesnulliu/leetcode","last_synced_at":"2025-08-12T02:48:06.546Z","repository":{"id":305150938,"uuid":"1019941681","full_name":"jamesnulliu/leetcode","owner":"jamesnulliu","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-30T06:12:41.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-30T08:34:06.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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}},"created_at":"2025-07-15T05:39:37.000Z","updated_at":"2025-07-30T06:12:45.000Z","dependencies_parsed_at":"2025-07-18T16:47:03.694Z","dependency_job_id":"37beb052-33a8-4153-976a-e77cf2e13ae9","html_url":"https://github.com/jamesnulliu/leetcode","commit_stats":null,"previous_names":["jamesnulliu/leetcode"],"tags_count":0,"template":false,"template_full_name":"jamesnulliu/VSC-CMake-CXX-Project-Template","purl":"pkg:github/jamesnulliu/leetcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesnulliu","download_url":"https://codeload.github.com/jamesnulliu/leetcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesnulliu%2Fleetcode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269991713,"owners_count":24509010,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-08-12T02:48:01.274Z","updated_at":"2025-08-12T02:48:06.510Z","avatar_url":"https://github.com/jamesnulliu.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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\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 \\ \n    cd vcpkg \u0026\u0026 ./bootstrap-vcpkg.sh  \u0026\u0026 \\\n    wget -O /tmp/kitware-archive.sh \\\n        https://apt.kitware.com/kitware-archive.sh \u0026\u0026 \\\n    bash /tmp/kitware-archive.sh \u0026\u0026 \\\n    apt-get update \u0026\u0026 apt-get install -y cmake \u0026\u0026 \\\n    wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh \u0026\u0026 \\\n    chmod +x /tmp/llvm.sh \u0026\u0026 /tmp/llvm.sh ${LLVM_VERSION} \u0026\u0026 \\\n    apt-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/), and then choose the `Desktop development with C++` workload. \n\nAfter that, open Powershell, install [scoop](https://scoop.sh/) and the following softwares:\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 vcpkg\n```\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 --prune-env-path\n```\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%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesnulliu%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesnulliu%2Fleetcode/lists"}