if not meson.is_cross_build()
- if not have_tools
+ if opt_tools.disabled() and opt_examples.enabled()
error('Need to build tools (orcc) to build examples.')
endif
cdata.set_quoted('VERSION', meson.project_version())
subdir('orc')
-subdir('orc-test')
-have_tools = not get_option('tools').disabled()
-if have_tools
+opt_examples = get_option('examples')
+opt_orctest = get_option('orc-test')
+opt_tests = get_option('tests')
+opt_tools = get_option('tools')
+
+if not opt_orctest.disabled()
+ subdir('orc-test')
+else
+ if opt_tests.enabled()
+ error('Tests were enabled explicitly, but the orc-test library was disabled.')
+ endif
+ orc_test_dep = disabler() # for testsuites + orc-bugreport
+endif
+
+if not opt_tools.disabled()
subdir('tools')
else
orcc = disabler() # for testsuite/orcc/
endif
-if not get_option('examples').disabled()
+if not opt_examples.disabled()
subdir('examples')
endif
-if not get_option('tests').disabled()
+if not opt_tests.disabled()
subdir('testsuite')
endif
option('orc-backend', type : 'combo', choices : ['sse', 'mmx', 'neon', 'mips', 'altivec', 'c64x', 'all'], value : 'all')
+# Orc feature options
+option('orc-test', type : 'feature', value : 'auto', description : 'Build the orc-test library used for unit testing and by the orc-bugreport tool')
+
# Common feature options
option('benchmarks', type : 'feature', value : 'auto', yield : true)
option('examples', type : 'feature', value : 'auto', yield : true)