summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2021-01-27 15:27:17 -0800
committerGitHub <noreply@github.com>2021-01-27 15:27:17 -0800
commit0d521d56eca345e4d7279d86a072ef1693639b1b (patch)
tree9ba6fc29e5f4d12acdfc95ea4636c84d6fc231c8
parent18b3688cd17918cae5d9d39c355e96c233b96472 (diff)
downloadspack-0d521d56eca345e4d7279d86a072ef1693639b1b.tar.gz
spack-0d521d56eca345e4d7279d86a072ef1693639b1b.tar.bz2
spack-0d521d56eca345e4d7279d86a072ef1693639b1b.tar.xz
spack-0d521d56eca345e4d7279d86a072ef1693639b1b.zip
openmpi find external fixup (#21354)
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index fb5d70f34f..4984a28926 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -446,10 +446,11 @@ class Openmpi(AutotoolsPackage):
# Get the appropriate compiler
match = re.search(r'\bC compiler absolute: (\S+)', output)
- compiler_spec = get_spack_compiler_spec(
- os.path.dirname(match.group(1)))
- if compiler_spec:
- variants += "%" + str(compiler_spec)
+ if match:
+ compiler_spec = get_spack_compiler_spec(
+ os.path.dirname(match.group(1)))
+ if compiler_spec:
+ variants += "%" + str(compiler_spec)
results.append(variants)
return results