mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 22:33:49 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user