openfoam/wmake/rules/darwin64Gcc/c++
Mark Olesen bdac68ebc7 CONFIG: add Gcc rules for MacOS (darwin)
- /usr/bin/{gcc,g++} normally just symlinks to clang/clang++
  and may have unknown default flags.
  For a gcc toolchain, it would be better to use a homebrew
  installation.

  For these cases, the compiler will need to be specified with
  version=.. in WM_COMPILE_CONTROL.

  For example, with "version=14", to select gcc-14, g++-14 from the
  homebrew installation.

- needs a slight hack for locating the FlexLexer.h header.
  Added into src/OSspecific/POSIX similar to how it is handled
  in src/OSspecific/MSwindows

CONFIG: add simple config/detection support for libumpire (Linux)
2025-03-31 16:00:07 +02:00

28 lines
800 B
Plaintext

#------------------------------------------------------------------------------
include $(GENERAL_RULES)/Gcc/c++
## ifneq (,$(findstring +xcrun,$(WM_COMPILE_CONTROL)))
## CC := xcrun c++ -std=c++17
## endif
c++ARCH := -m64 -pthread -ftrapping-math
ifneq (,$(strip $(WM_COMPILE_OPTION)))
sinclude $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
endif
c++FLAGS = \
$(c++ARCH) $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) \
$(FOAM_EXTRA_CXXFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
cxxtoo = $(Ctoo)
# MacOS linking (with or without rpath components)
include $(ARCHITECTURE_RULES)/link-c++
#------------------------------------------------------------------------------