Version 1 (modified by 15 years ago) ( diff ) | ,
---|
CMake Macro Reference: boost_test_compile
The boost_test_compile
macro creates a Boost regression test that will be compiled,
but not linked or executed. If the test can be compiled with no
errors, the test passes.
boost_test_compile(testname [source1] [COMPILE_FLAGS compileflags])
testname
is the name of the test. source1
is the name of the source
file that will be built. If no source file is provided, the file
"testname.cpp" will be used instead.
The COMPILE_FLAGS
argument provides additional arguments that will
be passed to the compiler when building this test.
Example
The following invocation of the boost_test_compile
macro defines a regression test named advance
that attempts to compile advance.cpp
. If compilation succeeds, the regression test passes.
boost_test_compile(advance)
This example is from libs/mpl/test/CMakeLists.txt.
Where Defined
This macro is defined in the Boost Testing module in tools/build/CMake/BoostTesting.cmake