Skip to content

Commit

Permalink
cmake: use BOOST_ROOT if building with system boost
Browse files Browse the repository at this point in the history
Signed-off-by: Deepika Upadhyay <[email protected]>
  • Loading branch information
Deepika Upadhyay authored and Omri Zeneva committed May 17, 2022
1 parent bbaafcd commit 19eff9a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmake/modules/BuildOpentelemetry.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ function(build_opentelemetry)
set(opentelemetry_CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DWITH_JAEGER=ON
-DBUILD_TESTING=OFF
-DWITH_EXAMPLES=OFF
-DBoost_INCLUDE_DIR=${CMAKE_BINARY_DIR}/boost/include)
-DWITH_EXAMPLES=OFF)

set(opentelemetry_libs
${opentelemetry_BINARY_DIR}/sdk/src/trace/libopentelemetry_trace.a
Expand All @@ -40,8 +39,11 @@ function(build_opentelemetry)
${opentelemetry_cpp_targets})
endif()

if(NOT WITH_SYSTEM_BOOST)
if(WITH_SYSTEM_BOOST)
list(APPEND opentelemetry_CMAKE_ARGS -DBOOST_ROOT=${BOOST_ROOT})
else()
list(APPEND dependencies Boost)
list(APPEND opentelemetry_CMAKE_ARGS -DBoost_INCLUDE_DIR=${CMAKE_BINARY_DIR}/boost/include)
endif()

include(ExternalProject)
Expand Down

0 comments on commit 19eff9a

Please sign in to comment.