Skip to content

Commit da2c747

Browse files
committed
give warning if stack protection is not supported
1 parent 6bdad41 commit da2c747

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

meson.build

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,14 @@ if get_option('SQLITECPP_USE_STACK_PROTECTION')
148148
message('warning: SQLiteCpp does not support stack protection on MinGW-W64')
149149
message('warning: this could lead to a crash on the application')
150150
message('warning: you can disable this warning by setting SQLITECPP_USE_STACK_PROTECTOR to false')
151-
else
151+
## check if it is supported by the compiler
152+
elif cxx.has_argument('-fstack-protector')
152153
sqlitecpp_args += ['-fstack-protector']
154+
## if not supported give a warning
155+
else
156+
message('warning: SQLiteCpp does not have stack protection support in this compiler')
157+
message('warning: this argument will be ignored')
158+
message('warning: you can disable this warning by setting SQLITECPP_USE_STACK_PROTECTOR to false')
153159
endif
154160
endif
155161

0 commit comments

Comments
 (0)