You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2015/09/29 21:04:04 UTC
[jira] [Resolved] (THRIFT-3321) Thrift can't be added as a
subdirectory of another CMake-based project
[ https://issues.apache.org/jira/browse/THRIFT-3321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Meier resolved THRIFT-3321.
---------------------------------
Resolution: Fixed
Assignee: Roger Meier
committed thanks
> Thrift can't be added as a subdirectory of another CMake-based project
> ----------------------------------------------------------------------
>
> Key: THRIFT-3321
> URL: https://issues.apache.org/jira/browse/THRIFT-3321
> Project: Thrift
> Issue Type: Bug
> Components: Build Process
> Reporter: Frane Šarić
> Assignee: Roger Meier
> Priority: Minor
> Labels: cmake
> Attachments: fix_cpackconfig.patch
>
>
> I wanted my CMake-based project to build thrift as a dependency, so I added the following to my CMakeLists.txt:
> {code}
> set(BUILD_COMPILER OFF CACHE BOOL "")
> set(BUILD_TESTING OFF CACHE BOOL "")
> set(BUILD_EXAMPLES OFF CACHE BOOL "")
> set(BUILD_TUTORIALS OFF CACHE BOOL "")
> set(BUILD_LIBRARIES ON CACHE BOOL "")
> set(BUILD_C_GLIB OFF CACHE BOOL "")
> set(BUILD_JAVA OFF CACHE BOOL "")
> set(BUILD_PYTHON OFF CACHE BOOL "")
> add_subdirectory(thrift)
> {code}
> The build process fails because {{build/cmake/CPackConfig.cmake}} fails to find {{README.md}} and {{LICENSE}} files. It fails to find them because it uses {{CMAKE_SOURCE_DIR}} instead of {{CMAKE_CURRENT_SOURCE_DIR}}. After changing {{CMAKE_SOURCE_DIR}} to {{CMAKE_CURRENT_SOURCE_DIR}} everything works as expected.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)