Changes between Version 1 and Version 2 of CMakeAddingRegressionTests


Ignore:
Timestamp:
Nov 6, 2008, 4:31:38 PM (14 years ago)
Author:
imikejackson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CMakeAddingRegressionTests

    v1 v2  
    44In this page, we will assume that your library resides in the subdirectory `libs/libname`, and that tests for this library are stored in `libs/libname/test`. The test directory should be listed via `TESTDIRS` in the use of the [wiki:CMakeLibraryProject boost_library_project macro], as described in an earlier section, [wiki:CMakeAddingALibrary "Adding a Library to CMake"]. Follow these steps to add this new library into Boost's build system. If your library has multiple testing directories listed after `TESTDIRS`, follow these steps for each one.
    55
    6   1. Create a new file `libs/libname/test/CMakeLists.txt` file with your favorite text editor. This file will contain instructions for building and running each of the regression tests for your library. If you reconfigure CMake now (i.e., by running `ccmake` or `cmake` from the command line, or using the Windows CMake GUI), you will see a new option `BOOST_TEST_LIBNAME`. This option allows you to turn on or off regression testing for your library.
     6  1. Create a new file `libs/libname/test/CMakeLists.txt` file with your favorite text editor. This file will contain instructions for building and running each of the regression tests for your library.
     7
     8  1a. If your regression test depends on any other part of boost then you will need to inform the build system of such with the following line:
     9{{{
     10  boost_additional_test_dependencies(libname BOOST_DEPENDS test fusion)
     11}}}
    712
    813  2. For each test that only needs to be compiled (but not executed), add a `compile` or `compile_fail` test using the [wiki:CMakeTestCompile boost_test_compile] or [wiki:CMakeTestCompileFail boost_test_compile_fail] macros, respectively. The most basic usage of these macros provides only the test name, e.g.,