script-linux/rls

24 lines
460 B
Plaintext
Raw Normal View History

2023-02-01 19:08:43 +01:00
#!/bin/bash
2023-02-04 11:52:42 +01:00
# compile un programme en c++ en mode release
2023-02-01 19:08:43 +01:00
2023-03-16 11:40:43 +01:00
if [[ $1 != "" ]]; then
2023-02-01 19:08:43 +01:00
cd $1
fi
project=$(grep "^\(project(\)" CMakeLists.txt) || exit
project=${project#project(}
project=${project%% *}
cd $(pwd)/build
2023-03-16 11:40:43 +01:00
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-03 ..
#cmake -DCMAKE_BUILD_TYPE=Release ..
#cmake -CMAKE_CXX_FLAGS=-03 ..
2023-02-01 19:08:43 +01:00
make
figlet "noice" | lolcat
echo -n "lunch $project ? (y/n) "
read input
2023-03-16 11:40:43 +01:00
if [[ input = "y" ]]; then
2023-02-01 19:08:43 +01:00
./$project
fi