Modify Mac-stuff to use CLang from MacPort (still got issues: seems that CLang can't handle the output from flex)
--HG-- branch : bgschaid/minorAdditionsBranch rename : wmake/rules/darwinIntel64Gcc/ARCHITECTURE_TESTED => wmake/rules/darwinIntel64Clang/ARCHITECTURE_TESTED rename : wmake/rules/darwinIntel64Gcc/X => wmake/rules/darwinIntel64Clang/X rename : wmake/rules/darwinIntel64Gcc/c => wmake/rules/darwinIntel64Clang/c rename : wmake/rules/darwinIntel64Gcc/c++ => wmake/rules/darwinIntel64Clang/c++ rename : wmake/rules/darwinIntel64Gcc/c++Debug => wmake/rules/darwinIntel64Clang/c++Debug rename : wmake/rules/darwinIntel64Gcc/c++Opt => wmake/rules/darwinIntel64Clang/c++Opt rename : wmake/rules/darwinIntel64Gcc/c++Prof => wmake/rules/darwinIntel64Clang/c++Prof rename : wmake/rules/darwinIntel64Gcc/cDebug => wmake/rules/darwinIntel64Clang/cDebug rename : wmake/rules/darwinIntel64Gcc/cOpt => wmake/rules/darwinIntel64Clang/cOpt rename : wmake/rules/darwinIntel64Gcc/cProf => wmake/rules/darwinIntel64Clang/cProf rename : wmake/rules/darwinIntel64Gcc/general => wmake/rules/darwinIntel64Clang/general rename : wmake/rules/darwinIntel64Gcc/mplib => wmake/rules/darwinIntel64Clang/mplib rename : wmake/rules/darwinIntel64Gcc/mplibMACPORTOPENMPI => wmake/rules/darwinIntel64Clang/mplibMACPORTOPENMPI rename : wmake/rules/darwinIntel64Gcc/mplibOPENMPI => wmake/rules/darwinIntel64Clang/mplibOPENMPI rename : wmake/rules/darwinIntel64Gcc/mplibSYSTEMOPENMPI => wmake/rules/darwinIntel64Clang/mplibSYSTEMOPENMPI
This commit is contained in:
parent
002822076a
commit
2c4e17cdbf
16 changed files with 117 additions and 5 deletions
38
etc/bashrc
38
etc/bashrc
|
@ -310,38 +310,66 @@ Darwin)
|
|||
case $WM_COMPILER in
|
||||
Gcc42)
|
||||
export WM_MACPORT_VERSION=4.2
|
||||
export WM_BASE_COMPILER=Gcc
|
||||
;;
|
||||
Gcc43)
|
||||
export WM_MACPORT_VERSION=4.3
|
||||
export WM_BASE_COMPILER=Gcc
|
||||
;;
|
||||
Gcc44)
|
||||
export WM_MACPORT_VERSION=4.4
|
||||
export WM_BASE_COMPILER=Gcc
|
||||
;;
|
||||
Gcc45)
|
||||
export WM_MACPORT_VERSION=4.5
|
||||
export WM_BASE_COMPILER=Gcc
|
||||
;;
|
||||
Gcc46)
|
||||
export WM_MACPORT_VERSION=4.6
|
||||
export WM_BASE_COMPILER=Gcc
|
||||
;;
|
||||
Gcc47)
|
||||
export WM_MACPORT_VERSION=4.7
|
||||
export WM_BASE_COMPILER=Gcc
|
||||
;;
|
||||
Gcc48)
|
||||
export WM_MACPORT_VERSION=4.8
|
||||
export WM_BASE_COMPILER=Gcc
|
||||
;;
|
||||
Clang32)
|
||||
export WM_BASE_COMPILER=Clang
|
||||
export WM_MACPORT_VERSION=3.2
|
||||
;;
|
||||
Clang33)
|
||||
export WM_BASE_COMPILER=Clang
|
||||
export WM_MACPORT_VERSION=3.3
|
||||
;;
|
||||
Clang34)
|
||||
export WM_BASE_COMPILER=Clang
|
||||
export WM_MACPORT_VERSION=3.4
|
||||
;;
|
||||
Gcc)
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported MacPorts-Compiler $WM_COMPILER"
|
||||
;;
|
||||
esac
|
||||
if [ "$WM_COMPILER" != "Gcc" ]
|
||||
if [ "$WM_MACPORT_VERSION" != "" ]
|
||||
then
|
||||
export WM_CC="gcc-mp-$WM_MACPORT_VERSION"
|
||||
export WM_CXX="g++-mp-$WM_MACPORT_VERSION"
|
||||
export WM_FC="gfortran-mp-$WM_MACPORT_VERSION"
|
||||
if [ "$WM_BASE_COMPILER" == "Gcc" ]
|
||||
then
|
||||
export WM_CC="gcc-mp-$WM_MACPORT_VERSION"
|
||||
export WM_CXX="g++-mp-$WM_MACPORT_VERSION"
|
||||
export WM_FC="gfortran-mp-$WM_MACPORT_VERSION"
|
||||
else
|
||||
export WM_CC="clang-mp-$WM_MACPORT_VERSION"
|
||||
export WM_CXX="clang++-mp-$WM_MACPORT_VERSION"
|
||||
|
||||
ruleDirBase=$WM_PROJECT_DIR/wmake/rules/${WM_ARCH}Gcc
|
||||
# hardcoded. Needed for ThirdParty
|
||||
export WM_FC="gfortran-mp-4.5"
|
||||
fi
|
||||
|
||||
ruleDirBase=$WM_PROJECT_DIR/wmake/rules/$WM_ARCH$WM_BASE_COMPILER
|
||||
ruleDir=$WM_PROJECT_DIR/wmake/rules/$WM_ARCH$WM_COMPILER
|
||||
if [ ! -e $ruleDir ]
|
||||
then
|
||||
|
|
1
wmake/rules/darwinIntel64Clang/ARCHITECTURE_TESTED
Normal file
1
wmake/rules/darwinIntel64Clang/ARCHITECTURE_TESTED
Normal file
|
@ -0,0 +1 @@
|
|||
by bgschaid. 2010-10-05
|
3
wmake/rules/darwinIntel64Clang/X
Normal file
3
wmake/rules/darwinIntel64Clang/X
Normal file
|
@ -0,0 +1,3 @@
|
|||
XFLAGS =
|
||||
XINC = $(XFLAGS) -I/usr/X11R6/include
|
||||
XLIBS = -L/usr/X11R6/lib -lXext -lX11
|
17
wmake/rules/darwinIntel64Clang/c
Normal file
17
wmake/rules/darwinIntel64Clang/c
Normal file
|
@ -0,0 +1,17 @@
|
|||
.SUFFIXES: .c .h
|
||||
|
||||
cWARN = -Wall
|
||||
|
||||
cc = $(WM_CC) -m64 -ftrapping-math
|
||||
# -fsignaling-nans
|
||||
|
||||
include $(RULES)/c$(WM_COMPILE_OPTION)
|
||||
|
||||
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC -Ddarwin
|
||||
|
||||
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
|
||||
|
||||
LINK_LIBS = $(cDBUG)
|
||||
|
||||
LINKLIBSO = $(cc) -dynamiclib -flat_namespace -undefined suppress
|
||||
LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs
|
23
wmake/rules/darwinIntel64Clang/c++
Normal file
23
wmake/rules/darwinIntel64Clang/c++
Normal file
|
@ -0,0 +1,23 @@
|
|||
.SUFFIXES: .C .cxx .cc .cpp
|
||||
|
||||
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison
|
||||
|
||||
CC = $(WM_CXX) -m64 -ftrapping-math
|
||||
# -fsignaling-nans
|
||||
|
||||
include $(RULES)/c++$(WM_COMPILE_OPTION)
|
||||
|
||||
ptFLAGS = -DNoRepository -ftemplate-depth-200
|
||||
|
||||
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -Ddarwin
|
||||
|
||||
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
|
||||
cxxtoo = $(Ctoo)
|
||||
cctoo = $(Ctoo)
|
||||
cpptoo = $(Ctoo)
|
||||
|
||||
LINK_LIBS = $(c++DBUG) -lpthread
|
||||
|
||||
LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup
|
||||
# LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lOpenFOAM -L$(FOAM_MPI_LIBBIN) -lPstream
|
||||
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_MPI_LIBBIN) -lPstream
|
4
wmake/rules/darwinIntel64Clang/c++Debug
Normal file
4
wmake/rules/darwinIntel64Clang/c++Debug
Normal file
|
@ -0,0 +1,4 @@
|
|||
# c++DBUG = -ggdb2 -DFULLDEBUG
|
||||
c++DBUG = -g -DFULLDEBUG
|
||||
# c++OPT = -O0 -fdefault-inline
|
||||
c++OPT = -O0
|
5
wmake/rules/darwinIntel64Clang/c++Opt
Normal file
5
wmake/rules/darwinIntel64Clang/c++Opt
Normal file
|
@ -0,0 +1,5 @@
|
|||
c++DBUG =
|
||||
# c++OPT = -O4
|
||||
c++OPT = -O3
|
||||
#c++OPT = -march=nocona -O3
|
||||
# -ftree-vectorize -ftree-vectorizer-verbose=3
|
2
wmake/rules/darwinIntel64Clang/c++Prof
Normal file
2
wmake/rules/darwinIntel64Clang/c++Prof
Normal file
|
@ -0,0 +1,2 @@
|
|||
c++DBUG = -pg
|
||||
c++OPT = -O2
|
4
wmake/rules/darwinIntel64Clang/cDebug
Normal file
4
wmake/rules/darwinIntel64Clang/cDebug
Normal file
|
@ -0,0 +1,4 @@
|
|||
cDBUG = -g -DFULLDEBUG
|
||||
cOPT = -O0
|
||||
# cDBUG = -ggdb -DFULLDEBUG
|
||||
# cOPT = -O1 -fdefault-inline -finline-functions
|
2
wmake/rules/darwinIntel64Clang/cOpt
Normal file
2
wmake/rules/darwinIntel64Clang/cOpt
Normal file
|
@ -0,0 +1,2 @@
|
|||
cDBUG =
|
||||
cOPT = -O3
|
2
wmake/rules/darwinIntel64Clang/cProf
Normal file
2
wmake/rules/darwinIntel64Clang/cProf
Normal file
|
@ -0,0 +1,2 @@
|
|||
cDBUG = -pg
|
||||
cOPT = -O2
|
11
wmake/rules/darwinIntel64Clang/general
Normal file
11
wmake/rules/darwinIntel64Clang/general
Normal file
|
@ -0,0 +1,11 @@
|
|||
CPP = cpp --traditional-cpp $(GFLAGS)
|
||||
LD = ld
|
||||
# LD = /opt/local/libexec/llvm-3.3/bin/ld
|
||||
|
||||
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
|
||||
|
||||
include $(GENERAL_RULES)/standard
|
||||
|
||||
include $(RULES)/X
|
||||
include $(RULES)/c
|
||||
include $(RULES)/c++
|
3
wmake/rules/darwinIntel64Clang/mplib
Normal file
3
wmake/rules/darwinIntel64Clang/mplib
Normal file
|
@ -0,0 +1,3 @@
|
|||
PFLAGS =
|
||||
PINC =
|
||||
PLIBS =
|
3
wmake/rules/darwinIntel64Clang/mplibMACPORTOPENMPI
Normal file
3
wmake/rules/darwinIntel64Clang/mplibMACPORTOPENMPI
Normal file
|
@ -0,0 +1,3 @@
|
|||
PFLAGS = -DOMPI_SKIP_MPICXX
|
||||
PINC = -I$(MPI_ARCH_PATH)/include/openmpi
|
||||
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi
|
3
wmake/rules/darwinIntel64Clang/mplibOPENMPI
Normal file
3
wmake/rules/darwinIntel64Clang/mplibOPENMPI
Normal file
|
@ -0,0 +1,3 @@
|
|||
PFLAGS = -DOMPI_SKIP_MPICXX
|
||||
PINC = -I$(MPI_ARCH_PATH)/include
|
||||
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi
|
1
wmake/rules/darwinIntel64Clang/mplibSYSTEMOPENMPI
Normal file
1
wmake/rules/darwinIntel64Clang/mplibSYSTEMOPENMPI
Normal file
|
@ -0,0 +1 @@
|
|||
PFLAGS = -DOMPI_SKIP_MPICXX
|
Reference in a new issue