https://github.com/estrella-explore/gcc_strict-flags
To enable the STRICTEST compiler flags for competive programming (single file compile script).
https://github.com/estrella-explore/gcc_strict-flags
codacy-badge codeforces cpp14 gcc gcc-compiler icpc icpc-training luogu noip oi olympiad-in-informatics olympic shell shell-script shell-scripting shell-scripts
Last synced: 5 months ago
JSON representation
To enable the STRICTEST compiler flags for competive programming (single file compile script).
- Host: GitHub
- URL: https://github.com/estrella-explore/gcc_strict-flags
- Owner: Estrella-Explore
- License: gpl-3.0
- Created: 2024-08-30T02:04:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-07T11:14:43.000Z (about 1 year ago)
- Last Synced: 2025-04-06T08:24:26.378Z (12 months ago)
- Topics: codacy-badge, codeforces, cpp14, gcc, gcc-compiler, icpc, icpc-training, luogu, noip, oi, olympiad-in-informatics, olympic, shell, shell-script, shell-scripting, shell-scripts
- Language: Shell
- Homepage:
- Size: 59.6 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **gcc_strict-flags**
[](https://app.codacy.com/gh/Estrella-Explore/gcc_strict-flags/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
> [!TIP]
> 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](https://github.com/Estrella-Explore/gcc_strict-flags/releases):**
> You may clone this repo and try the demos first.
You could also download the latest version via `curl`:
```bash
curl -O https://raw.githubusercontent.com/Estrella-Explore/gcc_strict-flags/main/make.sh
```
2. **Installation**
```bash
chmod +x ./make.sh
sudo cp ./make.sh /usr/bin/fkccf
```
3. **Run the script with your C++ file:**
```bash
fkccf
```
4. **Key functionalities:**
- **Compilation:** The script compiles the provided C++ file and generates an executable (`*.out`).
- **Automatical test:** If `.in` exists, you will be prompted to use it as `stdin`. Output is saved as `.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, Git Bash, etc.).
---
## **Example Workflow**
Given a file `example.cpp`:
1. Run the script:
```bash
fkccf example.cpp
```
2. If `example.in` exists, the script prompts:
```text
[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](./LICENCE).
## Star History