build: Make tests optional

When used as a subproject, there is little point in adding tests
to the parent project's test suite. Even if the tests caught an
error, it wouldn't be in the position of fixing it.

So add a build option that allows parent projects to turn off tests.
This commit is contained in:
Florian Müllner 2025-06-04 17:42:17 +02:00
parent 5c7fb03da7
commit eb16b36405
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View file

@ -42,4 +42,6 @@ else
install_subdir('blueprintcompiler', install_dir: py.get_install_dir())
endif
subdir('tests')
if get_option('tests')
subdir('tests')
endif

View file

@ -1 +1,2 @@
option('docs', type: 'boolean', value: false)
option('tests', type: 'boolean', value: true)