diff --git a/makeCGAL b/makeCGAL index 91edb06..43db734 100755 --- a/makeCGAL +++ b/makeCGAL @@ -4,7 +4,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation -# \\/ M anipulation | +# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. @@ -87,10 +87,10 @@ USAGE } #------------------------------------------------------------------------------ -# Ensure CMake gets the correct C++ compiler +# Ensure CMake gets the correct C/C++ compiler +[ -n "$WM_CC" ] && export CC="$WM_CCX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" - # Parse options while [ "$#" -gt 0 ] do @@ -102,7 +102,8 @@ do # discard empty arguments ;; -gcc) - export CXX=g++ # use g++ + export CC=gcc # use gcc/g++ + export CXX=g++ ;; -sys*) gmpPACKAGE="gmp-system" diff --git a/makeCmake b/makeCmake index a32cd1e..4de02ca 100755 --- a/makeCmake +++ b/makeCmake @@ -58,11 +58,11 @@ options: USAGE exit 1 } +#------------------------------------------------------------------------------ -# ensure CMake gets the correct C++ compiler +# ensure CMake gets the correct /CC++ compiler +[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" -[ -n "$WM_CC" ] && export CC="$WM_CC" - # parse options while [ "$#" -gt 0 ] @@ -72,8 +72,8 @@ do usage ;; -gcc) - export CC=gcc # use gcc - export CXX=g++ # use g++ + export CC=gcc # use gcc/g++ + export CXX=g++ ;; cmake-[1-9]*) cmakePACKAGE="${1%%/}" diff --git a/makeFFTW b/makeFFTW index f70539b..020cde2 100755 --- a/makeFFTW +++ b/makeFFTW @@ -68,6 +68,10 @@ USAGE } #------------------------------------------------------------------------------ +# ensure configure gets the correct C/C++ compiler +[ -n "$WM_CC" ] && export CC="$WM_CC" +[ -n "$WM_CXX" ] && export CXX="$WM_CXX" + # Parse options while [ "$#" -gt 0 ] do @@ -79,8 +83,8 @@ do # discard empty arguments ;; -gcc) - export CC=gcc # use gcc - export CXX=g++ # use g++ + export CC=gcc # use gcc/g++ + export CXX=g++ ;; fftw-[0-9]* | fftw_[0-9]* | fftw-system ) fftwPACKAGE="${1%%/}" diff --git a/makeLLVM b/makeLLVM index f61f420..225f671 100755 --- a/makeLLVM +++ b/makeLLVM @@ -26,15 +26,29 @@ # makeLLVM # # Description -# Build script for llvm/clang etc. +# Build script for llvm, clang etc. # -# - Checkout LLVM: -# svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn +# Note +# - Ensure that you always use matching versions between llvm and clang. +# - The LLVM components reside in the LLVM tools/ subdirectory # -# - Checkout Clang: -# cd llvm-svn/tools -# svn co http://llvm.org/svn/llvm-project/cfe/trunk clang -# cd - +# Example, building from svn repository: +# 1) Checkout LLVM: +# svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn +# +# 2) Checkout Clang, in the correct location +# cd llvm-svn/tools +# svn co http://llvm.org/svn/llvm-project/cfe/trunk clang +# cd - +# +# Example, building from tar files (version 3.8.0) +# - Unpack LLVM: +# tar -Jvf llvm-3.8.0.src.tar.xz +# mv llvm-3.8.0.src llvm-3.8.0 +# +# - Unpack Clang (also know as cfe): +# tar -Jvf cfe-3.8.0.src.tar.xz +# mv cfe-3.8.0.src llvm-3.8.0/tools/clang # #------------------------------------------------------------------------------ # get default llvm/clang version diff --git a/makeParaView b/makeParaView index 326baf2..357c85f 100755 --- a/makeParaView +++ b/makeParaView @@ -141,8 +141,8 @@ USAGE #------------------------------------------------------------------------------ # ensure CMake gets the correct C/C++ compiler +[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" -[ -n "$WM_CC" ] && export CC="$WM_CC" # # add options based on script name: @@ -173,7 +173,8 @@ do addCMakeVariable "$1" ;; -gcc) - export CXX=g++ # use g++ + export CC=gcc # use gcc/g++ + export CXX=g++ ;; -patch) # stage 0: patch sources runPATCH=true diff --git a/makeParaView3 b/makeParaView3 index 294de8c..b015886 100755 --- a/makeParaView3 +++ b/makeParaView3 @@ -132,8 +132,8 @@ USAGE #------------------------------------------------------------------------------ # ensure CMake gets the correct C/C++ compiler +[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" -[ -n "$WM_CC" ] && export CC="$WM_CC" # # add options based on script name: @@ -163,7 +163,8 @@ do addCMakeVariable "$1" ;; -gcc) - export CXX=g++ # use g++ + export CC=gcc # use gcc/g++ + export CXX=g++ ;; -config) # stage 1: config only runCONFIG=true diff --git a/makeQt b/makeQt index 97c26c7..047d814 100755 --- a/makeQt +++ b/makeQt @@ -58,12 +58,12 @@ options: USAGE exit 1 } +#------------------------------------------------------------------------------ - -# ensure configure gets the correct C++ compiler +# ensure configure gets the correct C/C++ compiler +[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" - # parse options while [ "$#" -gt 0 ] do @@ -72,7 +72,8 @@ do usage ;; -gcc) - export CXX=g++ # use g++ + export CC=gcc # use gcc/g++ + export CXX=g++ ;; [1-9]* | qt-[1-9]*) qtVERSION="${1%%/}";