firebase/firebase-cpp-sdk

[FR] Update the minimum required CMake version

Lyokone opened this issue · 3 comments

Feature proposal

  • Firebase Component: All

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:

cmake_minimum_required(VERSION 3.1)

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

Reference issue firebase/flutterfire#12849

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