make lib and bin optional to only compile what is wanted

This commit is contained in:
2023-02-16 01:27:15 -03:00
parent f6e93a1b67
commit bf5033c70d
2 changed files with 19 additions and 2 deletions

View File

@@ -29,5 +29,12 @@ if docs_enabled
endif
endif
lib_enabled = get_option('lib')
if lib_enabled
subdir('lib')
endif
bin_enabled = get_option('bin')
if bin_enabled
subdir('src')
endif

View File

@@ -1,3 +1,13 @@
option('bin',
type: 'boolean',
value: true,
description: 'Build the obelisk compiler'
)
option('lib',
type: 'boolean',
value: true,
description: 'Build the obelisk library'
)
option('docs',
type: 'boolean',
value: true,