compile.sh: Tiny compilation script for Competitive Programming

Правка en1, от LilyWhite, 2021-11-01 16:20:07

So I have a script I've written for my own use that does simple compilation jobs.

Through time, I've been adding functionalities to it, and then it occurred to me that I can publish it so others can benefit and improve it.

So I've added some sanity check and made it free (as in freedom) software on Github

Currently it has the following functions:

Arguments:
  -h | --help               Show this help
  -f | --file FILE          The file to compile, without the .cpp suffix
  -i | --input-file FILE    Feed input to your program from FILE
  -c | --compare PATH       Batch compare with data in PATH
                            This option assumes that the input and output files
                            are named name_id.in and name_id.out, where name is 
                            the argument to -f and id increases from 1
  --sanitize                Use G++ sanitize options
  --verbose                 Be more talkative
  --version                 Print version and copyright information.

Just execute the compile.sh file in the repo and that's it!

Please help me improve it and I hope that it can become more powerful through community efforts.

Note that currently some options are hardcoded, they do work for me but may not work for you:

  • It defines macro with -DLILYWHITE for debug use.
  • It compiles in C++14

Thanks!

Теги tool, bash

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский LilyWhite 2021-11-01 16:20:07 1505 Initial revision (published)