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

AVRO-4112: [C++][CMake] Do not find Boost when test is not built #3293

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

wgtmac
Copy link
Member

@wgtmac wgtmac commented Jan 17, 2025

What is the purpose of the change

  • Added a CMake option AVRO_USE_BOOST to indicate whether boost is required for non-test targets.
  • Do not find Boost library when test is not required to build.

Verifying this change

  • Manually verified that Boost is not found.
  • Pass CIs.

Documentation

  • Does this pull request introduce a new feature? no

@github-actions github-actions bot added the C++ Pull Requests for C++ binding label Jan 17, 2025
else ()
find_package (Boost 1.38 REQUIRED COMPONENTS iostreams)
if (AVRO_BUILD_TESTS OR AVRO_USE_BOOST)
find_package (Boost 1.38 REQUIRED COMPONENTS system)
Copy link
Member Author

Choose a reason for hiding this comment

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

@thiru-mg I'm not sure if boost/system is required because I haven't found any header inclusion from all source files. Should we remove it as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

After some investigation, I think the system component is required for boost/asio, so let's keep it.

@thiru-mg thiru-mg merged commit 1144cb7 into apache:main Jan 18, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ Pull Requests for C++ binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants