c3lang / c3c

Compiler for the C3 language
GNU Lesser General Public License v3.0
1.34k stars 80 forks source link

"output-dir" command line option #1155

Closed cbuttner closed 2 months ago

cbuttner commented 4 months ago

I would appreciate a command line option --output-dir, which should do the same as "output" in project.json.

lerno commented 4 months ago

I added it to dev

cbuttner commented 2 months ago

This works for the most part, but if you supply an absolute path to --output-dir (or "output" in project.json for that matter), c3c run, c3c test, c3c benchmark etc. will fail to run the executable.

c3c run --output-dir /tmp/build 
Program linked to executable '/tmp/build/test'.
Launching .//tmp/build/test...
sh: line 1: .//tmp/build/test: No such file or directory
lerno commented 2 months ago

Does it work better now in the latest @cbuttner ?

lerno commented 2 months ago

(In dev I mean)

cbuttner commented 2 months ago

Thank you, can confirm it works well now.