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.
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
Apple clang version 12.0.5 (clang-122.214.171.124) Target: x86_64-apple-darwin21.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
- GNU Gcc
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