For many reasons, I prefer Boost.UTF to gtest (or other alternatives). I recently decided to use Bazel as my build system, and since I'm essentially at tutorial level, I looked online for a way to use Boost in Bazel, but none of them seems to handle for Boost.UTF, and since this library is not header only (like the ones handled in https://github.com/nelhage/rules_boost), I am not sure how to proceed.
How can I add Boost.UTF to Bazel, so I can use it for my test modules?
Any hint is welcome, thanks.
P.S. The only way to work around the issue I see is to try to install boost on the machine I build with and try to have Bazel use that. I guess that is how it deals with the standard libs anyway.
EDIT: This is the code of my unit test.
btest.cpp
#define BOOST_TEST_MODULE CompactStateTest
#include <boost/test/included/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(Suite1)
BOOST_AUTO_TEST_CASE(Test1)
{
int x(0);
BOOST_CHECK_EQUAL(x, 0);
}
BOOST_AUTO_TEST_SUITE_END()
BUILD (the "Makefile" for bazel)
cc_test(
name = "btest",
srcs = ["btest.cpp",],
deps = ["@boost//:test",],
)