Skip to content

To enable the STRICTEST compiler flags for competive programming (single file compile script).

License

Notifications You must be signed in to change notification settings

Estrella-Explore/gcc_strict-flags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gcc_strict-flags

This is a single file compile script which enables the STRICTEST compiler flags for competitive programming.


Features

  • Compiles C++ files with strictest flags ever and some assist debugging flags.
  • Detects test case files (*.in) and automatically redirects output to *.ans.

Usage

  1. Download make.sh from release:

    You may clone this repo and try the demos first.

  2. Installation

    chmod +x ./make.sh
    sudo cp ./make.sh /usr/bin/fkccf
  3. Run the script with your C++ file:

    fkccf <your_file.cpp>
  4. Key functionalities:

    • Compilation: The script compiles the provided C++ file and generates an executable (*.out).
    • Automatical test: If <filename>.in exists, you will be prompted to use it as stdin. Output is saved as <filename>.ans.

Requirements

  • g++: Ensure g++ is installed with support for C++14 or later.
  • Bash: The script is written for Bash environments (Linux, macOS, WSL, etc.).

Example Workflow

Given a file example.cpp:

  1. Run the script:

    fkccf example.cpp
  2. If example.in exists, the script prompts:

    [Info]: Test case example.in detected.
    ------> Use this test case as stdin? [Y/n]
    
  3. If confirmed, output is saved in example.ans and displayed in the terminal.


License

This repo is licensed under the GPLv3 License.

Star History

Star History Chart