MarkWareVCMake is a comprehensive, modern C/C++ project template designed for cross-platform development in Visual Studio Code. The template provides a robust foundation for both standalone executables and libraries, incorporating industry best practices and modern build tools.
- Cross-platform compatibility (Linux, macOS, Windows)
- Integrated build system with CMake
- Advanced debugging capabilities
- Sanitizer support through CMake options
- Conan package management integration
- Cross-compilation support
- SSH and WSL compatibility
- Automated workflow through Visual Studio Code tasks
VCMake2025-introduction.mp4
- Visual Studio Code with C++ extension
- Python 3 (managed via Pyenv)
- Conan 2 for dependency management
- CMake (latest version recommended)
- Code Formatters:
- Clang Format
- CMake Format
- CPM.cmake for lightweight dependency management
- CPM.license for license management
- ModernCppStarter integration
- GitHub Actions workflows for continuous integration
# Update system packages
sudo apt update && sudo apt upgrade -y
sudo apt install cmake python3-pip curl git libssl-dev libbz2-dev libcurses-ocaml-dev build-essential gdb libffi-dev libsqlite3-dev liblzma-dev libreadline-dev libtk-img-dev
# Configure Pyenv
curl https://pyenv.run | bash
pyenv install 3.9.2
pyenv virtualenv 3.9.2 env392
pip install --upgrade pip
# Install Conan
pip install conan
conan profile detect --force
Native Windows:
# Install Pyenv
[Follow Pyenv-win installation guide]
pyenv install 3.9.2
pyenv global 3.9.2
pyenv local 3.9.2
pip install --upgrade pip
# Install Conan
pip install conan
conan profile detect --force
WSL Setup:
wsl --install
wsl --install Debian
wsl --set-default-version 2
- Clone the repository:
git clone https://github.com/tomasmark79/MarkWareVCMake
cd MarkWareVCMake/
- Optional: Customize project names:
python SolutionRenamer.py VCMLib MyLibrary VCMStandalone MyStandalone
- Launch VSCode and configure shortcuts:
code .
F5
: Launch debuggerF7
: Quick buildShift+F7
: Task menuShift+Ctrl+S
: Run all build scenarios
- Supports multiple build types: Debug, Release, RelWithDebInfo, MinSizeRel
- Configurable CMake options for:
- Shared/static libraries
- Static runtime linking
- Various sanitizer options
The template includes preconfigured support for:
- x86_64-clang-linux-gnu
- x86_64-w64-mingw32
- aarch64-linux-gnu
- Clean build directories
- Dependency installation
- CMake configuration
- Build management
- License collection
- Artifact management
- Code formatting
- Diagnostic tools
- Solution renaming utility
- Automatic upgrade functionality
- Comprehensive logging system
This project is licensed under the MIT License.