mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -1,10 +1,14 @@
|
||||
CPP = /lib/cpp -traditional-cpp $(GFLAGS)
|
||||
LD = ld -melf_i386
|
||||
|
||||
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
|
||||
|
||||
include $(GENERAL_RULES)/standard
|
||||
include $(GENERAL_RULES)/Icc/openmp
|
||||
|
||||
ifneq (,$(findstring ~openmp,$(WM_COMPILE_CONTROL)))
|
||||
include $(GENERAL_RULES)/no-openmp
|
||||
endif
|
||||
|
||||
include $(DEFAULT_RULES)/c
|
||||
include $(DEFAULT_RULES)/c++
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user