Closed markcmiller86 closed 1 year ago
Weiqun also mentions...
What I have added assumes that cc and ftn are wrappers around gcc and gfortran. But that's not always the case, because cc and ftn are provided by Cray and they could be using clang or other compilers depending on which PrgEnv-* is loaded. So I am not sure how reliable this is.
You can try
cc --version | head -n 1
or you can check the return value ofmodule is-loaded PrgEnv-gnu
,PrgEnv-cray
etc. In any case, I think it's probably a good idea to add an else block to catch unknown CC and FC. Currently, if one uses cc and ftn, it will silently fail to set some import flags including PREPATH (which is still missing the PR). One will then get an error message later that is much harder to decipher due to missing-Wl,-rpath,
.
We need a more robust solution.
There is logic in
config.make
which controls vanilla GNU make builds that sets flags based on compiler name string. This update adds yet another set of cases forcc
andftn
compiler names.Based on notes from Weiqun Zhang @ lbl (I don't have GitHub handle).