From 85dbfc68b5c2020b32be9e3dc0d711b749fb5c6f Mon Sep 17 00:00:00 2001 From: Daniel Belmes <3631206+DanielBelmes@users.noreply.github.com> Date: Fri, 5 May 2023 05:27:33 -0700 Subject: [PATCH] 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 --- doc/manual.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/manual.md b/doc/manual.md index 31e69d0acc..2b982488f0 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.