SDK Compatibility with CMake Version > 4.0

Options
brunod
brunod Newcomer
edited July 14 in EMA

Hello,

I'm facing some issues compiling the SDK with cmake version > 4.0.

I’ve observed that CMake 4.0 drops support for CMakeLists.txt file with version older than 3.5, which appears to be required by the l8w8jwt library (a dependency of the SDK).

Could you please confirm which SDK version supports CMake version > 4.0?

Thank you,

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @brunod

    Thank you for reaching out to us.

    I tested it with cmake version 4.0.3 and it can build the latest code on GitHub with the following command.

    cmake ../ -DBUILD_UNIT_TESTS=OFF -DBUILD_ETA_EXAMPLES=OFF
    

    However, it needs to set the following environment variable.

    export CMAKE_POLICY_VERSION_MINIMUM=3.5
    

    Otherwise, cmake will show the following error.

    CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
    Compatibility with CMake < 3.5 has been removed from CMake.

    Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
    to tell CMake that the project requires at least <min> but has been updated
    to work with policies introduced by <max> or earlier.

    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
  • brunod
    brunod Newcomer

    Hello @Jirapongse ,

    Indeed exporting the CMAKE_POLICY_VERSION_MINIMUM seems to work for a local build. However it's a tricky setup for automated builds.

    Is there a way to easily install all the artefacts (libraries and dependencies) needed by the SDK? I see a similar request at: https://github.com/Refinitiv/Real-Time-SDK/issues/185.

    Somehow to isolate the SDK build from the app.

    Thank you for the prompt response!

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @brunod

    You may report this issue on GitHub for the development team to review and verify.