Opened 13 years ago

Closed 13 years ago

#3676 closed Bugs (fixed)

Jamfile filesystem lib

Reported by: mczernecki@… Owned by: Beman Dawes
Milestone: Boost 1.42.0 Component: filesystem
Version: Boost 1.41.0 Severity: Problem
Keywords: Cc: miczer@…

Description

Hi.

Filesystem library depends on system library, so that it would be great if Jamfile for filesystem contains usage-requirement that point to the system library so that it is automatically taken into consideration during linking shared libraries (of course when using boost.build for the own project)

Now if one wants to use filesystem library (in case of linking to shared library) one need to link explicitly also system library.

If system library is added to usage-requirements (of project or target) in filesystem Jamfile, then one only need to point filesystem as direct dependency and system library will be linked automaticaly based on usage-requirements.

It also will cause that install-dependencies feature will work correctly and when install-dependencies is on then it will atomatically install system library for filesystem library users (dependants).

I attached two versions of changed Jamfile. One with usage-requirement added to project and one with usage-requirements added to target. Both are good enough and both works.

Best Regards. Michal.

Attachments (3)

Jamfile_project.v2 (990 bytes ) - added by mczernecki@… 13 years ago.
Jamfile_target.v2 (990 bytes ) - added by mczernecki@… 13 years ago.
Jamfile_target.2.v2 (985 bytes ) - added by mczernecki@… 13 years ago.

Download all attachments as: .zip

Change History (4)

by mczernecki@…, 13 years ago

Attachment: Jamfile_project.v2 added

by mczernecki@…, 13 years ago

Attachment: Jamfile_target.v2 added

by mczernecki@…, 13 years ago

Attachment: Jamfile_target.2.v2 added

comment:1 by Vladimir Prus, 13 years ago

Resolution: fixed
Status: newclosed

I believe this was fixed in 1.42, albeit with a slightly different patch. Here's what the current Filesystem Jamfile has to say:

lib boost_filesystem
    : $(SOURCES).cpp ../../system/build//boost_system
    : <link>shared:<define>BOOST_ALL_DYN_LINK=1 # tell source we're building dll's
    :
    : # Boost.Filesystem uses some of Boost.System function in inlined/templated

      # function, so clients that use Boost.Filesystem will have
      # direct refenreces to Boost.System systems. On Windows, this means those
      # clients have to be directly linked to Boost.System. For static linking
      # this happens anyway, and for shared we need to make it happen.
      <target-os>windows,<link>shared:<library>../../system/build//boost_system
    ;
Note: See TracTickets for help on using tickets.