/cmake_template

Template for cross-platform VisualStudio-compatible CMake project with GitHub CI

Primary LanguagePythonMIT LicenseMIT

cmake_template

This repository provides a template for a GitHub-based CMake project which supports building & debugging using Visual Studio on both Windows and Linux

Quick Start

  1. Setup WSL subsystem: https://learn.microsoft.com/en-us/windows/wsl/install
  2. Install required packages on WSL: sudo apt-get install gcc g++ gdb cmake
  3. Clone this repository
  4. Open the cloned repository as "directory" in Visual Studio (as opposed to "open solution")
  5. Open Visual Studio settings, find CMake section, set following option: image
  6. Select target machine, configuration and target: image
  7. Press "Debug" and enjoy seamless debugging of a Linux binary in Visual Studio

Things to try

  • Linux: Launch sanitizers.exe executable with different sanitize configurations
  • Linux: Put a breakpoint in helloworld.cpp and run it
  • Windows: Run/debug tests with x64 sanitize=address config