firebase / firebase-cpp-sdk

Firebase C++ SDK
http://firebase.google.com
Apache License 2.0
271 stars 110 forks source link

[FR] Update the minimum required CMake version #1599

Open Lyokone opened 1 month ago

Lyokone commented 1 month ago

Feature proposal

FlutterFire is using Firebase CPP SDK for Windows compatibility. We are getting a warning when compiling

CMake Deprecation Warning at /build/windows/x64/extracted/firebase_cpp_sdk_windows/CMakeLists.txt:17 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

I see that this is caused by this line: https://github.com/firebase/firebase-cpp-sdk/blob/df09d59cd0af503229ed412490e5f3938dbc2c24/release_build_files/CMakeLists.txt#L17

I'm wondering if it's needed to support this minimum CMake.

Reference issue https://github.com/firebase/flutterfire/issues/12849

dconeybe commented 1 month ago

Drive-by comment: This github repo officially documents cmake 3.7 as the minimum-supported version: https://github.com/firebase/firebase-cpp-sdk/blob/main/README.md

HOWEVER, last time I tried, when building for Android the build fails if using cmake 3.7 and I had to use cmake 3.6.

There have been a lot of great features added to cmake since 3.7 so it would be pretty nice to use a newer version as the minimum supported. For example, cmake 3.12 adds a far-better mechanism to find a Python interpreter:

find_package(Python3 COMPONENTS Interpreter REQUIRED)

e.g. https://github.com/firebase/firebase-ios-sdk/blob/02d963ce64a2f2187a058a3746e9ea8fa4ace986/cmake/python_setup.cmake#L79-L86