add nimCompile to simplify koch; add nimfind to koch tools (#9723)
This commit is contained in:
parent
3fe8b4f69d
commit
2eb14bdd41
3 changed files with 29 additions and 20 deletions
|
|
@ -52,8 +52,18 @@ proc execCleanPath*(cmd: string,
|
|||
putEnv("PATH", prevPath)
|
||||
|
||||
proc nimexec*(cmd: string) =
|
||||
# Consider using `nimCompile` instead
|
||||
exec findNim() & " " & cmd
|
||||
|
||||
proc nimCompile*(input: string, outputDir = "bin", mode = "c", options = "") =
|
||||
# TODO: simplify pending https://github.com/nim-lang/Nim/issues/9513
|
||||
var cmd = findNim() & " " & mode
|
||||
let output = outputDir / input.splitFile.name.exe
|
||||
cmd.add " -o:" & output
|
||||
cmd.add " " & options
|
||||
cmd.add " " & input
|
||||
exec cmd
|
||||
|
||||
const
|
||||
pdf = """
|
||||
doc/manual.rst
|
||||
|
|
|
|||
2
tools/nimfind.nims
Normal file
2
tools/nimfind.nims
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
--define:nimfind
|
||||
--define:nimcore
|
||||
Loading…
Add table
Add a link
Reference in a new issue