diff options
author | Joseph Herlant <aerostitch@debian.org> | 2020-01-19 14:49:16 -0800 |
---|---|---|
committer | Joseph Herlant <aerostitch@debian.org> | 2020-01-19 14:49:16 -0800 |
commit | 8117c6f66f4df64c0517845d48b159a071d858b3 (patch) | |
tree | d7bf90893c11139c0bd53b6a2c24081f3ea4efe6 | |
parent | dde088c35ba560f31757812a5c880a565c0ce399 (diff) | |
download | navit-8117c6f66f4df64c0517845d48b159a071d858b3.tar.gz |
add:cmake: add compilation flags to harden the security of navit
-rwxr-xr-x | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 214c638a6..7e9fb09ea 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -836,6 +836,10 @@ if(CMAKE_COMPILER_IS_GNUCC OR CCMAKE_COMPILER_IS_GNUCXX) add_compiler_flag_if_available("-Wmissing-prototypes") add_compiler_flag_if_available("-Wstrict-prototypes") add_compiler_flag_if_available("-Wformat-security") + add_compiler_flag_if_available("-Werror=format-security") + add_compiler_flag_if_available("-fstack-protector-strong") + add_compiler_flag_if_available("-D_FORTIFY_SOURCE=2") + add_compiler_flag_if_available("-Wdate-time") endif() if (EXTRA_DEFINES) |