STYLE: update some instructions in makeLLVM

This commit is contained in:
mark
2016-06-30 15:55:20 +02:00
parent 68b7b8c135
commit 7ec9f0713f
7 changed files with 48 additions and 26 deletions

View File

@ -4,7 +4,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # 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" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# Parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
@ -102,7 +102,8 @@ do
# discard empty arguments # discard empty arguments
;; ;;
-gcc) -gcc)
export CXX=g++ # use g++ export CC=gcc # use gcc/g++
export CXX=g++
;; ;;
-sys*) -sys*)
gmpPACKAGE="gmp-system" gmpPACKAGE="gmp-system"

View File

@ -58,11 +58,11 @@ options:
USAGE USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------
# ensure CMake gets the correct C++ compiler # ensure CMake gets the correct /CC++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# parse options # parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
@ -72,8 +72,8 @@ do
usage usage
;; ;;
-gcc) -gcc)
export CC=gcc # use gcc export CC=gcc # use gcc/g++
export CXX=g++ # use g++ export CXX=g++
;; ;;
cmake-[1-9]*) cmake-[1-9]*)
cmakePACKAGE="${1%%/}" cmakePACKAGE="${1%%/}"

View File

@ -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 # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
@ -79,8 +83,8 @@ do
# discard empty arguments # discard empty arguments
;; ;;
-gcc) -gcc)
export CC=gcc # use gcc export CC=gcc # use gcc/g++
export CXX=g++ # use g++ export CXX=g++
;; ;;
fftw-[0-9]* | fftw_[0-9]* | fftw-system ) fftw-[0-9]* | fftw_[0-9]* | fftw-system )
fftwPACKAGE="${1%%/}" fftwPACKAGE="${1%%/}"

View File

@ -26,16 +26,30 @@
# makeLLVM # makeLLVM
# #
# Description # Description
# Build script for llvm/clang etc. # Build script for llvm, clang etc.
# #
# - Checkout LLVM: # Note
# - Ensure that you always use matching versions between llvm and clang.
# - The LLVM components reside in the LLVM tools/ subdirectory
#
# Example, building from svn repository:
# 1) Checkout LLVM:
# svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn # svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn
# #
# - Checkout Clang: # 2) Checkout Clang, in the correct location
# cd llvm-svn/tools # cd llvm-svn/tools
# svn co http://llvm.org/svn/llvm-project/cfe/trunk clang # svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
# cd - # 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 # get default llvm/clang version
WM_COMPILER_TYPE="ThirdParty" # ensure we get the correct compiler settings WM_COMPILER_TYPE="ThirdParty" # ensure we get the correct compiler settings

View File

@ -141,8 +141,8 @@ USAGE
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# ensure CMake gets the correct C/C++ compiler # ensure CMake gets the correct C/C++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# #
# add options based on script name: # add options based on script name:
@ -173,7 +173,8 @@ do
addCMakeVariable "$1" addCMakeVariable "$1"
;; ;;
-gcc) -gcc)
export CXX=g++ # use g++ export CC=gcc # use gcc/g++
export CXX=g++
;; ;;
-patch) # stage 0: patch sources -patch) # stage 0: patch sources
runPATCH=true runPATCH=true

View File

@ -132,8 +132,8 @@ USAGE
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# ensure CMake gets the correct C/C++ compiler # ensure CMake gets the correct C/C++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# #
# add options based on script name: # add options based on script name:
@ -163,7 +163,8 @@ do
addCMakeVariable "$1" addCMakeVariable "$1"
;; ;;
-gcc) -gcc)
export CXX=g++ # use g++ export CC=gcc # use gcc/g++
export CXX=g++
;; ;;
-config) # stage 1: config only -config) # stage 1: config only
runCONFIG=true runCONFIG=true

9
makeQt
View File

@ -58,12 +58,12 @@ options:
USAGE USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------
# ensure configure gets the correct C/C++ compiler
# ensure configure gets the correct C++ compiler [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# parse options # parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
@ -72,7 +72,8 @@ do
usage usage
;; ;;
-gcc) -gcc)
export CXX=g++ # use g++ export CC=gcc # use gcc/g++
export CXX=g++
;; ;;
[1-9]* | qt-[1-9]*) [1-9]* | qt-[1-9]*)
qtVERSION="${1%%/}"; qtVERSION="${1%%/}";