endif
# TODO: make this conditional
-dep_valgrind = dependency('valgrind', required : false)
-if dep_valgrind.found() and with_valgrind
- pre_args += '-DHAVE_VALGRIND'
+if with_valgrind != 'false'
+ dep_valgrind = dependency('valgrind', required : with_valgrind == 'true')
+ if dep_valgrind.found()
+ pre_args += '-DHAVE_VALGRIND'
+ endif
+else
+ dep_valgrind = []
endif
# pthread stubs. Lets not and say we didn't
# TODO: llvm-prefix and llvm-shared-libs
-dep_unwind = dependency('libunwind', required : false)
-if dep_unwind.found() and with_libunwind
- pre_args += '-DHAVE_LIBUNWIND'
+if with_libunwind != 'false'
+ dep_unwind = dependency('libunwind', required : with_libunwind == 'true')
+ if dep_unwind.found()
+ pre_args += '-DHAVE_LIBUNWIND'
+ endif
+else
+ dep_unwind = []
endif
# TODO: flags for opengl, gles, dri
)
option(
'valgrind',
- type : 'boolean',
- value : true,
- description : 'Build with valgrind support if possible'
+ type : 'combo',
+ value : 'auto',
+ choices : ['auto', 'true', 'false'],
+ description : 'Build with valgrind support'
)
option(
'libunwind',
- type : 'boolean',
- value : true,
- description : 'Use libunwind for stack-traces if possible'
+ type : 'combo',
+ value : 'auto',
+ choices : ['auto', 'true', 'false'],
+ description : 'Use libunwind for stack-traces'
)
option(
'build-tests',