ARMmbed / mbed-os-example-blinky

Blinky example for Mbed OS 6.0
Apache License 2.0
42 stars 158 forks source link

Move main.cpp to a src folder #230

Closed Patater closed 3 years ago

Patater commented 4 years ago

For consistency across all Mbed examples, we'd like to place any example source cpp files in a folder called "src" in line with typical C++ developer (possibly non-Mbed-user) expectations.

rwalton-arm commented 4 years ago

Should we add an empty "include" folder, too? I'm aware this example doesn't define a header file, but it will mean we have a consistent directory tree layout across examples.

rwalton-arm commented 4 years ago

Should we add an empty "include" folder, too? I'm aware this example doesn't define a header file, but it will mean we have a consistent directory tree layout across examples.

I actually think we should do something like (maybe without populating the "tests" folder):

├── CMakeLists.txt
├── CONTRIBUTING.md
├── README.md
├── blinky
│   ├── CMakeLists.txt
│   ├── include
│   └── src
│       └── main.cpp
├── mbed-os
|   ├── ...
├── mbed-os.lib
├── resources
│   └── official_armmbed_example_badge.png
└── tests
    ├── CMakeLists.txt
    └── test_blinky.cpp
Patater commented 3 years ago

This is not really needed anymore. We are adding CMakeLists.txt files to examples, rather than auto-generating them.