Skip to content

Commit

Permalink
cmake: include boost header files
Browse files Browse the repository at this point in the history
thrift has boost as their header dependency; when building with self compiled boost,
we will end up failing because of missing location for boost headers:
/usr/bin/ar qc ../../lib/liblibrados_impl.a  CMakeFiles/librados_impl.dir/IoCtxImpl.cc.o CMakeFiles/librados_impl.dir/RadosXattrIter.cc.o CMakeFiles/librados_impl.dir/RadosClient.cc.o CMakeFiles/librados_impl.dir/librados_util.cc.o CMakeFiles/librados_impl.dir/librados_tp.cc.o
In file included from /usr/include/thrift/transport/TTransport.h:24,
                 from /usr/include/thrift/protocol/TProtocol.h:28,
                 from /usr/include/thrift/TProcessor.h:24,
                 from /usr/include/thrift/TDispatchProcessor.h:22,
                 from /build/ceph-17.0.0-10478-gd6aaf1fa/src/opentelemetry-cpp/exporters/jaeger/thrift-gen/Agent.h:10,
                 from /build/ceph-17.0.0-10478-gd6aaf1fa/src/opentelemetry-cpp/exporters/jaeger/thrift-gen/Agent.cpp:7:
/usr/include/thrift/transport/TTransportException.h:23:10: fatal error: boost/numeric/conversion/cast.hpp: No such file or directory

to be more cautious, we use FindBoost.cmake variable Boost_INCLUDE_DIRS
specified so that boost installing path is available for opentelemetry
to consume.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
  • Loading branch information
Deepika Upadhyay committed Feb 4, 2022
1 parent 387a8d1 commit f71c301
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ if(WITH_JAEGER)
find_package(Thrift QUIET)
if(Thrift_FOUND)
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
else()
# Install Thrift and propagate via vcpkg toolchain file
if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE))
Expand Down

0 comments on commit f71c301

Please sign in to comment.