mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: extend use of WM_COMPILER_CONTROL to manage compiler versions
- for compilers such as gcc and clang, may have several different
variants installed on the computer. Use WM_COMPILER_CONTROL to
specify the preferred variant.
Eg,
WM_COMPILER=Gcc
WM_COMPILER_CONTROL="version=8"
will compile with "gcc-8" and "g++-8"
Good practice would be to tag output directory names with the
version too. Eg
WM_COMPILER=Clang110
WM_COMPILER_CONTROL="version=11.0"
STYLE: modify message for change of gcc -> clang (darwin)
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# Fujitsu compiler - a clang variant
|
||||
#------------------------------------------------------------------------------
|
||||
include $(GENERAL_RULES)/Clang/c
|
||||
|
||||
cc = fcc
|
||||
cc = fcc$(COMPILER_VERSION)
|
||||
|
||||
cARCH =
|
||||
|
||||
@ -13,3 +15,5 @@ cFLAGS = $(cARCH) $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -f
|
||||
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
|
||||
|
||||
include $(GENERAL_RULES)/Clang/link-c
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
include $(GENERAL_RULES)/Clang/c++
|
||||
|
||||
CC = FCC -std=c++14
|
||||
CC = FCC$(COMPILER_VERSION) -std=c++14
|
||||
|
||||
c++ARCH = -pthread
|
||||
|
||||
@ -12,9 +12,9 @@ include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
|
||||
c++FLAGS = $(c++ARCH) $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
|
||||
|
||||
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
|
||||
cxxtoo = $(Ctoo)
|
||||
cctoo = $(Ctoo)
|
||||
cpptoo = $(Ctoo)
|
||||
cxxtoo = $(Ctoo)
|
||||
|
||||
include $(GENERAL_RULES)/Clang/link-c++
|
||||
|
||||
|
||||
Reference in New Issue
Block a user