diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-06-09 17:44:18 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-06-09 17:44:18 +0200 |
commit | 0eb06f1391ffa151e6a09979df31b406c28b3772 (patch) | |
tree | e936db19aabd9212080972e1292f229958127672 /CMakeLists.txt | |
parent | 64753af3b7fa60902e418d3432e1e00164f31547 (diff) |
Enable -Wshadow with clang
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a28ad07d8..e037af3bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,6 +147,12 @@ if(NOT MSVC) ei_add_cxx_compiler_flag("-Wenum-conversion") ei_add_cxx_compiler_flag("-Wc++11-extensions") + # -Wshadow is insanely too strict with gcc, hopefully it will become usable with gcc 6 + # if(NOT CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.0.0")) + if(NOT CMAKE_COMPILER_IS_GNUCXX) + ei_add_cxx_compiler_flag("-Wshadow") + endif() + ei_add_cxx_compiler_flag("-Wno-psabi") ei_add_cxx_compiler_flag("-Wno-variadic-macros") ei_add_cxx_compiler_flag("-Wno-long-long") |