Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@

This project uses CMake and requires a modern C++17 compiler.

### 1. Build the Project
### 1. Clone repo and install required dependencies
This project uses GTest, LSL, SDL2, Clang-format, Clang-tidy, protobuf-compiler and cmake, but you don't need to install GTest and LSL because cmake will install it for you. Below is minimal linux setup.

```bash
git clone git@github.com:KN-Neuron/Neuron-IDE-runtime.git

sudo apt update
sudo apt install cmake clang-format clang-tidy libsdl2-dev protobuf-compiler
```

### 2. Build the Project
To configure and compile the project, open your terminal in the root directory and run:

```bash
Expand All @@ -17,7 +27,7 @@ cmake --build build

Once built, the main executable will be available inside the `build` directory.

### 2. Running Tests
### 3. Running Tests
This project uses Google Test (GTest) and CTest for testing. The tests are categorized by labels so you can run them selectively.

**To run all tests:**
Expand All @@ -36,4 +46,24 @@ ctest -L unit --output-on-failure
```bash
cd build
ctest -L component --output-on-failure
```

### 4. Code Formatting

This project includes a custom CMake target to automatically format all C++ source files using `clang-format`.

**To format your code:**
```bash
# Assuming you have already configured the build directory
cmake --build build --target format
```

This will run `clang-format -i` over all trackable source and header files, applying the style configuration specified in the project.

### 5. Working with protobuf files

In case you want to create an example .pb file for testing or some other purpose, you have to first create a .pbtxt file (check out protoFiles/tests/test_scene.pbtxt for reference) which you then compile with this command:

```bash
protoc --encode=NeuronIDE.Scene protoFiles/neuronide.proto < protoFiles/tests/test_scene.pbtxt > protoFiles/tests/test_scene.pb
```
Loading