summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2013-09-22 10:30:41 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2013-09-22 10:30:41 (GMT)
commit4ebd8136a83325e67be7a39c9349ec8812aa05c1 (patch)
tree5d1afb825da0f90db323e55fdc6e270f8484e7b1 /scripts
parentc6600f88414690f02251c0751b15a33ec0a8b553 (diff)
enable clang for freebsd (tested on freebsd 9)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/setenv-unibuild.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/setenv-unibuild.sh b/scripts/setenv-unibuild.sh
index d5ccb75..cfcf23d 100644
--- a/scripts/setenv-unibuild.sh
+++ b/scripts/setenv-unibuild.sh
@@ -43,9 +43,15 @@ setenv_common()
setenv_freebsd()
{
+ echo .... freebsd detected.
+ echo .... if you have freebsd >9, it is advisable to install
+ echo .... the clang compiler and re-run this script as
+ echo .... '. ./scripts/setenv-unibuild.sh clang'
setenv_common
QMAKESPEC=freebsd-g++
QTDIR=/usr/local/share/qt4
+ export QMAKESPEC
+ export QTDIR
}
setenv_netbsd()
@@ -78,6 +84,17 @@ setenv_linux_clang()
echo QMAKESPEC has been modified: $QMAKESPEC
}
+setenv_freebsd_clang()
+{
+ export CC=clang
+ export CXX=clang++
+ export QMAKESPEC=freebsd-clang
+
+ echo CC has been modified: $CC
+ echo CXX has been modified: $CXX
+ echo QMAKESPEC has been modified: $QMAKESPEC
+}
+
setenv_netbsd_clang()
{
echo --------------------- this is not yet supported. netbsd 6 lacks
@@ -141,6 +158,9 @@ if [ "`uname | grep -i 'linux\|debian'`" ]; then
fi
elif [ "`uname | grep -i freebsd`" ]; then
setenv_freebsd
+ if [ "`echo $* | grep clang`" ]; then
+ setenv_freebsd_clang
+ fi
elif [ "`uname | grep -i netbsd`" ]; then
setenv_netbsd
if [ "`echo $* | grep clang`" ]; then
contact: Jan Huwald // Impressum