Skip to content

Commit

Permalink
G2 lib with GNU compiler fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RatkoVasic-NOAA authored Sep 3, 2024
1 parent 33eea04 commit e830ce0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions var/spack/repos/builtin/packages/g2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ def cmake_args(self):

return args

# GNU compiler is complaining if not using -fno-range-check argument
def flag_handler(self, name, flags):
if name == "fflags" and self.compiler.fc.endswith("gfortran"):
flags.append("-fno-range-check")
return (None, None, flags)

def setup_run_environment(self, env):
precisions = (
self.spec.variants["precision"].value if self.spec.satisfies("@3.4.6:") else ("4", "d")
Expand Down

0 comments on commit e830ce0

Please sign in to comment.