[tracker] meson: Fix SQLite FTS5 check
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] meson: Fix SQLite FTS5 check
- Date: Fri, 25 Aug 2017 16:27:13 +0000 (UTC)
commit 1f9740138dfd85dc03e2595c3b16de999a4674cd
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Aug 25 18:23:39 2017 +0200
meson: Fix SQLite FTS5 check
Can't compile without main()
meson.build | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/meson.build b/meson.build
index 7fdd5b3..4945c9a 100644
--- a/meson.build
+++ b/meson.build
@@ -103,14 +103,17 @@ endif
if enable_fts
sqlite3_builtin_fts5_test = '''
#include <sqlite3.h>
- sqlite3 *db;
- int rc;
- rc = sqlite3_open(":memory:", &db);
- if (rc!=SQLITE_OK) return -1;
- rc = sqlite3_exec(db, "create table a(text)", 0, 0, 0);
- if (rc!=SQLITE_OK) return -1;
- rc = sqlite3_exec(db, "create virtual table t using fts5(content='a',text)", 0, 0, 0);
- if (rc!=SQLITE_OK) return -1;
+
+ int main (int argc, char *argv[]) {
+ sqlite3 *db;
+ int rc;
+ rc = sqlite3_open(":memory:", &db);
+ if (rc!=SQLITE_OK) return -1;
+ rc = sqlite3_exec(db, "create table a(text)", 0, 0, 0);
+ if (rc!=SQLITE_OK) return -1;
+ rc = sqlite3_exec(db, "create virtual table t using fts5(content='a',text)", 0, 0, 0);
+ if (rc!=SQLITE_OK) return -1;
+ }
'''
sqlite3_has_builtin_fts5 = cc.compiles(sqlite3_builtin_fts5_test,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]