Skip to content

Commit f04d6f4

Browse files
committed
Don't assume compiler paths
1 parent 848f92e commit f04d6f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/compilerName.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ if [[ $COMPILER = "gcc" ]]; then
1414
;;
1515
esac
1616

17-
export C_COMPILER="/usr/bin/gcc"
18-
export CXX_COMPILER="/usr/bin/g++"
17+
export C_COMPILER="$(which gcc)"
18+
export CXX_COMPILER="$(which g++)"
1919
elif [[ $COMPILER = "clang" ]]; then
2020
case $(uname -v) in
2121
*FreeBSD*)
@@ -28,6 +28,6 @@ elif [[ $COMPILER = "clang" ]]; then
2828
;;
2929
esac
3030

31-
export C_COMPILER="/usr/bin/clang"
32-
export CXX_COMPILER="/usr/bin/clang++"
31+
export C_COMPILER="$(which clang)"
32+
export CXX_COMPILER="$(which clang++)"
3333
fi

0 commit comments

Comments
 (0)