diff options
author | don bright <hugh.m.bright@gmail.com> | 2012-07-20 20:51:40 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2012-07-20 20:51:40 (GMT) |
commit | b22951af47f7cbb5a7db60765f6ab188544fffbe (patch) | |
tree | 354e33f5d93b1de95517fa4291579ec8d68bd4b5 | |
parent | dec26f84dd9781e2553ce03d536a90ca931f109e (diff) |
enable build of glew + opencsg with clang from script
-rw-r--r-- | openscad.pro | 2 | ||||
-rwxr-xr-x | scripts/linux-build-dependencies.sh | 26 | ||||
-rw-r--r-- | scripts/setenv-linbuild-clang.sh | 6 |
3 files changed, 29 insertions, 5 deletions
diff --git a/openscad.pro b/openscad.pro index 25e7608..3dfd1c5 100644 --- a/openscad.pro +++ b/openscad.pro @@ -109,6 +109,8 @@ netbsd* { QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function QMAKE_CXXFLAGS_WARN_ON += -Wno-c++11-extensions + # might want to actually turn this on once in a while + QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare } CONFIG(skip-version-check) { diff --git a/scripts/linux-build-dependencies.sh b/scripts/linux-build-dependencies.sh index d7d8f49..e8a43b3 100755 --- a/scripts/linux-build-dependencies.sh +++ b/scripts/linux-build-dependencies.sh @@ -120,7 +120,8 @@ build_boost() ./bootstrap.sh --prefix=$DEPLOYDIR --with-libraries=thread,program_options,filesystem,system,regex if [ $CXX ]; then if [ $CXX = "clang" ]; then - ./b2 -j$NUMCPU toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install + ./b2 -j$NUMCPU toolset=clang install + # ./b2 -j$NUMCPU toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install fi else ./b2 -j$NUMCPU @@ -171,7 +172,14 @@ build_glew() sed -ibak s/"\-lXmu"/"\-L\/usr\/lib64\/libXmu.so.6"/ config/Makefile.linux fi - GLEW_DEST=$DEPLOYDIR make -j$NUMCPU + if [ $CC ]; then + if [ $CC = "clang" ]; then + echo "modifying glew makefile for clang" + sed -i s/\$\(CC\)/clang/ Makefile + fi + fi + + GLEW_DEST=$DEPLOYDIR make -j$NUMCPU GLEW_DEST=$DEPLOYDIR make install } @@ -195,10 +203,20 @@ build_opencsg() fi if [ "`command -v qmake-qt4`" ]; then - qmake-qt4 + OPCSG_QM = qmake-qt4 else - qmake + OPCSG_QM = qmake fi + + if [ $CXX ]; then + if [ $CXX = "clang++" ]; then + cd $BASEDIR/src/opencsg-$version/src + $(OPCSG_QM) + cd $BASEDIR/src/opencsg-$version + $(OPCSG_QM) + fi + fi + make cp -av lib/* $DEPLOYDIR/lib cp -av include/* $DEPLOYDIR/include diff --git a/scripts/setenv-linbuild-clang.sh b/scripts/setenv-linbuild-clang.sh index c4e02f8..9551235 100644 --- a/scripts/setenv-linbuild-clang.sh +++ b/scripts/setenv-linbuild-clang.sh @@ -1,8 +1,12 @@ -# build dependencies and openscad on linux with clang. +# build dependencies and/or openscad on linux with the clang compiler export CC=clang export CXX=clang++ export QMAKESPEC=unsupported/linux-clang +echo CC has been modified: $CC +echo CXX has been modified: $CXX +echo QMAKESPEC has been modified: $QMAKESPEC + . ./scripts/setenv-linbuild.sh |