more stringency when exporting WM_ compiler settings
- for building 3rd-party components, we export
WM_CXXcompiler settings as
CXXso 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, so
makeLLVMwill have problems configuring for this non-existent compiler.
can avoid this by using
makeLLVM -gccto 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
CCvariable 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.