mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[CMake] no _FORTIFY_SOURCE on MSYS2 #2119
This commit is contained in:
parent
6ed6cf2038
commit
685422dbab
@ -112,9 +112,12 @@ endif()
|
||||
endif()
|
||||
|
||||
# global compiler flags
|
||||
if(NOT WIN32)
|
||||
# MSYS2 needs -lssp and -fstack-protector for _FORTIFY_SOURCE
|
||||
add_compile_definitions(_FORTIFY_SOURCE=2)
|
||||
add_compile_options(-Wall -Wextra -W -Wshadow -Wformat -Wformat-security
|
||||
-fexceptions -fstrict-aliasing)
|
||||
add_compile_options(-Wformat -Werror=format-security)
|
||||
endif()
|
||||
add_compile_options(-Wall -Wextra -W -Wshadow -fexceptions -fstrict-aliasing)
|
||||
|
||||
# don't use REQUIRED with subsequent find_package() operations; we use
|
||||
# feature_summary + set_package_properties to fail in one fell swoop.
|
||||
@ -423,7 +426,6 @@ target_link_libraries(notcurses++
|
||||
notcurses)
|
||||
|
||||
set(NCPP_COMPILE_OPTIONS
|
||||
-Werror=format-security
|
||||
-Wnull-dereference
|
||||
-Wunused
|
||||
-Wno-c99-extensions
|
||||
|
Loading…
x
Reference in New Issue
Block a user