Commit Graph

26 Commits

Author SHA1 Message Date
Mark Olesen
9f7cfa9419 ENH: support libz disabling via WM_COMPILE_CONTROL (as ~libz)
- eg, for partially incomplete systems (without libz devel header)

ENH: clearer binding of dummy Pstream in OpenFOAM/Make/options

- link of dummy stub Pstream now contingent on linking libOpenFOAM as
  well. This makes the purpose slightly clearer

ENH: cleaner option naming/handling in wmake script

- allow special purpose -no-openfoam option.
  Eg, compiling test programs without OpenFOAM and Pstream libraries
  but using the rest of the wmake system.

ENH: add +openmp support into WM_COMPILE_CONTROL (#2633)

- this adds compile/link flags for openmp.
  For single-use, can also use 'wmake -openmp'.

  If both +openmp and ~openmp are specified in WM_COMPILE_CONTROL
  the ~openmp will have priority.

  This is actually done indirectly since ~openmp will set empty
  COMP_OPENMP, LINK_OPENMP internal variables, which the +openmp then
  adds to the c++FLAGS and linkexe targets (ie, won't actually add
  anything).

ENH: add +ccache or ccache=... support into WM_COMPILE_CONTROL (#2633)

- with the first version (+ccache), simply use ccache from the path
  without any extra options.

- with the second version (ccache=...), can be more specific about
  what is called.

  Using "+ccache" is identical to "ccache=ccache", but the later could
  be used in other ways. For example,

     ccache=/strange/install/path/ccache
     ccache=</path/my-tooling --option>

  Have the choice of unquoted, single or double quoted or '< >' quoted

STYLE: relocate FOAM_EXTRA_LDFLAGS in general makefile

- removes clutter for different linkers (eg, gold, mold, ldd)
  making it easier to extend for other linkers.

STYLE: protect makefile checks with 'strip' function
2022-11-15 14:00:18 +01:00
Mark Olesen
793f4e3a37 CONFIG: add support for WM_COMPILE_OPTION='Dbg'
- uses '-g -DFULLDEBUG' (like Debug), but with -O3 (like Opt).

  This adds in debug symbols and FULLDEBUG code segments (good for
  code development) but retains -O3 optimizations and code paths and
  avoids the much slower -O0 associated with 'Debug'.

- add in central wmake/General/common/{c,c++}XXX tuning,
  which helps reduce the number of nearly identical files

ENH: add support for wmake -debug-Og
2022-09-09 11:55:33 +02:00
Mark Olesen
2c77514417 CONFIG: support wmake -debug-O0, -debug-O1 etc.
- rearranged order of flags so that FOAM_EXTRA_CXXFLAGS is added
  after the WARN/OPT/DBUG flags

CONFIG: drop wmake rules for PGI compiler (defunct)
2022-06-02 22:37:00 +02:00
Mark Olesen
2698cab01c 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)
2021-11-02 17:30:06 +01:00
Mark Olesen
78dc8c6ba6 CONFIG: refactor common link rules, support FOAM_EXTRA_CFLAGS (#1256)
- additional cgal-headers-only rules (future use)

COMP: add -lgmp for CGAL with mpfr linkage
2020-05-06 13:10:30 +02:00
Mark Olesen
739bc3c4af COMP: add -pthread compile/link dependency for std::thread (#614) 2020-02-07 11:06:06 +01:00
Mark Olesen
787325a916 COMP: manage cpu architecture with cARCH, c++ARCH internal make variables
- allows better separation from compiler settings

- use -fPIC instead of legacy -KPIC for intel compiler
2019-04-12 12:59:11 +02:00
Mark Olesen
2db4b0867e CONFIG: consolidate C++ flags per compiler type
- easier to ensure that flags are consistent
2018-03-21 11:50:57 +01:00
Mark Olesen
664685f7fe CONFIG: bump API version number to 1803 to account for removal of Xfer
- primary points for an external user are the polyMesh constructor

- add config info for gcc-7.3.0

COMP: intel-2017. Ignore unknown pragmas. Disambiguate method resolution.
2018-03-05 20:18:26 +01:00
Mark Olesen
a531168ae4 COMP: reinstate rules for various C++ suffixes (issue #607) 2017-09-29 18:07:42 +02:00
Henry Weller
0fdcb12759 Updated to avoid warnings from gcc-7.1.1 2017-07-31 13:46:42 +01:00
Henry Weller
6c3c2f1399 icpc rules: removed another unimportant warning 2016-10-04 08:10:28 +01:00
Henry Weller
82aa78a4d4 wmake/rules/linux.*Icc: Removed a new unhelpful warning message 2016-08-11 16:25:53 +01:00
Henry Weller
7996a9138f C++11: Update compilation rules to specify C++11 support and conformance
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.
2016-08-05 16:28:19 +01:00
Henry Weller
3a3966d400 wmake/rules/linux.*Icc: Updated for icpc (ICC) 16.0.3 20160415 2016-07-28 13:47:44 +01:00
Henry Weller
c3a03105c4 wmake: Add support for compiler type default rules
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.
2016-01-24 14:10:07 +00:00
Henry Weller
91e04d69c1 Resolve various unimportant warning messages from Gcc, Clang and Icpc 2015-07-19 11:31:49 +01:00
Henry Weller
6d4422f4b0 wmake rules for icpc: suppress warnings from CGAL 2015-07-17 18:27:30 +01:00
Henry Weller
6b706cfa78 Upgrade Intel C++ compiler to icpc (ICC) 15.0.3 20150407
This resolves a whole range of issues and work-arounds with earlier
releases.  This version of icpc is more or less compatible with the
latest gcc and clang compilers and only required one hack to avoid
warnings from PackedBoolList.H.
2015-07-17 16:50:40 +01:00
Henry
656dc54f71 Icc support: added floating-point exception trapping and accurate maths
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1432
2015-01-28 09:18:47 +00:00
Henry
844b283030 New version of wmake supporting out-of-tree object and dependency files 2014-12-14 21:42:18 +00:00
Henry
b9311f0507 Icc: filter yet more spurious warning messages 2014-01-14 12:42:35 +00:00
mattijs
8f28740568 COMP: Intel: add add-needed link flags for modern linux platforms 2012-07-09 09:06:41 +01:00
Henry
c8314956da wmake: Updated rules for Icc 2010-12-06 12:21:16 +00:00
henry
f686c8d531 Remove spurious warnings from the Icc compiler concerning casting NULL. 2009-12-02 16:39:12 +00:00
henry
c0a6360f0b Corrected the setting of WM_COMPILER and renamed I32 and I64 to Icc. 2008-05-29 16:02:39 +01:00