Skip to content

Commit

Permalink
gcc: suppress gcc warnings in smesh code
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed May 26, 2020
1 parent 4de7acf commit 078432a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/3rdParty/salomesmesh/CMakeLists.txt
Expand Up @@ -17,31 +17,32 @@ if(CMAKE_COMPILER_IS_CLANGXX)
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-deprecated-copy")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-copy")
endif ()

unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-missing-field-initializers" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")
endif ()
elseif(CMAKE_COMPILER_IS_GNUCXX)
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-unused-result" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-unused-result")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-result")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result")
endif ()

unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-maybe-uninitialized" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized")
endif ()

unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-missing-field-initializers" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")
endif ()
endif()

Expand Down

0 comments on commit 078432a

Please sign in to comment.