Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarp_add_idl adds an extra thrift in the include folder #2044

Closed
xEnVrE opened this issue Jun 6, 2019 · 2 comments
Closed

yarp_add_idl adds an extra thrift in the include folder #2044

xEnVrE opened this issue Jun 6, 2019 · 2 comments

Comments

@xEnVrE
Copy link
Contributor

xEnVrE commented Jun 6, 2019

Describe the bug

I have a project to be built using CMake that uses yarp_add_idl to generate thrift cpp and h files.

Specifically, if $ROOT is the root of the sources, I have the thrift file in $ROOT/thrift/<name>.thrift containing some service of the form service <Name>.

Inside the CMakeLists.txt, I have some lines like

set(${EXE_TARGET_NAME}_THRIFT_HDR thrift/<name>.thrift)

yarp_add_idl(${EXE_TARGET_NAME}_THRIFT_SRC ${${EXE_TARGET_NAME}_THRIFT_HDR})

add_executable(${EXE_TARGET_NAME}
               ${${EXE_TARGET_NAME}_HDR}
               ${${EXE_TARGET_NAME}_SRC}
               ${${EXE_TARGET_NAME}_THRIFT_SRC}
)

Within my sources file, I am including the thrift header using #include <thrift/<Name>.h>

Starting from this commit, I cannot compile the project for the following reasons:

  1. the header file <Name>.h, within the build folder, is placed in build/src/<project-name>/include/thrift/thrift/ instead of build/src/<project-name>/include/thrift/ as happening in the past
  2. the source file <Name>.cpp, that can be found in build/src/<project-name>/src, tries to include thrift/<Name>.h and this fails due to (1)
  3. all my sources try to include thrift/<Name>.h and this fails due to (1)

Configuration:

  • OS: Ubuntu 18.04
  • yarp version: 3.1.101 (this commit)
  • compiler: gcc 5.5.0
@drdanz
Copy link
Member

drdanz commented Jun 6, 2019

Fixed in b15ec0f

@drdanz drdanz closed this as completed Jun 6, 2019
@traversaro
Copy link
Member

traversaro commented Oct 23, 2019

Obviously, this fix broke the code that was assuming that the thrift was indeed in the include folder, see robotology/wearables#56 . : D

Actually that problem seems to be related to another change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants