Menu

#105 Remove/Encapsulate boost::program_options (remove boost #4)

0.2.3
done
nobody
None
nobody
2018-09-01
2017-08-21
Ulf Lorenz
No

Boost is a major drag when you want to compile anything, as the huge number of headers slows down the compilation considerably.

The class ProgramOptions directly exposes boost data structures to the outside world. This should be changed, so that client code that uses ProgramOptions does not need to know anything about this class.

As an optional target, link against the static boost libraries for program_options. That way, users of the WavePacket library need no boost installed at all. Check that this works indeed as expected.

An alternative would be to use a different library; if it is added to the code base, things should work reasonably smoothly.

Measure the effect of this cleanup on compilation times!


Replaced boost::program_options by the Google gflags library. This library is so lean in basic usage that it does not require any wrapper, so the ProgramOptions class was deleted as well. The gflags library is included as an optional dependency for Wavepacket that is propagated to all dependent programs.

Reduction in compilation times is approx. 30s over all build configurations. For the standard (g++, no precompiled headers), this amounts to approx. 5%.

Related

Tickets: #104
Tickets: #84

Discussion

  • Ulf Lorenz

    Ulf Lorenz - 2017-11-11
    • Milestone: Backlog --> 0.3 goal
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-08-17
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,4 +4,6 @@
    
     As an optional target, link against the static boost libraries for program_options. That way, users of the WavePacket library need no boost installed at all. Check that this works indeed as expected.
    
    +An alternative would be to use a different library; if it is added to the code base, things should work reasonably smoothly.
    +
     Measure the effect of this cleanup on compilation times!
    
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-08-18
    • Milestone: 0.3 goal --> 0.2.3
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-08-22
    • status: open --> assigned
    • assigned_to: Ulf Lorenz
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-09-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -7,3 +7,9 @@
     An alternative would be to use a different library; if it is added to the code base, things should work reasonably smoothly.
    
     Measure the effect of this cleanup on compilation times!
    +
    +----
    +
    +Replaced boost::program_options by the Google gflags library. This library is so lean in basic usage that it does not require any wrapper, so the ProgramOptions class was deleted as well. The gflags library is included as an optional dependency for Wavepacket that is propagated to all dependent programs.
    +
    +Reduction in compilation times is approx. 30s over all build configurations. For the standard (g++, no precompiled headers), this amounts to approx. 5%.
    
    • status: assigned --> done
    • assigned_to: Ulf Lorenz --> nobody
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.