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

https://github.com/squidmin/cpp-labs

C++ / CMake sandbox project
https://github.com/squidmin/cpp-labs

cmake cpp cpp17 learning learning-exercises

Last synced: about 2 months ago
JSON representation

C++ / CMake sandbox project

Awesome Lists containing this project

README

        

# cpp-labs

C++ sandbox project

## Install

- A compiler supporting C++17.
- CMake v3.10 or higher.

## Build

Navigate to the project root.

Create a `build` directory and navigate to it:

```shell
mkdir build && cd build
```

Build the project:

```shell
cmake ..
```

Then, in the same directory:

```shell
make
```

To compile only a specific executable:

```shell
make ExecutableName
```

e.g.,

```shell
make IncrementAndDecrementOperators
```

Compiling a specific executable.

## Run an executable

`cd` to the directory of the example:

```shell
cd ./sections/sectionXX/YY_ExecutableName
```

e.g.,

```shell
cd ./sections/section01/02_DataTypes
```

Run the executable:

```shell
./ExecutableName
```

e.g.,

```shell
./DataTypes
```

Build and run an executable