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

[C++][Windows] External/shared libthrift requires IMPORTED_IMPLIB in FindThrift.cmake #33437

Closed
asfimport opened this issue Nov 6, 2022 · 1 comment
Assignees
Milestone

Comments

@asfimport
Copy link
Collaborator

As mentioned in ARROW-18255, over at JuliaPackaging/Yggdrasil#5425 we cross-compile Arrow to make it easily available within the Julia ecosystem. 

When compiling with DARROW_THRIFT_USE_SHARED=ON and using an external libthrift, CMAKE warns with:

 

[12:00:54] CMake Warning (dev) in CMakeLists.txt:
[12:00:54]   Policy CMP0111 is not set: An imported target missing its location property
[12:00:54]   fails during generation.  Run "cmake --help-policy CMP0111" for policy
[12:00:54]   details.  Use the cmake_policy command to set the policy and suppress this
[12:00:54]   warning.
[12:00:54]
[12:00:54]   IMPORTED_IMPLIB not set for imported target "thrift::thrift" configuration
[12:00:54]   "RELEASE".
[12:00:54] This warning is for project developers.  Use -Wno-dev to suppress it.
This will lead to linking errors later on. I've fixed the warning with the following patch for v10.

 

diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThrift.cmake
index 2f20a5cb5..2d1e728aa 100644
--- a/cpp/cmake_modules/FindThrift.cmake
+++ b/cpp/cmake_modules/FindThrift.cmake
@@ -146,6 +146,7 @@ if(Thrift_FOUND)
   endif()
   set_target_properties(thrift::thrift
                         PROPERTIES IMPORTED_LOCATION "${THRIFT_LIB}"
+                                   IMPORTED_IMPLIB "${THRIFT_LIB}"
                                    INTERFACE_INCLUDE_DIRECTORIES "${THRIFT_INCLUDE_DIR}")
   if(WIN32 AND NOT MSVC_TOOLCHAIN)
     # We don't need this for Visual C++ because Thrift uses
 

Reporter: Maarten Pronk
Assignee: Kouhei Sutou / @kou

PRs and other links:

Note: This issue was originally created as ARROW-18256. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Kouhei Sutou / @kou:
Issue resolved by pull request 14595
#14595

@asfimport asfimport added this to the 11.0.0 milestone Jan 11, 2023
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

2 participants