gocpp
Your quickstart to blank C++ projects
With a single command, gocpp sets up a CMake-based C++ project for you including package management via vcpkg, formatting using clang-format and sanity checks using clang-tidy. The generated project is cross-platform and uses a modern C++ standard.
> curl.exe -s https://gocpp.dev/new | python
> curl.exe -s https://gocpp.dev/glfw | python
Prerequisites
Tool | Example command |
---|---|
Git | > winget install -e --id Git.Git |
Visual Studio | > winget install --id Microsoft.VisualStudio.2022.Community --override |
CMake | > winget install -e --id Kitware.CMake |
If winget is stuck loading, please ensure that it is up to date (Windows Store).
A Terminal restart might be necessary after installation.
> python3 -c "$(curl https://gocpp.dev/new)"
> python3 -c "$(curl https://gocpp.dev/glfw)"
Prerequisites
Install | Homebrew (.pkg) |
then | > brew install git cmake ninja pkg-config |
> python3 -c "$(curl https://gocpp.dev/new)"
Prerequisites
Development tools: | > sudo apt install git cmake ninja-build build-essential pkg-config |
> python3 -c "$(curl https://gocpp.dev/glfw)"
Prerequisites
Development tools + X11 + Wayland: | > sh <(curl https://gocpp.dev/linux_apt_glfw_pkg.sh) |
> python3 -c "$(curl https://gocpp.dev/new)"
Prerequisites
Development tools: | > sudo dnf install git cmake ninja-build gcc-c++ pkg-config clang-tools-extra cppcheck |
> python3 -c "$(curl https://gocpp.dev/glfw)"
Prerequisites
Development tools + X11 + Wayland: | > sh <(curl https://gocpp.dev/linux_dnf_glfw_pkg.sh) |
What does it do?
The script is a Python program that sets up vcpkg if it's not installed on your system yet.
It does so by git cloning and building it on your system, as per official vcpkg instructions.
Additionally, environment variables such as VCPKG_ROOT
are exported persistently.
Then a blank CMake-based C++ project is generated in its own folder which links to the vcpkg toolchain
and specifies dependencies in a vcpkg.json
file.
The script's source code is available for viewing or as a direct download:
Feedback
If you've encountered an issue or have suggestions and feedback, please don't hesitate to contact me. This is an ongoing project, so I'm happy to improve it and add more types of projects in the future while automating more steps.