Changes between Initial Version and Version 1 of CMakeLibraryProject


Ignore:
Timestamp:
Jun 12, 2007, 2:37:21 AM (15 years ago)
Author:
Douglas Gregor
Comment:

Documentation imported from Boost CMake module

Legend:

Unmodified
Added
Removed
Modified
  • CMakeLibraryProject

    v1 v1  
     1= CMake Reference: `boost_library_project` =
     2
     3The `boost_library_project` macro defines a Boost library project (e.g., for Boost.Python). It should be used only once per library, in the file `libs/libname/CMakeLists.txt`. The syntax of this macro is:
     4
     5{{{
     6boost_library_project(libname
     7                      [SRCDIRS srcdir1 srcdir2 ...]
     8                      [TESTDIRS testdir1 testdir2 ...])
     9}}}
     10
     11where `libname` is the name of the library (e.g., Python,
     12Filesystem), `srcdir1`, `srcdir2`, etc, are subdirectories containing
     13library sources (for Boost libraries that build actual library
     14binaries), and `testdir1`, `testdir2`, etc, are subdirectories
     15containing regression tests.
     16
     17For libraries that build actual library binaries, this macro adds a
     18option `BUILD_BOOST_LIBNAME` (which defaults to ON). When the option
     19is ON, this macro will include the source subdirectories, and
     20therefore, will build and install the library binary.
     21
     22For libraries that have regression tests, and when testing is
     23enabled globally by the `BUILD_TESTING` option, this macro also
     24defines the `TEST_BOOST_LIBNAME` option (defaults to ON). When ON, the
     25generated makefiles/project files will contain regression tests for
     26this library.
     27
     28== Example ==
     29The Boost.Thread library uses the following invocation of the `boost_library_project` macro, since it has both a compiled library (built in the "src" subdirectory) and regression tests (listed in the "test" subdirectory).
     30
     31{{{
     32boost_library_project(
     33  Thread
     34  SRCDIRS src
     35  TESTDIRS test
     36  )
     37}}}
     38
     39This example is from [http://svn.boost.org/svn/boost/sandbox-branches/boost-cmake/boost_1_34_0/libs/thread/CMakeLists.txt libs/thread/CMakeLists.txt].
     40
     41== Where Defined ==
     42This macro is defined in the Boost Core module in [http://svn.boost.org/svn/boost/sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostCore.cmake tools/build/CMake/BoostCore.cmake]