https://github.com/fengkx/leetcode-cmake
Leetcode CMake template. For easy building, testing, and debugging with CMake, GTest, and VSCode.
https://github.com/fengkx/leetcode-cmake
cmake-template leetcode leetcode-cpp template-project
Last synced: about 6 hours ago
JSON representation
Leetcode CMake template. For easy building, testing, and debugging with CMake, GTest, and VSCode.
- Host: GitHub
- URL: https://github.com/fengkx/leetcode-cmake
- Owner: fengkx
- License: wtfpl
- Created: 2020-10-27T17:54:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-28T01:31:57.000Z (over 4 years ago)
- Last Synced: 2025-06-09T22:41:03.193Z (8 days ago)
- Topics: cmake-template, leetcode, leetcode-cpp, template-project
- Language: C++
- Homepage:
- Size: 817 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LeetCode CMake
> Leetcode CMake template. For easy building, testing, and debugging with CMake, GTest, and VSCode.
## Requirements
- [CMake](https://cmake.org/)
- [GTest](https://github.com/google/googletest)
- GCC/Clang and makeRun `sudo apt install build-essential cmake libgtest-dev` to install in Ubuntu> 20.04
## Usage
Run `./new.sh ` to create a new problem directory in `problems`.
Every CPP file in this directory will be a **solution** to the problem and you can have several solutions for one problem.
Run `cmake .` then `make` in either top directory or problem directory to build either all or one problem.
It will compile a binary in the problem directory with the same name as the solution cpp file.
### `` One Press debug in Visual Studio Code
Once install the needed extensions on VSCode (`C/++`, `CMake Tools`) and debugger with mi support installed on your system, You can debug the currently active file with just a ``

# Credits
https://github.com/Pokerpoke/LeetCode