Passing "-fstack-protector-strong" doesn't seem to work with Mingw,
complaining about undefied "__stack_chk_fail". For this reason,
we'll disable it for now.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
-D_FORTIFY_SOURCE=2)
endif()
endif()
- CHECK_C_COMPILER_FLAG(-fstack-protector-strong HAS_STACK_PROTECT)
- if (HAS_STACK_PROTECT)
- add_compile_options(-fstack-protector-strong)
- endif()
+ if(NOT WIN32)
+ CHECK_C_COMPILER_FLAG(-fstack-protector-strong HAS_STACK_PROTECT)
+ if (HAS_STACK_PROTECT)
+ add_compile_options(-fstack-protector-strong)
+ endif()
+ endif(NOT WIN32)
endif(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
CHECK_C_COMPILER_FLAG("-D_GLIBCXX_ASSERTIONS" HAS_GLIBCXX_ASSERTIONS)