This is a template C++ project for VS Code.
To install dependencies the following tools are recomended:
-
Install command
-
Debian/Ubuntu:
sudo apt install build-essential
-
Windows:
choco install mingw -y
-
MacOS:
brew install gcc
-
-
Install command
-
Debian/Ubuntu:
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
-
Windows:
Visual Studio 2019 ships with LLVM (see the Visual Studio section). However, to install LLVM separately:
choco install llvm -y
llvm-utils for using external LLVM with Visual Studio generator:
git clone https://github.com/zufuliu/llvm-utils.git cd llvm-utils/VS2017 .\install.bat
-
MacOS:
brew install llvm
-
-
Install Command
-
Debian/Ubuntu:
sudo apt-get install cmake
-
Windows:
choco install cmake -y --installargs 'ADD_CMAKE_TO_PATH=""User""'
-
MacOS:
brew install cmake
-
-
Install Command
-
Debian/Ubuntu:
sudo apt-get install doxygen sudo apt-get install graphviz
-
Windows:
choco install doxygen.install -y choco install graphviz -y
-
MacOS:
brew install doxygen brew install graphviz
-
-
Install Command
-
Debian/Ubuntu:
sudo apt-get install cppcheck
-
Windows:
choco install cppcheck -y
-
MacOS:
brew install cppcheck
-
Extention | Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter |
---|---|
C/C++ | ext install ms-vscode.cpptools |
CMake Tools | ext install ms-vscode.cpptools |
C/C++ Advanced Lint | ext install jbenden.c-cpp-flylint |
Task | Keybinding |
---|---|
CMake: Run Without Debugging |
Shift+F5 |
CMake: Build |
F7 |
Debug: Start Debugging |
F5 |
CMake options are variables that can either be ON or OFF, with a controllable default. You can set an option either with CMake Gui tools or the command line via -D.
(Defaults to OFF) If enabled, the Doxygen documents will be built.
(Defaults to OFF) Enable static analysis with cppcheck
(Defaults to OFF) Enable static analysis with clang-tidy