- with 1906, OpenFOAM is purely C++ code and the last toolchain bits C
code have been avoided. Thus relax the wmake C rule for including
WM_COMPILE_OPTION. This makes it much easier to add different
compiler options with fewer files.
For example, for Broadwell-specific options:
cd wmake/rules/linux64Gcc
cp c++Opt c++OptBdw
edit this file and then use WM_COMPILE_OPTION=OptBdw
- ensure that WM_COMPILE_OPTION is always non-empty
- instead of
WM_COMPILER=GccKNL WM_COMPILE_OPTION=Opt
-> linux64GccKNLDPInt32Opt
now specify
WM_COMPILER=Gcc WM_COMPILE_OPTION=OptKNL
-> linux64GccDPInt32OptKNL
This makes it easier (and more obvious) for adding different tweaks
without needing to generate too many files.
Eg,
cd wmake/rules/linux64Gcc
cp cOpt cOptBdw
cp c++Opt c++OptBdw
edit these two files and then use WM_COMPILE_OPTION=OptBdw
CONFIG: provide some default c/c++ flags in General compiler rules
- can make is easier when deriving new compile options, and ensures
that '-02' is enabled as an initial default.
- downgrades some diagnostics about nonconformant code from errors to
warnings. Oddly enough, the errors actually arise from STL library
elements shipped with gcc itself. Affects kahip compilation with
gcc-6, gcc-7
- required if there is no system openmp and libomp or libgomp are
only found in the clang hierarchy
STYLE: add some notes in the openmp rules.
- the _OPENMP macro is now used in low-level testing files
The change from C++0x to C++11 allows all of C++11 functionality to be
used in OpenFOAM, in particular constructor delegation which avoids code
duplication or constructor helper functions. However, this also means a
change to the minimum gcc version supported which is now 4.7 rather than
4.5.
Note that gcc-4.7 does not support the entire C++11 standard but does
support all of the functionality currently needed for further OpenFOAM
development. The minimum gcc-version which supports the entire C++11
standard is 4.8 which is now the recommended minimum gcc version.
which may be optionally overridden by version-specific rules.
For example the default rules for gcc on GNU/Linux x86_64 are in the
wmake/rules/linux64Gcc directory. If there is a need to change any of
the rules for a specific version of gcc, e.g. gcc-4.8.4 the directory
wmake/rules/linux64Gcc48 may be created into which any of the language
files may be provided containing the rules to override the defaults.
- To-do:
wmake/rules/General/bison
wmake/rules/General/btyacc
wmake/rules/General/btyacc++
wmake/rules/General/byacc
wmake/rules/General/moc
wmake/rules/General/yacc
but these files have <TAB>
- main mplib rules located in GENERAL_RULES with specializations
(if any) under RULES. Modest change in a few options files, but
cleans up the rules directories.
previously in options:
include $(RULES)/mplib$(WM_MPLIB)
now in options:
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
For GNU make it would be permissible to write both in a single line.
- otherwise /lib/cpp may need a different library binding than
currently available and results in this type of error:
/usr/lib64/gcc/x86_64-suse-linux/4.4/cc1:
/data/app/OpenFOAM/ThirdParty-1.6.x/platforms/linux64/gcc-4.3.3/lib64/libstdc++.so.6:
version `GLIBCXX_3.4.11' not found (required by
/usr/lib64/libppl_c.so.2)
ENH: remove unused flex++ rule for SiCortex that was identical to the
general one anyhow.