Add a "sticky" property to variants (#28630)
* Add sticky variants
* Add unit tests for sticky variants
* Add documentation for sticky variants
* Revert "Revert 19736 because conflicts are avoided by clingo by default (#26721)"
This reverts commit 33ef7d57c1
.
* Add stickiness to "allow-unsupported-compiler"
This commit is contained in:

committed by
GitHub

parent
dd7acecf3d
commit
cd04109e17
@@ -0,0 +1,18 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
from spack import *
|
||||
|
||||
|
||||
class StickyVariant(AutotoolsPackage):
|
||||
"""Package with a sticky variant and a conflict"""
|
||||
|
||||
homepage = "http://www.example.com"
|
||||
url = "http://www.example.com/a-1.0.tar.gz"
|
||||
|
||||
version('1.0', '0123456789abcdef0123456789abcdef')
|
||||
|
||||
variant('allow-gcc', description='', default=False, sticky=True)
|
||||
|
||||
conflicts('%gcc', when='~allow-gcc')
|
@@ -144,6 +144,8 @@ class Cuda(Package):
|
||||
conflicts('arch=darwin-mojave-x86_64')
|
||||
|
||||
variant('dev', default=False, description='Enable development dependencies, i.e to use cuda-gdb')
|
||||
variant('allow-unsupported-compilers', default=False, sticky=True,
|
||||
description='Allow unsupported host compiler and CUDA version combinations')
|
||||
|
||||
depends_on('libxml2', when='@10.1.243:')
|
||||
# cuda-gdb needed libncurses.so.5 before 11.4.0
|
||||
|
Reference in New Issue
Block a user