Skip to content

Commit

Permalink
meson: add options for docs, unit tests and binding
Browse files Browse the repository at this point in the history
  • Loading branch information
puffnfresh committed Nov 5, 2024
1 parent a9c417d commit f7abc29
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
30 changes: 17 additions & 13 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ subproject('libcmd')
subproject('nix')

# Docs
subproject('internal-api-docs')
subproject('external-api-docs')
if not meson.is_cross_build()
subproject('nix-manual')
if get_option('doc-gen')
subproject('internal-api-docs')
subproject('external-api-docs')
if not meson.is_cross_build()
subproject('nix-manual')
endif
endif

# External C wrapper libraries
Expand All @@ -35,17 +37,19 @@ subproject('libexpr-c')
subproject('libmain-c')

# Language Bindings
if not meson.is_cross_build()
if get_option('bindings') and not meson.is_cross_build()
subproject('perl')
endif

# Testing
subproject('libutil-test-support')
subproject('libutil-tests')
subproject('libstore-test-support')
subproject('libstore-tests')
subproject('libfetchers-tests')
subproject('libexpr-test-support')
subproject('libexpr-tests')
subproject('libflake-tests')
if get_option('unit-tests')
subproject('libutil-test-support')
subproject('libutil-tests')
subproject('libstore-test-support')
subproject('libstore-tests')
subproject('libfetchers-tests')
subproject('libexpr-test-support')
subproject('libexpr-tests')
subproject('libflake-tests')
endif
subproject('nix-functional-tests')
13 changes: 13 additions & 0 deletions meson.options
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# vim: filetype=meson

option('doc-gen', type : 'boolean', value : true,
description : 'Generate documentation',
)

option('unit-tests', type : 'boolean', value : true,
description : 'Build unit tests',
)

option('bindings', type : 'boolean', value : true,
description : 'Build language bindings (e.g. Perl)',
)

0 comments on commit f7abc29

Please sign in to comment.