Remove use of -Werror when compiling Ceres. - As noted in Issue #193 (in that case for GCC 6), Ceres' use of -Werror when compiling on *nix can prevent compilation on new compilers that add new warnings and there is an inevitable delay between new compiler versions and Ceres versions. - Removing the explicit use of -Werror, and relying on indirect verification by maintainers should fix build issues for Ceres releases on newer compilers. Change-Id: I38e9ade28d4a90e53dcd918a7d470f1a1debd7b4
diff --git a/CMakeLists.txt b/CMakeLists.txt index cbb5021..25c8ae2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -500,11 +500,10 @@ internal/ceres ${GLOG_INCLUDE_DIRS}) # Eigen SparseQR generates various compiler warnings related to unused and -# uninitialised local variables, which prevents Ceres compilation as we use -# -Werror. To avoid having to individually suppress these warnings around -# the #include statments for Eigen headers across all GCC/Clang versions, we -# tell CMake to treat Eigen headers as system headers. This results in all -# compiler warnings from them being suppressed. +# uninitialised local variables. To avoid having to individually suppress these +# warnings around the #include statments for Eigen headers across all GCC/Clang +# versions, we tell CMake to treat Eigen headers as system headers. This +# results in all compiler warnings from them being suppressed. # # Note that this is *not* propagated to clients, ie CERES_INCLUDE_DIRS # used by clients after find_package(Ceres) does not identify Eigen as @@ -653,7 +652,7 @@ if (UNIX) # GCC is not strict enough by default, so enable most of the warnings. set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -Werror=all -Werror=extra -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers") + "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers") endif (UNIX) # Use a larger inlining threshold for Clang, since it hobbles Eigen,