An open API service indexing awesome lists of open source software.

https://github.com/jaytwolab/vscode-cmake-cpp-linux-exe

.vscode setting for C++ and Linux (executable program type)
https://github.com/jaytwolab/vscode-cmake-cpp-linux-exe

Last synced: about 1 month ago
JSON representation

.vscode setting for C++ and Linux (executable program type)

Awesome Lists containing this project

README

          

# vscode-cmake-cpp-linux-exe

This project provides a template and environment setup for developing C++ executable programs on Linux using CMake and Visual Studio Code. It is ideal for those who want a quick start with C++ development in a Linux environment, featuring ready-to-use configurations and minimal boilerplate.

## Features

- Pre-configured `.vscode` settings for seamless development in Visual Studio Code
- Example `hello.cpp` source file to demonstrate a simple C++ executable
- `CMakeLists.txt` for CMake-based build automation
- Linux executable output setup
- Organized structure for easy extension and scaling

## Getting Started

### Prerequisites

- [CMake](https://cmake.org/) (version 3.10 or higher recommended)
- [g++](https://gcc.gnu.org/) or any compatible C++ compiler
- [Visual Studio Code](https://code.visualstudio.com/)
- [CMake Tools Extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)

### Setup

1. Clone this repository:
```bash
git clone https://github.com/JayTwoLab/vscode-cmake-cpp-linux-exe.git
cd vscode-cmake-cpp-linux-exe
```

2. Open the folder in Visual Studio Code.

3. Make sure all required extensions and tools are installed (see Prerequisites).

4. Use the VSCode command palette (Ctrl+Shift+P) to run: `CMake: Configure` and then `CMake: Build`.

5. Run the executable as built in your configured output directory.

## Project Structure

- `.vscode/` - VSCode-specific settings for C++ and CMake integration
- `CMakeLists.txt` - CMake build definition
- `hello.cpp` - Example source file

## Usage

This repository serves as a starting point for your own C++ executable projects. Feel free to modify `hello.cpp` and extend as needed for your application.

## License

- MIT

## Author

- Maintained by [JayTwoLab](https://github.com/JayTwoLab)