Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Commit 3650fff

Browse files
Deepika Upadhyayyurishkuro
andauthored
[thrift] drop stdcxx namespace (#239)
* thrift: drop stdcxx namespace since thrift has dropped support for stdcxx.h that makes jaeger incompatible with latest thrift and hence jaeger failure: /home/ideepika/ceph-primary/ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/thrift-gen/agent_types.h:18:10: fatal error: thrift/stdcxx.h: No such file or directory 18 | #include <thrift/stdcxx.h> | ^~~~~~~~~~~~~~~~~ this change will make jaeger compatible with latest thrift. see: apache/thrift#1677 Signed-off-by: Deepika Upadhyay <[email protected]> * thrift: fix warning due to difference in naming. fixes warning: CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (THRIFT) does not match the name of the calling package (thrift). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): cmake/Findthrift.cmake:92 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:63 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. Signed-off-by: Deepika Upadhyay <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
1 parent 772c3d1 commit 3650fff

25 files changed

+266
-267
lines changed

cmake/Findthrift.cmake

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,62 @@
22

33
# - Find Thrift (a cross platform RPC lib/tool)
44
# This module defines
5-
# THRIFT_VERSION_STRING, version string of ant if found
6-
# THRIFT_LIBRARIES, libraries to link
7-
# THRIFT_INCLUDE_DIR, where to find THRIFT headers
8-
# THRIFT_COMPILER, thrift compiler executable
9-
# THRIFT_FOUND, If false, do not try to use ant
5+
# thrift_VERSION_STRING, version string of ant if found
6+
# thrift_LIBRARIES, libraries to link
7+
# thrift_INCLUDE_DIR, where to find thrift headers
8+
# thrift_COMPILER, thrift compiler executable
9+
# thrift_FOUND, If false, do not try to use ant
1010
# Function
1111
# thrift_gen_cpp(<path to thrift file> <output variable with file list>)
1212
#
1313
# Initial work was done by Cloudera https://github.com/cloudera/Impala
1414
# 2014 - modified by snikulov
1515

16-
# prefer the thrift version supplied in THRIFT_HOME (cmake -DTHRIFT_HOME then environment)
17-
find_path(THRIFT_INCLUDE_DIR
16+
# prefer the thrift version supplied in thrift_HOME (cmake -Dthrift_HOME then environment)
17+
find_path(thrift_INCLUDE_DIR
1818
NAMES
1919
thrift/Thrift.h
2020
HINTS
21-
${THRIFT_HOME}
22-
ENV THRIFT_HOME
21+
${thrift_HOME}
22+
ENV thrift_HOME
2323
/usr/local
2424
/opt/local
2525
PATH_SUFFIXES
2626
include
2727
)
2828

29-
# prefer the thrift version supplied in THRIFT_HOME
30-
find_library(THRIFT_LIBRARIES
29+
# prefer the thrift version supplied in thrift_HOME
30+
find_library(thrift_LIBRARIES
3131
NAMES
3232
thrift libthrift
3333
HINTS
34-
${THRIFT_HOME}
35-
ENV THRIFT_HOME
34+
${thrift_HOME}
35+
ENV thrift_HOME
3636
/usr/local
3737
/opt/local
3838
PATH_SUFFIXES
3939
lib lib64
4040
)
4141

42-
find_program(THRIFT_COMPILER
42+
find_program(thrift_COMPILER
4343
NAMES
4444
thrift
4545
HINTS
46-
${THRIFT_HOME}
47-
ENV THRIFT_HOME
46+
${thrift_HOME}
47+
ENV thrift_HOME
4848
/usr/local
4949
/opt/local
5050
PATH_SUFFIXES
5151
bin bin64
5252
)
5353

54-
if (THRIFT_COMPILER)
55-
exec_program(${THRIFT_COMPILER}
56-
ARGS -version OUTPUT_VARIABLE __thrift_OUT RETURN_VALUE THRIFT_RETURN)
57-
string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+-[a-z]+$" THRIFT_VERSION_STRING ${__thrift_OUT})
54+
if (thrift_COMPILER)
55+
exec_program(${thrift_COMPILER}
56+
ARGS -version OUTPUT_VARIABLE __thrift_OUT RETURN_VALUE thrift_RETURN)
57+
string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+-[a-z]+$" thrift_VERSION_STRING ${__thrift_OUT})
5858

5959
# define utility function to generate cpp files
60-
function(thrift_gen_cpp thrift_file THRIFT_CPP_FILES_LIST THRIFT_GEN_INCLUDE_DIR)
60+
function(thrift_gen_cpp thrift_file thrift_CPP_FILES_LIST thrift_GEN_INCLUDE_DIR)
6161
set(_res)
6262
set(_res_inc_path)
6363
if(EXISTS ${thrift_file})
@@ -67,10 +67,10 @@ if (THRIFT_COMPILER)
6767
if(NOT EXISTS ${CMAKE_BINARY_DIR}/${_target_dir})
6868
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${_target_dir})
6969
endif()
70-
exec_program(${THRIFT_COMPILER}
70+
exec_program(${thrift_COMPILER}
7171
ARGS -o "${CMAKE_BINARY_DIR}/${_target_dir}" --gen cpp ${thrift_file}
7272
OUTPUT_VARIABLE __thrift_OUT
73-
RETURN_VALUE THRIFT_RETURN)
73+
RETURN_VALUE thrift_RETURN)
7474
file(GLOB_RECURSE __result_src "${CMAKE_BINARY_DIR}/${_target_dir}/*.cpp")
7575
file(GLOB_RECURSE __result_hdr "${CMAKE_BINARY_DIR}/${_target_dir}/*.h")
7676
list(APPEND _res ${__result_src})
@@ -82,12 +82,12 @@ if (THRIFT_COMPILER)
8282
else()
8383
message("thrift_gen_cpp: file ${thrift_file} does not exists")
8484
endif()
85-
set(${THRIFT_CPP_FILES_LIST} "${_res}" PARENT_SCOPE)
86-
set(${THRIFT_GEN_INCLUDE_DIR} "${_res_inc_path}" PARENT_SCOPE)
85+
set(${thrift_CPP_FILES_LIST} "${_res}" PARENT_SCOPE)
86+
set(${thrift_GEN_INCLUDE_DIR} "${_res_inc_path}" PARENT_SCOPE)
8787
endfunction()
8888
endif ()
8989

9090

9191
include(FindPackageHandleStandardArgs)
92-
FIND_PACKAGE_HANDLE_STANDARD_ARGS(THRIFT DEFAULT_MSG THRIFT_LIBRARIES THRIFT_INCLUDE_DIR THRIFT_COMPILER)
93-
mark_as_advanced(THRIFT_LIBRARIES THRIFT_INCLUDE_DIR THRIFT_COMPILER THRIFT_VERSION_STRING)
92+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(thrift DEFAULT_MSG thrift_LIBRARIES thrift_INCLUDE_DIR thrift_COMPILER)
93+
mark_as_advanced(thrift_LIBRARIES thrift_INCLUDE_DIR thrift_COMPILER thrift_VERSION_STRING)

src/jaegertracing/thrift-gen/Agent.cpp

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jaegertracing/thrift-gen/Agent.h

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jaegertracing/thrift-gen/AggregationValidator.cpp

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)