Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
S src
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • src
  • Issues
  • #483

Closed
Open
Created Mar 16, 2020 by snuverink_j@snuverink_jDeveloper

Compiler warnings from boost headers stops compilation

Summary

Warnings from boost headers result in compilation error.

Steps to reproduce

System specifications:

Host OS System: Darwin-14.5.0
The C++ compiler identification is: AppleClang
The C++ compiler version is: 7.0.2.7000181
Boost version: 1.66.0

What is the current bug behavior?

Compiler warnings from boost files result in compilation error.

What is the expected correct behavior?

Boost or dependent libraries should not trigger compiler errors.

Relevant logs and/or screenshots

In file included from /Users/jsnuverink/Documents/OPAL/fork/src/src/Distribution/Distribution.cpp:10:
In file included from /Users/jsnuverink/Documents/OPAL/fork/src/src/Distribution/SigmaGenerator.h:37:
In file included from /opt/local/include/boost/numeric/ublas/matrix_sparse.hpp:16:
In file included from /opt/local/include/boost/numeric/ublas/vector_sparse.hpp:16:
/opt/local/include/boost/numeric/ublas/storage_sparse.hpp:401:35: error: unused parameter
      'hint' [-Werror,-Wunused-parameter]
        iterator insert (iterator hint, const value_type &p) {
                                  ^

Possible fixes

Include the boost headers as system headers so that gcc and clang don't issue warnings (with -isystem) In CMake this can be done with:

include_directories (SYSTEM ${Boost_INCLUDE_DIRS})

As a side note it seems include_directories is deprecated and it is advised to use target_include_directories instead.

Assignee
Assign to
OPAL 2.4.0
Milestone
OPAL 2.4.0 (Past due)
Assign milestone
Time tracking