Changes between Version 3 and Version 4 of CMakeModularizeLibrary


Ignore:
Timestamp:
May 23, 2008, 3:21:58 PM (14 years ago)
Author:
Douglas Gregor
Comment:

How to tell CMake that a library is modular

Legend:

Unmodified
Added
Removed
Modified
  • CMakeModularizeLibrary

    v3 v4  
    4848
    4949Once all of the headers have been moved and the changes have been committed, there should be no remaining headers in the main Boost include directory.
     50
     51= Informing CMake that the library is modular =
     52
     53The CMake build system needs to know that the layout of the Boost library follows the rules of a modular library, which also instructs it to add the appropriate include paths when compiling itself and any of its dependencies. To label the library as modular, edit the `CMakeLists.txt` file contained in the library's subdirectory (e.g., `libs/filesystem/CMakeLists.txt`, and add the argument `MODULAR` to the use of [wikiCMakeLibraryProject `boost_library_project`]. After this change, Filesystem library's `CMakeLists.txt` looks like this:
     54
     55{{{
     56boost_library_project(
     57  Filesystem
     58  SRCDIRS src
     59  TESTDIRS test
     60  MODULAR
     61  DESCRIPTION "Provides portable facilities to query and manipulate paths, files, and directories."
     62  AUTHORS "Beman Dawes <bdawes -at- acm.org>"
     63  )
     64}}}
     65
     66If the library you're modularizing does not have `DESCRIPTION`, `AUTHORS`, or `MAINTAINERS` arguments, please add them! Short library descriptions are available at http://www.boost.org/doc/ along with author information; additional maintainer information can be found in http://svn.boost.org/svn/boost/trunk/libs/maintainers.txt.
     67
     68