Skip to content

Commit

Permalink
update cmake
Browse files Browse the repository at this point in the history
Committed-by: xiaolei.zl from Dev container
  • Loading branch information
zhanglei1949 committed Dec 25, 2024
1 parent 3499ab1 commit 69bb9ee
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions flex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ option(BUILD_ODPS_FRAGMENT_LOADER "Whether to build odps fragment loader" OFF)
option(USE_PTHASH "Whether to use pthash" OFF)
option(OPTIMIZE_FOR_HOST "Whether to optimize on host" ON) # Whether to build optimized code on host
option(USE_STATIC_ARROW "Whether to use static arrow" ON) # Whether to link arrow statically, default is ON
option(ENABLE_OTEL "Whether to enable otel" OFF)

#print options
message(STATUS "Build test: ${BUILD_TEST}")
Expand Down Expand Up @@ -164,14 +165,16 @@ endif ()
find_package(Protobuf REQUIRED)
include_directories(${Protobuf_INCLUDE_DIRS})

find_package(opentelemetry-cpp CONFIG)
if (OPENTELEMETRY_CPP_FOUND)
message(STATUS "opentelemetry-cpp found")
find_package(CURL REQUIRED)
add_definitions(-DHAVE_OPENTELEMETRY_CPP)
else()
message(STATUS "opentelemetry-cpp not found, build without opentelemetry-cpp")
endif ()
if (ENABLE_OTEL)
find_package(opentelemetry-cpp CONFIG)
if (OPENTELEMETRY_CPP_FOUND)
message(STATUS "opentelemetry-cpp found")
find_package(CURL REQUIRED)
add_definitions(-DHAVE_OPENTELEMETRY_CPP)
else()
message(STATUS "opentelemetry-cpp not found, build without opentelemetry-cpp")
endif ()
endif()

# Find Doxygen
if (BUILD_DOC)
Expand Down

0 comments on commit 69bb9ee

Please sign in to comment.