Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include 3rdparty libraries as 'system' headers to avoid warnings #478

Merged
merged 1 commit into from
Aug 18, 2020

Conversation

jlblancoc
Copy link
Member

If one enables warnings-as-errors (e.g. "suggest override") the compiler reports warnings/errors in 3rdparty code, e.g.

/home/jlblanco/code/gtsam/gtsam/sfm/ShonanAveraging.cpp:526:25:   required from here
/home/jlblanco/code/gtsam/gtsam/3rdparty/Spectra/LinAlg/Lanczos.h:55:10: error: ‘void Spectra::Lanczos<Scalar, ArnoldiOpType>::factorize_from(Spectra::Lanczos<Scalar, ArnoldiOpType>::Index, Spectra::Lanczos<Scalar, ArnoldiOpType>::Index, Spectra::Lanczos<Scalar, ArnoldiOpType>::Index&) [with Scalar = double; ArnoldiOpType = Spectra::ArnoldiOp<double, gtsam::MatrixProdFunctor, Spectra::IdentityBOp>; Spectra::Lanczos<Scalar, ArnoldiOpType>::Index = long int]’ can be marked override [-Werror=suggest-override]
     void factorize_from(Index from_k, Index to_m, Index& op_counter)
          ^~~~~~~~~~~~~~

In general, it's "safer" to include 3rdparty and system libraries as... "system libraries" in CMake's terminology :-)

Goal: Enabling stricter levels of warnings/errors in gtsam code itself, while not failing to build due to non-compliant external dependencies.

@dellaert dellaert merged commit b09a6c9 into develop Aug 18, 2020
@dellaert dellaert deleted the fix/warnings-in-3rdparty branch August 18, 2020 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants