Merge pull request #393 from steve-lunarg/warning-enable

Build: Add g++/clang warnings to match some enabled by /W4 in MSVC
This commit is contained in:
John Kessenich 2016-07-21 14:46:21 -06:00 committed by GitHub
commit 2f003ac4e6
4 changed files with 23 additions and 12 deletions

View file

@ -25,8 +25,14 @@ else(WIN32)
endif(WIN32)
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
-Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable)
add_definitions(-Wno-reorder) # disable this from -Wall, since it happens all over.
add_definitions(-std=c++11)
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
add_definitions(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
-Wunused-parameter -Wunused-value -Wunused-variable)
add_definitions(-Wno-reorder) # disable this from -Wall, since it happens all over.
add_definitions(-std=c++11)
endif()