Блог пользователя LilyWhite

Автор LilyWhite, история, 3 года назад, По-английски

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!

  • Проголосовать: нравится
  • +11
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It would be nice if you could add more features like time taken for every test case, comparing floats with various precisions, yes/no checker. Basically a few more arguments for more features. Also make the diff checker ignore trailing/leading spaces/newlines.

  • »
    »
    3 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    This is a shell script so implementing complex behaviors will be tricky.

    I might write a compile.py in the future, if I have time.