diff options
author | Daniel Belmes <3631206+DanielBelmes@users.noreply.github.com> | 2023-05-05 05:27:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 14:27:33 +0200 |
commit | 85dbfc68b5c2020b32be9e3dc0d711b749fb5c6f (patch) | |
tree | 2cfd3563e415fadeecd7b283b0fcaad547f635f8 | |
parent | 07233ceca0fa220418f1691e70c9e8d49e440737 (diff) | |
download | Nim-85dbfc68b5c2020b32be9e3dc0d711b749fb5c6f.tar.gz |
Update the Nim Manual compile pragma with the second tuple form (#21773)
* Update the nim manual compile pragma with the second tuple form of * Incorrectly put 'two' forms
-rw-r--r-- | doc/manual.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/manual.md b/doc/manual.md index 31e69d0ac..2b982488f 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -7597,10 +7597,16 @@ Compile pragma The `compile` pragma can be used to compile and link a C/C++ source file with the project: +This pragma can take three forms. The first is a simple file input: ```Nim {.compile: "myfile.cpp".} ``` +The second form is a tuple where the second arg is the output name strutils formatter: + ```Nim + {.compile: ("file.c", "$1.o").} + ``` + **Note**: Nim computes a SHA1 checksum and only recompiles the file if it has changed. One can use the `-f`:option: command-line option to force the recompilation of the file. |