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
This commit is contained in:
Daniel Belmes
2023-05-05 05:27:33 -07:00
committed by GitHub
parent 07233ceca0
commit 85dbfc68b5

View File

@@ -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.