give warning if stack protection is not supported

This commit is contained in:
Jonathan Guzmán 2023-04-01 13:53:26 -06:00
parent 6bdad41ce8
commit da2c747f3e
No known key found for this signature in database
GPG Key ID: C2956F1668BA042A

View File

@ -148,8 +148,14 @@ if get_option('SQLITECPP_USE_STACK_PROTECTION')
message('warning: SQLiteCpp does not support stack protection on MinGW-W64')
message('warning: this could lead to a crash on the application')
message('warning: you can disable this warning by setting SQLITECPP_USE_STACK_PROTECTOR to false')
else
## check if it is supported by the compiler
elif cxx.has_argument('-fstack-protector')
sqlitecpp_args += ['-fstack-protector']
## if not supported give a warning
else
message('warning: SQLiteCpp does not have stack protection support in this compiler')
message('warning: this argument will be ignored')
message('warning: you can disable this warning by setting SQLITECPP_USE_STACK_PROTECTOR to false')
endif
endif