ENH: improve handling of ThirdParty packages

- generalize some of the library extensions (.so vs .dylib).
  Provide as wmake 'sysFunctions'

- added note about unsupported/incomplete system support

- centralize detection of ThirdParty packages into wmake/ subdirectory
  by providing a series of scripts in the spirit of GNU autoconfig.
  For example,

      have_boost, have_readline, have_scotch, ...

  Each of the `have_<package>` scripts will generally provide the
  following type of functions:

      have_<package>          # detection
      no_<package>            # reset
      echo_<package>          # echoing

  and the following type of variables:

      HAVE_<package>          # unset or 'true'
      <package>_ARCH_PATH     # root for <package>
      <package>_INC_DIR       # include directory for <package>
      <package>_LIB_DIR       # library directory for <package>

  This simplifies the calling scripts:

      if have_metis
      then
          wmake metisDecomp
      fi

  As well as reducing clutter in the corresponding Make/options:

      EXE_INC = \
          -I$(METIS_INC_DIR) \
          -I../decompositionMethods/lnInclude

      LIB_LIBS = \
          -L$(METIS_LIB_DIR) -lmetis

  Any additional modifications (platform-specific or for an external build
  system) can now be made centrally.
This commit is contained in:
Mark Olesen
2018-04-24 14:51:19 +02:00
parent 672f0574e2
commit b4d38ab468
82 changed files with 1796 additions and 608 deletions

View File

@ -304,7 +304,7 @@ endsw
# Add (non-dummy) MPI implementation
# - dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
# - dummy MPI already in lib-path and has no external libraries
if ( "$FOAM_MPI" != dummy ) then
if ( $?FOAM_EXT_LIBBIN ) then # External libraries (allowed to be unset)
_foamAddLib ${FOAM_EXT_LIBBIN}/${FOAM_MPI}

View File

@ -106,6 +106,12 @@ case Linux:
case Darwin: # Presumably x86_64
if (! $?WM_ARCH_OPTION ) setenv WM_ARCH_OPTION 64 # Default to 64-bit
setenv WM_ARCH darwin64
/bin/cat << INCOMPLETE
===============================================================================
Operating system '$WM_ARCH' has incomplete support in this OpenFOAM release.
For further assistance, please contact www.OpenFOAM.com
===============================================================================
INCOMPLETE
breaksw
case SunOS:
@ -118,12 +124,12 @@ case SunOS:
breaksw
default:
/bin/cat << UNSUPPORTED_OS
/bin/cat << UNSUPPORTED
===============================================================================
Your '$WM_ARCH' operating system is unsupported by this OpenFOAM release.
Operating system '$WM_ARCH' is unsupported by this OpenFOAM release.
For further assistance, please contact www.OpenFOAM.com
===============================================================================
UNSUPPORTED_OS
UNSUPPORTED
breaksw
endsw