thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zezeng Wang (Jira)" <>
Subject [jira] [Commented] (THRIFT-4394) Incorrect CMake build tree when thrift is added by add_subdirectory
Date Sat, 21 Mar 2020 10:18:00 GMT


Zezeng Wang commented on THRIFT-4394:

I replace CMAKE_BINARY_DIR with CMAKE_CURRENT_BINARY_DIR , it doesn't work. It still Install
in /usr/local/include/thrift/thrift/config.h. May be caused by other reasons,I am working
on this issue and I will submit a PR if there is new progress.

> Incorrect CMake build tree when thrift is added by add_subdirectory
> -------------------------------------------------------------------
>                 Key: THRIFT-4394
>                 URL:
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>         Environment: Ubuntu 16.04, CMake 3.1
>            Reporter: Cheng Chen
>            Priority: Major
> My project uses thrift as a third-party git submodule, and build it using CMake.  I have
a few other third-party submodules, so I added my CMakeLists.txt to build them together, here
is my project tree:
> {code:java}
> -myproj
>     -build (where out-of-source build happens)
>     -src
>         -CMakeLists.txt (to build my project sources)
>     -thirdparty
>         -thrift (using branch 0.11.0 as git submodule)
>         -foo (another git submodule)
>         -CMakeLists.txt (to build all third-party components)
> {code}
> To build all third-party components:
> {code:java}
> myproj/build$ cmake ../thirdparty
> sudo make install
> {code}
> From the output of "make install" there is 
> {code:java}
> -- Installing: /usr/local/include/thrift/thrift/config.h
> {code}
> The expected result is "/usr/local/include/thrift/config.h".
> This is because [thrift/lib/cpp/CMakeLists.txt|]
line 212 uses CMAKE_BINARY_DIR, which your expect is the root binary directory of thrift,
but now is changed because I defined a "wrapper" CMakeLists.txt, hence "thrift/thrift/config.h",
then compile error occurs. Maybe CMAKE_CURRENT_BINARY_DIR is a better option here?

This message was sent by Atlassian Jira

View raw message