mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-09 12:16:05 -04:00
add missing compile options
This commit is contained in:
parent
8e00fef2e5
commit
c1b9420ba9
35
meson.build
35
meson.build
@ -20,10 +20,14 @@ unix_like_code = '''
|
|||||||
'''
|
'''
|
||||||
unix_like = cxx.compiles(unix_like_code, name : 'unix like environment')
|
unix_like = cxx.compiles(unix_like_code, name : 'unix like environment')
|
||||||
|
|
||||||
## C++17 disable the support for std::filesystem (by default off)
|
mingw_64_env_code = '''
|
||||||
if get_option('SQLITECPP_DISABLE_STD_FILESYSTEM')
|
#if defined(__MINGW64__)
|
||||||
sqlitecpp_cxx_flags += ['-DSQLITECPP_DISABLE_STD_FILESYSTEM']
|
// do nothing
|
||||||
endif
|
#else
|
||||||
|
# error "Non MinGW-W64 environment"
|
||||||
|
#endif
|
||||||
|
'''
|
||||||
|
mingw_64_env = cxx.compiles(mingw_64_env_code, name : 'MinGW-W64 environment')
|
||||||
|
|
||||||
thread_dep = dependency('threads')
|
thread_dep = dependency('threads')
|
||||||
# sqlite3 support
|
# sqlite3 support
|
||||||
@ -130,6 +134,29 @@ if get_option('SQLITE_USE_LEGACY_STRUCT')
|
|||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
## C++17 disable the support for std::filesystem (by default off)
|
||||||
|
if get_option('SQLITECPP_DISABLE_STD_FILESYSTEM')
|
||||||
|
sqlitecpp_cxx_flags += ['-DSQLITECPP_DISABLE_STD_FILESYSTEM']
|
||||||
|
endif
|
||||||
|
|
||||||
|
## stack protection hardening
|
||||||
|
if get_option('SQLITECPP_USE_STACK_PROTECTOR')
|
||||||
|
## if is on MinGW-W64 give a warning that is not supported
|
||||||
|
if mingw_64_env
|
||||||
|
warning('SQLiteCpp does not support stack protection on MinGW-W64')
|
||||||
|
warming('this could lead to a crash on the application')
|
||||||
|
warming('you can disable this warning by setting SQLITECPP_USE_STACK_PROTECTOR to false')
|
||||||
|
else
|
||||||
|
sqlitecpp_args += ['-fstack-protector']
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
## enable ommit load extension
|
||||||
|
if get_option('SQLITECPP_OMIT_LOAD_EXTENSION')
|
||||||
|
sqlitecpp_args += ['-DSQLITE_OMIT_LOAD_EXTENSION']
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
if unix_like
|
if unix_like
|
||||||
sqlitecpp_args += [
|
sqlitecpp_args += [
|
||||||
'-DfPIC',
|
'-DfPIC',
|
||||||
|
@ -9,8 +9,12 @@ option('SQLITE_ENABLE_ASSERT_HANDLER', type: 'boolean', value: false, descriptio
|
|||||||
option('SQLITE_HAS_CODEC', type: 'boolean', value: false, description: 'Enable database encryption API. Not available in the public release of SQLite.')
|
option('SQLITE_HAS_CODEC', type: 'boolean', value: false, description: 'Enable database encryption API. Not available in the public release of SQLite.')
|
||||||
## Force forward declaration of legacy struct sqlite3_value (pre SQLite 3.19)
|
## Force forward declaration of legacy struct sqlite3_value (pre SQLite 3.19)
|
||||||
option('SQLITE_USE_LEGACY_STRUCT', type: 'boolean', value: false, description: 'Fallback to forward declaration of legacy struct sqlite3_value (pre SQLite 3.19)')
|
option('SQLITE_USE_LEGACY_STRUCT', type: 'boolean', value: false, description: 'Fallback to forward declaration of legacy struct sqlite3_value (pre SQLite 3.19)')
|
||||||
|
## Enable ommit load extension
|
||||||
|
option('SQLITE_OMMIT_LOAD_EXTENSION', type: 'boolean', value: false, description: 'Enable ommit load extension.')
|
||||||
## Disable the support for std::filesystem (C++17)
|
## Disable the support for std::filesystem (C++17)
|
||||||
option('SQLITECPP_DISABLE_STD_FILESYSTEM', type: 'boolean', value: false, description: 'Disable the support for std::filesystem (C++17)')
|
option('SQLITECPP_DISABLE_STD_FILESYSTEM', type: 'boolean', value: false, description: 'Disable the support for std::filesystem (C++17)')
|
||||||
|
## Stack protection is not supported on MinGW-W64 on Windows, allow this flag to be turned off.
|
||||||
|
option('SQLITECPP_USE_STACK_PROTECTION', type: 'boolean', value: true, description: 'Disable stack protection on MinGW-W64 on Windows.')
|
||||||
## Enable build for the tests of SQLiteC++
|
## Enable build for the tests of SQLiteC++
|
||||||
option('SQLITECPP_BUILD_TESTS', type: 'boolean', value: false, description: 'Build SQLiteC++ unit tests.')
|
option('SQLITECPP_BUILD_TESTS', type: 'boolean', value: false, description: 'Build SQLiteC++ unit tests.')
|
||||||
## Build the examples of SQLiteC++
|
## Build the examples of SQLiteC++
|
||||||
|
Loading…
x
Reference in New Issue
Block a user