chore: add gitattributes, rename guide, and template comments
Add .gitattributes enforcing LF line endings. Add a rename guide to README.md for scaffolding new projects. Comment main.c as a template placeholder to replace.
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
@@ -88,7 +88,21 @@ Linux / macOS:
|
|||||||
./build/main
|
./build/main
|
||||||
```
|
```
|
||||||
|
|
||||||
## Adding a new module (TDD workflow)
|
## Renaming the Project
|
||||||
|
|
||||||
|
To use this template for a new project, rename `ctdd` to your project
|
||||||
|
name:
|
||||||
|
|
||||||
|
1. Rename the `ctdd/` directory to `<src>/`.
|
||||||
|
2. Replace `ctdd` with `<src>` in:
|
||||||
|
- `CMakeLists.txt` (project name, `target_link_libraries`)
|
||||||
|
- `ctdd/CMakeLists.txt` (library names)
|
||||||
|
- All source `#include` directives
|
||||||
|
- `tests/CMakeLists.txt` (library references)
|
||||||
|
3. Update the `project()` call in `CMakeLists.txt`.
|
||||||
|
4. Update `main.c` to include your new headers.
|
||||||
|
|
||||||
|
Example: `ctdd/` becomes `mylib/`, `ctdd_str` becomes `mylib_str`.
|
||||||
|
|
||||||
### 1. Write the header
|
### 1. Write the header
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// Template placeholder — replace with your own entry point.
|
||||||
|
// Remove or rename this file when scaffolding a new project.
|
||||||
|
|
||||||
#include "ctdd/str.h"
|
#include "ctdd/str.h"
|
||||||
#include "ctdd/report.h"
|
#include "ctdd/report.h"
|
||||||
#include "ctdd/logger.h"
|
#include "ctdd/logger.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user