mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-20 15:39:08 +08:00
Disable -Wshadow when compiling with g++
This commit is contained in:
parent
686fb57233
commit
34e499ad36
@ -153,11 +153,7 @@ if(NOT MSVC)
|
|||||||
ei_add_cxx_compiler_flag("-Wdouble-promotion")
|
ei_add_cxx_compiler_flag("-Wdouble-promotion")
|
||||||
# ei_add_cxx_compiler_flag("-Wconversion")
|
# ei_add_cxx_compiler_flag("-Wconversion")
|
||||||
|
|
||||||
# -Wshadow is insanely too strict with gcc, hopefully it will become usable with gcc 6
|
ei_add_cxx_compiler_flag("-Wshadow")
|
||||||
# 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-psabi")
|
||||||
ei_add_cxx_compiler_flag("-Wno-variadic-macros")
|
ei_add_cxx_compiler_flag("-Wno-variadic-macros")
|
||||||
|
@ -45,12 +45,16 @@
|
|||||||
#pragma clang diagnostic ignored "-Wabsolute-value"
|
#pragma clang diagnostic ignored "-Wabsolute-value"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined __GNUC__ && __GNUC__>=6
|
#elif defined __GNUC__
|
||||||
|
|
||||||
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
|
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#endif
|
#endif
|
||||||
#pragma GCC diagnostic ignored "-Wignored-attributes"
|
// g++ warns about local variables shadowing member functions, which is too strict
|
||||||
|
#pragma GCC diagnostic ignored "-Wshadow"
|
||||||
|
#if __GNUC__>=6
|
||||||
|
#pragma GCC diagnostic ignored "-Wignored-attributes"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#pragma warning pop
|
#pragma warning pop
|
||||||
#elif defined __clang__
|
#elif defined __clang__
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#elif defined __GNUC__ && __GNUC__>=6
|
#elif defined __GNUC__
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user