-
Notifications
You must be signed in to change notification settings - Fork 136
chore: update minimum cmake version to 3.22 #1812
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @AustinBenoit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request standardizes the minimum CMake version required for building the Firebase C++ SDK and its various sub-projects to 3.30. This essential maintenance update ensures the SDK remains compatible with contemporary CMake environments, supports external dependencies like FlutterFire, and allows the development team to leverage modern CMake functionalities for more streamlined and efficient build processes. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly updates the minimum required CMake version to 3.30 across all relevant CMakeLists.txt files. This is a valuable maintenance task that will help keep the SDK buildable with modern tools and allow for future improvements to the build scripts. The related changes, such as adding project() calls where they were missing, are also good improvements.
I have one minor suggestion for consistency.
As you noted in the description, this version bump opens the door for modernizing the CMake scripts. As a follow-up, you might consider:
- Replacing
find_program(FIREBASE_PYTHON_EXECUTABLE ...)withfind_package(Python COMPONENTS Interpreter REQUIRED). This is the modern way to find Python and provides an imported targetPython::Interpreter. - Using
FetchContentinstead ofExternalProject_Addfor downloading external dependencies.FetchContentmakes dependencies available at configure time, which can simplify the build logic.
Overall, this is a solid and necessary update.
ios_pod/empty_CMakeLists.txt
Outdated
| # limitations under the License. | ||
|
|
||
| # Stub cmake project to enable pod files to be installed against | ||
| cmake_minimum_required (VERSION 3.30) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Integration test FAILEDRequested by @AustinBenoit on commit 2e370fe
Add flaky tests to go/fpl-cpp-flake-tracker |
|
Ah ok Integration tests / test-tvos-macos-14-tvos_simulator (pull_request) and Integration tests / test-desktop-windows-latest-x86-boringssl (pull_request) look to be failing due to other issues. I'll put fixes up for them and see where we are. |
3.30 was causing issues with the Android builds so it makes more sense to start with a 3.22 upgrade and then try for 4.X upgrade later. We will still get most of pros when doing this upgrade anyways.
dbb69b6 to
c98cc61
Compare
release_build_files/CMakeLists.txt
Outdated
| cmake_minimum_required(VERSION 3.22) | ||
|
|
||
| cmake_minimum_required(VERSION 3.1) | ||
| project (firebase_prebuilt NONE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of adding the project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to get rid of a warning in version < 3.15 cmake just implicitly adds a project https://cmake.org/cmake/help/v3.14/command/project.html#usage
From the 3.14 docs:
The top-level CMakeLists.txt file for a project must contain a literal, direct call to the project() command; loading one through the include() command is not sufficient. If no such call exists CMake will implicitly add one to the top that enables the default languages (C and CXX).
But 3.15+ Cmake will now issue a warning if you don't explicitly set a project
https://cmake.org/cmake/help/v3.14/command/project.html#usage
From the 3.15 docs:
The top-level CMakeLists.txt file for a project must contain a literal, direct call to the project() command; loading one through the include() command is not sufficient. If no such call exists, CMake will issue a warning and pretend there is a project(Project) at the top to enable the default languages (C and CXX).
Just want to suppress the warning
ios_pod/empty_CMakeLists.txt
Outdated
| cmake_minimum_required (VERSION 3.1) | ||
|
|
||
| project (GetPods CXX) | ||
| project (empty CXX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why rename the project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, that is an artifact of playing around with things to see what they all did. Reverted.
Description
We are limited to 3.22 as the current version of android we are using has this as the default version included.
Testing
Build everything locally and will run full test on this change.
Type of Change
Place an
xthe applicable box:Notes
Release Notessection ofrelease_build_files/readme.md.