CONFIG: enable xcrun with cc/c++ based on WM_COMPILE_CONTROL (#2965)

- adding in +xcrun into WM_COMPILE_CONTROL changes the compiler
  settings as follows (for MacOS)

      cc         := xcrun cc
      CC         := xcrun c++ -std=c++14
This commit is contained in:
Mark Olesen 2023-08-09 14:34:17 +02:00
parent e4f2efec18
commit 224c3199aa
4 changed files with 10 additions and 0 deletions

View File

@ -91,6 +91,7 @@ export WM_COMPILE_OPTION=Opt
# +openmp : with openmp
# ~openmp : without openmp
# +ccache : use ccache
# +xcrun : use xcrun and native compilers [MacOS]
# ccache=... : ccache command (unquoted, single/double or <> quoted)
# version=... : compiler suffix (eg, "11" for gcc-11)
#export WM_COMPILE_CONTROL="+gold"

View File

@ -91,6 +91,7 @@ setenv WM_COMPILE_OPTION Opt
# +openmp : with openmp
# ~openmp : without openmp
# +ccache : use ccache
# +xcrun : use xcrun and native compilers [MacOS]
# ccache=... : ccache command (unquoted, single/double or <> quoted)
# version=... : compiler suffix (eg, "11" for gcc-11)
#setenv WM_COMPILE_CONTROL "+gold"

View File

@ -1,6 +1,10 @@
#------------------------------------------------------------------------------
include $(GENERAL_RULES)/Clang/c
ifneq (,$(findstring +xcrun,$(WM_COMPILE_CONTROL)))
cc := xcrun cc
endif
cARCH := -m64 -ftrapping-math
ifneq (,$(strip $(WM_COMPILE_OPTION)))

View File

@ -1,6 +1,10 @@
#------------------------------------------------------------------------------
include $(GENERAL_RULES)/Clang/c++
ifneq (,$(findstring +xcrun,$(WM_COMPILE_CONTROL)))
CC := xcrun c++ -std=c++14
endif
c++ARCH := -m64 -pthread -ftrapping-math
ifneq (,$(strip $(WM_COMPILE_OPTION)))