Skip to content

Commit

Permalink
Disabel missing initialization warning on GCC 4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarex committed Feb 8, 2018
1 parent ac6920e commit c95d4d8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
endif()
# using GCC
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OSRM_WARNING_FLAGS} -Werror=strict-overflow=1 -Wno-error=maybe-uninitialized -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${COLOR_FLAG} -fPIC -ftemplate-depth=1024")

# Disable missing field initializer since this has a lot of false positives with incomplete curly-braces
# initialization support on 4.9
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_EQUAL "4.9" AND NOT MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=missing-field-initializers")
endif()

if(WIN32) # using mingw
add_dependency_defines(-DWIN32)
set(OPTIONAL_SOCKET_LIBS ws2_32 wsock32)
Expand Down

0 comments on commit c95d4d8

Please sign in to comment.