more stringency when exporting WM_ compiler settings
- for building 3rd-party components, we export
WM_CC
andWM_CXX
compiler settings asCC
andCXX
so the configure/CMake know about them. However, when trying to build something like Clang we can experience issues. The OpenFOAM env sets ThirdParty Clang (setting WM_CC in the process), but this is the component we are trying to build, somakeLLVM
will have problems configuring for this non-existent compiler.
-
can avoid this by using
makeLLVM -gcc
to force use of gcc for making Clang. This seems to be an ok alternative, since this isn't part of the normal OpenFOAM process (we are building the toolchain for building OpenFOAM). -
check within the ThirdParty scripts that the exported
CC
variable corresponds to a command. Eg,if test -n "$WM_CC" && command -v "$WM_CC" >/dev/null then export CC="$WM_CC" [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" fi
Probably the second one is OK to include too, but targeted for the next release.