Skip to content
Snippets Groups Projects
Commit fc536057 authored by CARDILE VINCENT's avatar CARDILE VINCENT
Browse files

ajout script de compilation

parent c5ac0967
Branches
No related merge requests found
run.bsh 0 → 100644
#!/bin/bash
arg1=$1
if [ -z "$arg1" ]; then
echo "Usage: $0 <arg>"
echo " arg: c -> gen makefile for c++"
echo " 3c -> gen makefile, compile and run"
echo " cc -> compile"
echo " cr -> compile and run"
echo " r -> run"
exit 1
fi
if [ "$arg1" == "c" ]; then
echo "Generating makefile for c++"
cmake -S ./ -B ./build/
exit 0
elif [ "$arg1" == "3c" ]; then
echo "Generating makefile for c++"
cmake -S ./ -B ./build/
echo "Compiling and running"
cmake --build ./build/
./build/breaker
exit 0
elif [ "$arg1" == "cc" ]; then
echo "Compiling"
cmake --build ./build/
exit 0
elif [ "$arg1" == "cr" ]; then
echo "Compiling and running"
cmake --build ./build/
./build/breaker
exit 0
elif [ "$arg1" == "r" ]; then
echo "Running"
./build/breaker
exit 0
fi
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment