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

Fix CMake to support being a subproject #29

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

wgtmac
Copy link
Member

@wgtmac wgtmac commented Jan 14, 2025

We borrowed a lot of CMake implementation from Apache Arrow (including function names and module file names). The conflicting names make it difficult to be used as a subproject. This PR fix this by adding a Iceberg prefix.

Closes #28

@wgtmac
Copy link
Member Author

wgtmac commented Jan 14, 2025

@zhjwpku Could you please try this?

cmake_minimum_required(VERSION 3.25)

project(dummy
        VERSION 0.1.0
        LANGUAGES CXX)

include(FetchContent)
fetchcontent_declare(Iceberg
                     GIT_REPOSITORY https://github.com/wgtmac/iceberg-cpp.git
                     GIT_TAG 19ea3f03895205a658aca083b66b732d527398a2)
set(ICEBERG_ARROW ON CACHE BOOL "" FORCE)
fetchcontent_makeavailable(Iceberg)

message(STATUS "iceberg_SOURCE_DIR: ${iceberg_SOURCE_DIR}")
message(STATUS "iceberg_BINARY_DIR: ${iceberg_BINARY_DIR}")

Copy link
Contributor

@zhjwpku zhjwpku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works! Thanks for the quick fix ;)

@wgtmac
Copy link
Member Author

wgtmac commented Jan 14, 2025

Thanks for the confirmation! @zhjwpku

@Fokko @Xuanwo Could you please merge this? It is a minor fix.

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @wgtmac for the quick fix. Let's move.

@Xuanwo Xuanwo merged commit 9a04468 into apache:main Jan 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CMake] usage problem
3 participants