Skip to content

Commit

Permalink
YarpIDL: Fix output for nested thrift files
Browse files Browse the repository at this point in the history
Fix #2044
  • Loading branch information
drdanz committed Jun 6, 2019
1 parent 55707b6 commit b15ec0f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cmake/YarpIDL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ function(_YARP_IDL_THRIFT_TO_FILE_LIST file path basename ext gen_srcs_var gen_h
list(APPEND gen_hdrs ${path}/${namespace_dir}/${basename}_common.h)
endif()

string(REGEX REPLACE "/(/|$)" "\\1" gen_srcs "${gen_srcs}")
string(REGEX REPLACE "/(/|$)" "\\1" gen_hdrs "${gen_hdrs}")

set(${gen_srcs_var} ${gen_srcs} PARENT_SCOPE)
set(${gen_hdrs_var} ${gen_hdrs} PARENT_SCOPE)
endfunction()
Expand Down Expand Up @@ -430,6 +433,9 @@ function(_YARP_IDL_ROSMSG_TO_FILE_LIST file path pkg basename ext gen_srcs_var g
endif()
endif()

string(REGEX REPLACE "/(/|$)" "\\1" gen_srcs "${gen_srcs}")
string(REGEX REPLACE "/(/|$)" "\\1" gen_hdrs "${gen_hdrs}")

set(${gen_srcs_var} ${gen_srcs} PARENT_SCOPE)
set(${gen_hdrs_var} ${gen_hdrs} PARENT_SCOPE)
endfunction()
Expand Down Expand Up @@ -527,11 +533,7 @@ function(YARP_ADD_IDL var)
endif()
endforeach()
foreach(gen_file ${gen_hdrs})
if("${family}" STREQUAL "thrift")
set(out "${hdrs_out_dir}/${path}/${gen_file}")
else()
set(out "${hdrs_out_dir}/${gen_file}")
endif()
set(out "${hdrs_out_dir}/${gen_file}")
list(FIND ${var} ${out} x)
if(x EQUAL -1)
list(APPEND output "${out}")
Expand Down

0 comments on commit b15ec0f

Please sign in to comment.