define_from_variant: return an empty string for non-existing variants (#27503)
This permits to use conditional variants without a lot of boilerplate.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# 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 CmakeConditionalVariantsTest(CMakePackage):
|
||||
homepage = "https://dev.null"
|
||||
version('1.0')
|
||||
variant('example', default=True, description='nope', when='@2.0:')
|
Reference in New Issue
Block a user