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

Modify the boost version to be >= 1.77 #977

Merged
merged 1 commit into from
Dec 26, 2023
Merged

Conversation

xfangfang
Copy link
Contributor

@xfangfang xfangfang commented Nov 6, 2023

This commit #929 Add one line: #define BOOST_FILESYSTEM_VERSION 4

According to boost changelog 1.77, version 4 was introduced in version boost 1.77.

Users can select Boost.Filesystem version by defining BOOST_FILESYSTEM_VERSION macro to either 3 or 4 when compiling their code.

But cpr looks for boost >= 1.44

# Filesystem
if(CPR_USE_BOOST_FILESYSTEM)
find_package(Boost 1.44 REQUIRED COMPONENTS filesystem)
if(Boost_FOUND)
target_link_libraries(cpr PUBLIC Boost::filesystem)
endif()
endif()

On macOS 14, install the latest boost through homebrew, and with anaconda installed. CPR will incorrectly link boost (1.73) within anaconda during compilation, and report error:

Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3

Copy link
Member

@COM8 COM8 left a comment

Choose a reason for hiding this comment

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

Thanks @xfangfang !

@COM8 COM8 merged commit 3100118 into libcpr:master Dec 26, 2023
46 of 53 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.

2 participants