Disable maybe-uninitialized warning for GCC >= 7.0.

GitOrigin-RevId: a8c6c74daabac2c77443fa652c94083127f799ae
This commit is contained in:
levlam 2018-10-25 18:39:40 +03:00
parent 570a59f1d4
commit d0a6ef1f5b

View File

@ -220,6 +220,10 @@ if (NOT MSVC)
# add_cxx_compiler_flag("-Wzero-as-null-pointer-constant") # add_cxx_compiler_flag("-Wzero-as-null-pointer-constant")
endif() endif()
if (GCC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0))
add_cxx_compiler_flag("-Wno-maybe-uninitialized") # too much false positives
endif()
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem /usr/include/c++/v1") #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem /usr/include/c++/v1")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread") #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")