CONFIG: improve support for compiler/link options (#1830)

- introduce WM_COMPILE_CONTROL variable to convey control information
  into the build rules.

  The convention (as per spack):
      - '+' to select a feature
      - '~' to deselect a feature

  Eg, to select the gold linker, and disable openmp
  (spaces are not required):

      WM_COMPILE_CONTROL="+gold ~openmp"

CONFIG: accept FOAM_EXTRA_LDFLAGS for AMD, gold, Mingw linkers

CONFIG: generalize PROJECT_LIBS (-ldl used almost universally)
This commit is contained in:
Mark Olesen
2020-09-03 13:32:17 +02:00
parent fbfcdfc723
commit 9423d2bd83
71 changed files with 280 additions and 175 deletions

View File

@ -47,11 +47,11 @@ unsetenv WM_ARCH
unsetenv WM_ARCH_OPTION
unsetenv WM_COMPILER
unsetenv WM_COMPILER_ARCH
unsetenv WM_COMPILER_TYPE
unsetenv WM_COMPILER_LIB_ARCH
unsetenv WM_COMPILER_TYPE
unsetenv WM_COMPILE_CONTROL
unsetenv WM_COMPILE_OPTION
unsetenv WM_DIR
unsetenv WM_HOSTS
unsetenv WM_LABEL_OPTION
unsetenv WM_LABEL_SIZE
unsetenv WM_MPLIB
@ -60,21 +60,21 @@ unsetenv WM_OPTIONS
unsetenv WM_OSTYPE
unsetenv WM_PRECISION_OPTION
unsetenv WM_PROJECT
unsetenv WM_PROJECT_API
unsetenv WM_PROJECT_DIR
unsetenv WM_PROJECT_INST_DIR
unsetenv WM_PROJECT_SITE
unsetenv WM_PROJECT_USER_DIR
unsetenv WM_PROJECT_VERSION
unsetenv WM_SCHEDULER
unsetenv WM_THIRD_PARTY_DIR
# Older variables
# Older, unused variables
unsetenv WM_HOSTS
unsetenv WM_PROJECT_API
unsetenv WM_PROJECT_INST_DIR
# Before 1906
unsetenv WM_CC WM_CXX WM_CFLAGS WM_CXXFLAGS WM_LDFLAGS
#------------------------------------------------------------------------------
# Unset FOAM_* environment variables
@ -106,7 +106,7 @@ unsetenv FOAM_USER_APPBIN
unsetenv FOAM_USER_LIBBIN
unsetenv FOAM_UTILITIES
# Old variables
# Older, unused variables
# Before 1812
unsetenv FOAM_INST_DIR