Skip to content

Commit

Permalink
allow compilers with version in matrix defs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Sep 11, 2024
1 parent c8164ac commit c239551
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions spack-ext/lib/jcsda-emc/spack-stack/stack/stack_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,10 @@ def write(self):
# DH I am too stupid to do this the "spack way" ...
definitions = spack.config.get("definitions", scope=env_scope)
if definitions:
target_compiler = f"%{self.compiler}".split("@")[0]
target_compiler = f"%{self.compiler}"
for i in range(len(definitions)):
if "compilers" in definitions[i]:
j = len(definitions[i]["compilers"])-1
while j>=0:
if not definitions[i]["compilers"][j] == target_compiler:
definitions[i]["compilers"].pop(j)
j -= 1
definitions[i] = {"compilers": [target_compiler]}
spack.config.set("definitions", definitions, scope=env_scope)

if self.install_prefix:
Expand Down

0 comments on commit c239551

Please sign in to comment.