.
This commit is contained in:
+3
-2
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if the correct number of arguments are provided
|
||||
# Compile and run as in unicorn
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 <cpp_file> <argument>"
|
||||
exit 1
|
||||
@@ -13,7 +14,7 @@ ARGUMENT=$2
|
||||
clang-format -i -style=file "$CPP_FILE"
|
||||
|
||||
# Compile the C++ file
|
||||
g++ "$CPP_FILE" -o run
|
||||
g++ "$CPP_FILE" -o run -O2 -Wall -Werror -std=gnu++23 -lm
|
||||
|
||||
# Check if the compilation was successful
|
||||
if [ $? -ne 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user