Template for a C++ project.
This repository provides integration with Codespaces.
Just click the <> Code
button, then click the Codespaces
tab and then click the Create codespace on main
button.
All things needed for development will be configured automatically.
Refer to Getting started with Visual Studio Code
if you want the same experience on your own machine.
-
Install Visual Studio Code with the following extensions: ms-vscode-remote.remote-containers (mandatory) ms-vscode-remote.remote-wsl (if you are using WSL on Windows)
-
Install GitHub CLI. https://github.com/cli/cli#installation
-
Login into your GitHub account using HTTPS:
gh auth login
-
Clone this repository or your own fork to a folder.
-
Open the folder using the following VSC command:
>Dev Containers: Open Folder in Container...
cmake -G Ninja -S . -B build -DCMAKE_TOOLCHAIN_FILE=toolchain/<Toolchain> -DCMAKE_BUILD_TYPE=<Build type>
Where:
- Build type -
Debug
|Release
|MinSizeRel
|RelWithDebInfo
. - Toolchain - see the
toolchain
folder. Example:ubuntu_llvm.cmake
.
cmake --build build
ctest --extra-verbose --test-dir build
- Start of a codespace or a local VSC takes 10+ min.