spectre: add docs dependencies, BUILD_DOCS toggle (#29399)

New versions don't try to configure docs targets at all when the
BUILD_DOCS option is turned off. This avoids CMake warnings
when docs dependencies are not found.
This commit is contained in:
Nils Vu 2022-03-08 16:51:05 +01:00 committed by GitHub
parent b559b99c8f
commit cd5e7579be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,8 +117,10 @@ class Spectre(CMakePackage):
# Docs
with when('+doc'):
depends_on('doxygen', type='build')
depends_on('perl', type='build', when="@2022.03.07:")
depends_on('py-beautifulsoup4', type='build')
depends_on('py-pybtex', type='build')
depends_on('py-nbconvert', type='build', when="@2022.03.07:")
# Incompatibilities
# - Shared libs builds on macOS don't work before
@ -198,6 +200,7 @@ def cmake_args(self):
self.define('Python_EXECUTABLE', self.spec['python'].command.path),
self.define_from_variant('BUILD_PYTHON_BINDINGS', 'python'),
self.define('BUILD_TESTING', self.run_tests),
self.define_from_variant('BUILD_DOCS', 'doc'),
self.define('USE_GIT_HOOKS', False),
self.define('USE_IWYU', False),
self.define_from_variant('USE_FORMALINE', 'formaline'),