Skip to content

Fixed build problems with latest Boost library versions [DEX-431] #1322

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ihsandemir
Copy link
Collaborator

Fixed build problems with latest Boost library versions.
Updated the project to use the minimum C++ standard to be the same as the one required by the Boost library. This means if a user is using an older Boost version we use C++11 but if newer Boost version is used we change level to C++ 14 or C++ 17. the algorithm is like this:

    # Check Boost version and set C++ standard accordingly
    # Our library can not use a lower C++ standard than the one required by Boost.
    if (Boost_VERSION VERSION_LESS 1.70)
        set(CMAKE_CXX_STANDARD 11)
    elseif (Boost_VERSION VERSION_LESS 1.77)
        set(CMAKE_CXX_STANDARD 14)
    else()
        set(CMAKE_CXX_STANDARD 17)  # Boost.JSON, Boost.Process, etc.
    endif()

fixes #1253
fixes https://hazelcast.atlassian.net/browse/DEX-431

Added the vcpkg.json for building the project using vcpkg.
Updated the project to use the minimum C++ standard to be the same as the one required by the Boost library. This means if a user is using an older Boost version we use C++11 but if newer Boost version is used we change level to C++ 14 or C++ 17. the algorithm is like this:
```
    # Check Boost version and set C++ standard accordingly
    # Our library can not use a lower C++ standard than the one required by Boost.
    if (Boost_VERSION VERSION_LESS 1.70)
        set(CMAKE_CXX_STANDARD 11)
    elseif (Boost_VERSION VERSION_LESS 1.77)
        set(CMAKE_CXX_STANDARD 14)
    else()
        set(CMAKE_CXX_STANDARD 17)  # Boost.JSON, Boost.Process, etc.
    endif()
```
@ihsandemir ihsandemir added this to the 5.5.0 milestone Jul 16, 2025
@ihsandemir ihsandemir requested review from yuce and JackPGreen July 16, 2025 14:25
@ihsandemir ihsandemir self-assigned this Jul 16, 2025
@yuce
Copy link

yuce commented Jul 17, 2025

@ihsandemir Could you add some reasoning about why language level is set to C++14 for Boost [ 1.70, 1.77) ?
According to release notes for Boost 1.82, it is compatible with C++11: https://www.boost.org/releases/1.82.0/

The new baseline requirement for the above libraries, and for most of Boost, will be C++11.

@ihsandemir
Copy link
Collaborator Author

@ihsandemir Could you add some reasoning about why language level is set to C++14 for Boost [ 1.70, 1.77) ? According to release notes for Boost 1.82, it is compatible with C++11: https://www.boost.org/releases/1.82.0/

The new baseline requirement for the above libraries, and for most of Boost, will be C++11.

I will re-look at these ranges. I believe the AI replied these ranges since some modules started to support later C++ support with those releases. I also observed our PR builder failed with Boost 1.78.0 wince it tried to use C++ 17 as the compiler. I will double check and fix these versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support boost 1.87 [API-2273]
3 participants