Need sample for CMakelist.txt with BOOST.test
Hi, I am newbie, and struggling with testing project that is build in CMakeList.txt for using Boost.Test. project builds successfully and runs too, only problem is when unit test fails BOOST_REQUIRE exits without printing fatal exception message on console. It also doesn't show next failure. I tired compiling same library with g++ command and everything works as expected. however with CMakeList project there is no output I tried setting explicit boost::unit_test::unit_test_log_t::instance().set_threshold_level(boost::unit_test::log_all_errors) also tried with setting # define BOOST_TEST_LOG_LEVEL all but there is no output except fatal error on console. also it doesn't show fatal error for multiple tests/ Can some one please suggest some way to investigate this further/ provide sample CMakeList.txt file that I can compare and see if I am missing anything thanks in advance, Abhay
2015-07-24 0:07 GMT+03:00 Abhay Mhatre
Hi,
Can some one please suggest some way to investigate this further/ provide sample CMakeList.txt file that I can compare and see if I am missing anything
thanks in advance, Abhay
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Show us your CMakeLists.txt I suspect you've used ctest to run it. -- Best Regards, Sergei Nikulov
On 7/23/15 2:07 PM, Abhay Mhatre wrote:
Hi,
I am newbie, and struggling with testing project that is build in CMakeList.txt for using Boost.Test.
project builds successfully and runs too, only problem is when unit test fails BOOST_REQUIRE exits without printing fatal exception message on console. It also doesn't show next failure.
I tired compiling same library with g++ command and everything works as expected. however with CMakeList project there is no output
I tried setting explicit
boost::unit_test::unit_test_log_t::instance().set_threshold_level(boost::unit_test::log_all_errors)
also tried with setting # define BOOST_TEST_LOG_LEVEL all
but there is no output except fatal error on console.
also it doesn't show fatal error for multiple tests/
Can some one please suggest some way to investigate this further/ provide sample CMakeList.txt file that I can compare and see if I am missing anything
thanks in advance, Abhay
At www.blincubator.com there is a section under "simple tools" which describes a convenient and tested way to use CMake to build and test a Boost library. It also includes and sample library "safe numerics" which does this. Also the boost serialization library also includes CMake files to build and test using Cmake which I use on my personal development setup. I hope this is helpful, and would be very much interested in feedback to refine and improve this information. Robert Ramey
Le 23/07/15 23:07, Abhay Mhatre a écrit :
Hi,
I am newbie, and struggling with testing project that is build in CMakeList.txt for using Boost.Test.
project builds successfully and runs too, only problem is when unit test fails BOOST_REQUIRE exits without printing fatal exception message on console. It also doesn't show next failure.
I tired compiling same library with g++ command and everything works as expected. however with CMakeList project there is no output
I tried setting explicit
boost::unit_test::unit_test_log_t::instance().set_threshold_level(boost::unit_test::log_all_errors)
also tried with setting # define BOOST_TEST_LOG_LEVEL all
but there is no output except fatal error on console.
also it doesn't show fatal error for multiple tests/
Can some one please suggest some way to investigate this further/ provide sample CMakeList.txt file that I can compare and see if I am missing anything
thanks in advance, Abhay
Hi, I wrote a section dedicated to that topic in the boost.test documentation: http://www.boost.org/doc/libs/master/libs/test/doc/html/boost_test/section_f... Hope this helps, Best, Raffi
Thanks you so much, CMake example worked for me. On Fri, Jul 31, 2015 at 7:39 AM, Raffi Enficiaud < raffi.enficiaud@mines-paris.org> wrote:
Le 23/07/15 23:07, Abhay Mhatre a écrit :
Hi,
I am newbie, and struggling with testing project that is build in CMakeList.txt for using Boost.Test.
project builds successfully and runs too, only problem is when unit test fails BOOST_REQUIRE exits without printing fatal exception message on console. It also doesn't show next failure.
I tired compiling same library with g++ command and everything works as expected. however with CMakeList project there is no output
I tried setting explicit
boost::unit_test::unit_test_log_t::instance().set_threshold_level(boost::unit_test::log_all_errors)
also tried with setting # define BOOST_TEST_LOG_LEVEL all
but there is no output except fatal error on console.
also it doesn't show fatal error for multiple tests/
Can some one please suggest some way to investigate this further/ provide sample CMakeList.txt file that I can compare and see if I am missing anything
thanks in advance, Abhay
Hi,
I wrote a section dedicated to that topic in the boost.test documentation:
http://www.boost.org/doc/libs/master/libs/test/doc/html/boost_test/section_f...
Hope this helps,
Best, Raffi
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (4)
-
Abhay Mhatre
-
Raffi Enficiaud
-
Robert Ramey
-
Sergei Nikulov