Avoid variable redefined errors for _FORTIFY_SOURCE

I ran into this on sabayon linux while trying the cmake build
This commit is contained in:
Geert Janssens
2016-06-02 18:49:23 +02:00
parent 92bb277f06
commit b92eff265a

View File

@@ -375,7 +375,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") # FIXME: should be -std=
IF (UNIX)
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused")
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wdeclaration-after-statement -Wno-pointer-sign -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused")
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-declarations -std=gnu99 -O2")
ENDIF (UNIX)
IF (MINGW)