mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 13:28:30 +00:00
fix: add missing .cxx/.cc/.hxx/.hh extensions to fmt; update docs for 0.7.0
This commit is contained in:
@@ -30,9 +30,12 @@ dcr build --debug --clean
|
||||
- `build.compiler`
|
||||
- `build.language`
|
||||
- `build.standard`
|
||||
- `build.cxx_standard`
|
||||
- `build.kind`
|
||||
- `build.target`
|
||||
- `build.out_dir`
|
||||
- `build.platform`
|
||||
- `package.type`
|
||||
- `build.cflags`
|
||||
- `build.ldflags`
|
||||
- `build.ldscript`
|
||||
@@ -58,8 +61,9 @@ dcr build --debug --clean
|
||||
|
||||
- Profile flag (`--debug` / `--release`) can appear in any argument position (duplicates are rejected).
|
||||
- Unknown profile flags return an error.
|
||||
- `--target <triple>` builds for specified target (short names: `linux`, `macos`, `windows`).
|
||||
- `--target <triple>` builds for specified target (short names: `linux`, `macos`, `windows`, `freebsd`, `openbsd`, `netbsd`).
|
||||
- `--verbose` prints the compiler/linker command lines to stderr (also works via `DCR_DEBUG` env var).
|
||||
- `--workspace <name>` filters build to a specific workspace member.
|
||||
- If no `--target`, builds for `build.targets` or native.
|
||||
- Incremental rebuild checks source/object mtime and tracked header dependencies.
|
||||
- `--force` skips build cache checks and recompiles.
|
||||
|
||||
19
docs/commands/dcr-fmt.md
Normal file
19
docs/commands/dcr-fmt.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# dcr fmt
|
||||
|
||||
Formats all C/C++ source files using `clang-format`.
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
dcr fmt
|
||||
```
|
||||
|
||||
## Behavior
|
||||
|
||||
1. Scans `src/` and `tests/` directories recursively.
|
||||
2. Formats all C/C++ source and header files (`.c`, `.cpp`, `.cxx`, `.cc`, `.h`, `.hpp`, `.hxx`, `.hh`) using `clang-format`.
|
||||
3. Uses `.clang-format` if present in the project root, otherwise falls back to LLVM style.
|
||||
|
||||
## Requirements
|
||||
|
||||
- `clang-format` must be installed and available in PATH.
|
||||
@@ -23,11 +23,12 @@ dcr run --debug --clean
|
||||
|
||||
## Restrictions
|
||||
|
||||
- If `build.kind` (or `build.{profile}.kind`) is `"staticlib"` or `"sharedlib"`, `run` exits with error.
|
||||
- If `build.kind` (or `build.{profile}.kind`) is `"staticlib"`, `"sharedlib"`, `"efi"`, or `"elf"`, `run` exits with error.
|
||||
- The profile is selected from the first argument.
|
||||
- `--target <triple>` runs the binary for specified target (short names: `linux`, `macos`, `windows`).
|
||||
- `--target <triple>` runs the binary for specified target (short names: `linux`, `macos`, `windows`, `freebsd`, `openbsd`, `netbsd`).
|
||||
- `--force` skips build cache checks and recompiles.
|
||||
- `--clean` removes `target/<profile>` and `build.clean` paths before building.
|
||||
- `--workspace <name>` filters build to a specific workspace member.
|
||||
|
||||
## `run.cmd` variables
|
||||
|
||||
|
||||
Reference in New Issue
Block a user