diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2024-09-11 22:14:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-11 23:14:50 -0600 |
commit | f417e9f00c992e5c124b94fa88964a973e13274e (patch) | |
tree | a48af9b7a71529dba0f136720446e99d6790ea92 /LICENSE-APACHE | |
parent | 527e0fb4b4830536826487232d213a7b9240ed3d (diff) | |
download | spack-f417e9f00c992e5c124b94fa88964a973e13274e.tar.gz spack-f417e9f00c992e5c124b94fa88964a973e13274e.tar.bz2 spack-f417e9f00c992e5c124b94fa88964a973e13274e.tar.xz spack-f417e9f00c992e5c124b94fa88964a973e13274e.zip |
acts: further simplify `cxxstd` handling (#46333)
See https://github.com/spack/spack/pull/46314#discussion_r1752940332.
This further simplifies `cxxstd` variant handling in `acts` by removing superfluous
version constraints from dependencies for `geant4` and `root`.
The version constraints in the loop are redundant with the conditional variant
values here:
```python
_cxxstd_values = (
conditional("14", when="@:0.8.1"),
conditional("17", when="@:35"),
conditional("20", when="@24:"),
)
_cxxstd_common = {
"values": _cxxstd_values,
"multi": False,
"description": "Use the specified C++ standard when building.",
}
variant("cxxstd", default="17", when="@:35", **_cxxstd_common)
variant("cxxstd", default="20", when="@36:", **_cxxstd_common)
```
So we can simplify the dependencies in the loop to:
```python
for _cxxstd in _cxxstd_values:
for _v in _cxxstd:
depends_on(f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} +geant4")
depends_on(f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} +fatras_geant4")
depends_on(f"root cxxstd={_v.value}", when=f"cxxstd={_v.value} +tgeo")
```
And avoid the potential for impossible variant expressions.
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Diffstat (limited to 'LICENSE-APACHE')
0 files changed, 0 insertions, 0 deletions