some refactor
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 16s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 13s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make-Without-sqlite3 (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake-Without-sqlite3 (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson-Without-sqlite3 (push) Successful in 13s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 16s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 13s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make-Without-sqlite3 (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake-Without-sqlite3 (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson-Without-sqlite3 (push) Successful in 13s
This commit is contained in:
1 parent
bed968b4e4
commit
39ef249f6f
35 files changed
+884
-691
No files matched your search
+45
-15
@@ -7,21 +7,7 @@ extra_c_link_args = ['-Wl,--gc-sections']
|
||||
sqlite3_dep = dependency('sqlite3', required: false)
|
||||
use_sqlite3 = get_option('use_sqlite3')
|
||||
use_werror = get_option('use_werror')
|
||||
|
||||
if use_sqlite3
|
||||
if not sqlite3_dep.found()
|
||||
error('SQLite3 requested but not found')
|
||||
endif
|
||||
deps += sqlite3_dep
|
||||
add_project_arguments('-DUSE_SQLITE3', language: 'c')
|
||||
endif
|
||||
|
||||
if use_werror
|
||||
add_project_arguments('-Werror', language: 'c')
|
||||
endif
|
||||
|
||||
executable(
|
||||
'auth_service',
|
||||
sources = [
|
||||
'src/main.c',
|
||||
'src/user.c',
|
||||
'src/add_user.c',
|
||||
@@ -52,6 +38,50 @@ executable(
|
||||
'src/cors.c',
|
||||
'src/db_get_user_field_by_id.c',
|
||||
'src/db_update_user_field.c',
|
||||
]
|
||||
|
||||
with_filedb_sources = [
|
||||
'src/file_db/filedb.c',
|
||||
'src/file_db/filedb_delete_user.c',
|
||||
'src/file_db/filedb_get_all_users.c',
|
||||
'src/file_db/filedb_get_user_by_id.c',
|
||||
'src/file_db/filedb_get_user_by_username.c',
|
||||
'src/file_db/filedb_get_user_field_by_id.c',
|
||||
'src/file_db/filedb_insert_user.c',
|
||||
'src/file_db/filedb_update_user.c',
|
||||
'src/file_db/filedb_update_user_field.c',
|
||||
]
|
||||
|
||||
with_sqlite3_sources = [
|
||||
'src/sqlite_db/sqlite.c',
|
||||
'src/sqlite_db/sqlite_delete_user.c',
|
||||
'src/sqlite_db/sqlite_get_all_users.c',
|
||||
'src/sqlite_db/sqlite_get_user_by_id.c',
|
||||
'src/sqlite_db/sqlite_get_user_by_username.c',
|
||||
'src/sqlite_db/sqlite_get_user_field_by_id.c',
|
||||
'src/sqlite_db/sqlite_init_db.c',
|
||||
'src/sqlite_db/sqlite_insert_user.c',
|
||||
'src/sqlite_db/sqlite_migrate_db.c',
|
||||
'src/sqlite_db/sqlite_update_user.c',
|
||||
'src/sqlite_db/sqlite_update_user_field.c',
|
||||
]
|
||||
|
||||
if use_sqlite3
|
||||
if not sqlite3_dep.found()
|
||||
error('SQLite3 requested but not found')
|
||||
endif
|
||||
deps += sqlite3_dep
|
||||
sources += with_sqlite3_sources
|
||||
add_project_arguments('-DUSE_SQLITE3', language: 'c')
|
||||
endif
|
||||
|
||||
if use_werror
|
||||
add_project_arguments('-Werror', language: 'c')
|
||||
endif
|
||||
|
||||
executable(
|
||||
'auth_service',
|
||||
sources + with_filedb_sources,
|
||||
include_directories: include_dirs,
|
||||
dependencies: deps,
|
||||
c_args: extra_c_args,
|
||||
|
||||
Reference in new issue
Block a user