Commit c20a8b73 authored by Salamandar's avatar Salamandar Committed by Jehan

Enforce libbacktrace tests. Add missing dep in app

parent a2b74147
Pipeline #114084 passed with stages
in 21 minutes and 54 seconds
......@@ -108,7 +108,17 @@ app_gui_links = [
]
app_deps = [
gio, gtk3, pangocairo, pangoft2, gegl, lcms, gexiv2, drmingw, rpc, dbghelp,
dbghelp,
drmingw,
gegl,
gexiv2,
gio,
gtk3,
lcms,
libbacktrace,
pangocairo,
pangoft2,
rpc,
]
# Executables
......
......@@ -445,10 +445,39 @@ endif
## Check for libbacktrace
libbacktrace = ( get_option('libbacktrace')
? cc.find_library('backtrace', has_headers: 'backtrace.h', required: false)
: no_dep
)
if get_option('libbacktrace')
libbacktrace = cc.find_library('backtrace', required: false)
if libbacktrace.found()
libbacktrace_run = cc.run('''
#include <stddef.h>
#include <backtrace.h>
#include <backtrace-supported.h>
#if ! BACKTRACE_SUPPORTED
# error ! BACKTRACE_SUPPORTED
#endif
int main() {
(void) backtrace_create_state (NULL, 0, NULL, NULL);
return 0;
}
''',
dependencies: libbacktrace,
)
if not(libbacktrace_run.compiled() and libbacktrace_run.returncode() == 0)
warning(
'libbacktrace was found, but the test compilation failed.\n' +
'You can find more info in meson-logs/meson-logs.txt.'
)
libbacktrace = no_dep
endif
endif
else
libbacktrace = no_dep
endif
conf.set('HAVE_LIBBACKTRACE', libbacktrace.found())
## Check for libunwind
......@@ -1079,7 +1108,6 @@ conf.set10('ENABLE_MP', get_option('enable-multiproc'))
# Check for available functions
foreach fn : [
{ 'm': 'HAVE_ALLOCA', 'v': 'alloca', },
{ 'm': 'HAVE_BACKTRACE', 'v': 'backtrace', },
{ 'm': 'HAVE_DCGETTEXT', 'v': 'dcgettext', },
{ 'm': 'HAVE_DIFFTIME', 'v': 'difftime', },
{ 'm': 'HAVE_FINITE', 'v': 'finite', },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment