https://github.com/DarkWanderer/cmake_template
Template for cross-platform VisualStudio-compatible CMake project with GitHub CI
https://github.com/DarkWanderer/cmake_template
cmake cross-platform debugging template visual-studio
Last synced: about 1 year ago
JSON representation
Template for cross-platform VisualStudio-compatible CMake project with GitHub CI
- Host: GitHub
- URL: https://github.com/DarkWanderer/cmake_template
- Owner: DarkWanderer
- License: mit
- Created: 2022-09-11T13:56:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-04T18:14:10.000Z (almost 3 years ago)
- Last Synced: 2024-08-02T13:20:12.303Z (almost 2 years ago)
- Topics: cmake, cross-platform, debugging, template, visual-studio
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
1. Install required packages on WSL: `sudo apt-get install gcc g++ gdb cmake`
1. Clone this repository
1. Open the cloned repository as "directory" in Visual Studio (as opposed to "open solution")
1. Open Visual Studio settings, find CMake section, set following option:

1. Select target machine, configuration and target: 
1. 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