mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
20 lines
384 B
Bash
Executable File
20 lines
384 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# take one argument which is the compiler used
|
|
# return the required IRPF90_FLAGS for the $1 compiler
|
|
|
|
if [ -z "$1" ]
|
|
then
|
|
echo "Give the compiler in argument"
|
|
else
|
|
|
|
$1 --version > /dev/null \
|
|
&& $1 -O0 -fopenmp check_omp_v2.f90 \
|
|
&& ./a.out | tail -n 1
|
|
|
|
|
|
# if there is an error or if the compiler is not found
|
|
$1 --version > /dev/null || echo 'compiler not found'
|
|
|
|
fi
|