Make _enable_or_disable(...) return an empty array for conditional variants whose condition is not met (#27504)

This commit is contained in:
Harmen Stoppels
2021-11-22 10:47:09 +01:00
committed by GitHub
parent cda9d6d981
commit 0024e5cc9b
4 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
# Copyright 2013-2021 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)
class AutotoolsConditionalVariantsTest(AutotoolsPackage):
homepage = "https://www.example.com"
has_code = False
version('1.0')
variant('example', default=True, description='nope', when='@2.0:')