Understanding the Darwin section of the etc/config.sh/settings
This is actually not an issue, more of a question leading towards a possible enhancement.
running the source <path>/etc/bashrc
command on macOS returns the
openfoam: darwin support is clang/llvm only
error message, coming from the etc/config.sh/settings
bash script:
Darwin)
WM_ARCH=darwin64
[ "$WM_COMPILER" = Gcc ] && WM_COMPILER=Clang
echo "openfoam: darwin support is clang/llvm only" 1>&2
;;
Now I am not quite sure what this code block is supposed to do. I also tried to search the code-base for the WM_COMPILER
variable to see where it has been set.
On my machine, I have several compilers including
- Apple's XCode
/usr/bin/clang
Apple clang version 12.0.5 (clang-1205.0.22.9) Target: x86_64-apple-darwin21.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
- GNU Gcc
/usr/local/Cellar/gcc/11.1.0_1/bin/gcc-11
gcc-11 (Homebrew GCC 11.1.0_1) 11.1.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ideally, I would like to choose the compiler set by providing arguments to the <path>/etc/bashrc
script.