Skip to content

Commit bf6d7db

Browse files
authored
[various] Upgrade googletest to v1.15.2 (#11586)
Running e.g. pigeon tests (`packages\pigeon\tool\test.dart`) with Visual Studio 2026 gives the following error: ``` ############################## # Generating platform_test/ output [start time 22:58:25] Generation complete! ############################## # Running windows_unittests [start time 22:58:29] Building Windows application... CMake Error at D:/Tmp/Coding/git/flutter/packages/packages/pigeon/platform_tests/test_plugin/example/build/windows/x64/_deps/googletest-src/CMakeLists.txt:4 (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. Building Windows application... 6,9s Unable to generate build files # Failed, exit code: 1 Process finished with exit code 1 ``` So upgrading the google tools to v1.15.2 resolves that issue as since [1.12.1](https://github.com/google/googletest/releases/tag/release-1.12.1) the minimum required CMake version is 3.5. Towards flutter/flutter#185597 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent cf84667 commit bf6d7db

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

packages/camera/camera_windows/windows/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ enable_testing()
6868
include(FetchContent)
6969
FetchContent_Declare(
7070
googletest
71-
URL https://github.com/google/googletest/archive/release-1.11.0.zip
71+
URL https://github.com/google/googletest/archive/v1.15.2.zip
7272
)
7373
# Prevent overriding the parent project's compiler/linker settings
7474
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

packages/file_selector/file_selector_linux/linux/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ enable_testing()
3838
include(FetchContent)
3939
FetchContent_Declare(
4040
googletest
41-
URL https://github.com/google/googletest/archive/release-1.11.0.zip
41+
URL https://github.com/google/googletest/archive/v1.15.2.zip
4242
)
4343
# Prevent overriding the parent project's compiler/linker settings
4444
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

packages/file_selector/file_selector_windows/windows/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ enable_testing()
5050
include(FetchContent)
5151
FetchContent_Declare(
5252
googletest
53-
URL https://github.com/google/googletest/archive/release-1.11.0.zip
53+
URL https://github.com/google/googletest/archive/v1.15.2.zip
5454
)
5555
# Prevent overriding the parent project's compiler/linker settings
5656
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

packages/local_auth/local_auth_windows/windows/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enable_testing()
8787
# for a template, but not for a monorepo with many plugins.
8888
FetchContent_Declare(
8989
googletest
90-
URL https://github.com/google/googletest/archive/release-1.11.0.zip
90+
URL https://github.com/google/googletest/archive/v1.15.2.zip
9191
)
9292
# Prevent overriding the parent project's compiler/linker settings
9393
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ enable_testing()
8282
include(FetchContent)
8383
FetchContent_Declare(
8484
googletest
85-
URL https://github.com/google/googletest/archive/release-1.11.0.zip
85+
URL https://github.com/google/googletest/archive/v1.15.2.zip
8686
)
8787
# Prevent overriding the parent project's compiler/linker settings
8888
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

packages/pigeon/platform_tests/test_plugin/windows/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ enable_testing()
8989
include(FetchContent)
9090
FetchContent_Declare(
9191
googletest
92-
URL https://github.com/google/googletest/archive/release-1.11.0.zip
92+
URL https://github.com/google/googletest/archive/v1.15.2.zip
9393
)
9494
# Prevent overriding the parent project's compiler/linker settings
9595
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

packages/url_launcher/url_launcher_linux/linux/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ enable_testing()
3838
include(FetchContent)
3939
FetchContent_Declare(
4040
googletest
41-
URL https://github.com/google/googletest/archive/release-1.11.0.zip
41+
URL https://github.com/google/googletest/archive/v1.15.2.zip
4242
)
4343
# Prevent overriding the parent project's compiler/linker settings
4444
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

packages/url_launcher/url_launcher_windows/windows/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enable_testing()
4545
include(FetchContent)
4646
FetchContent_Declare(
4747
googletest
48-
URL https://github.com/google/googletest/archive/release-1.11.0.zip
48+
URL https://github.com/google/googletest/archive/v1.15.2.zip
4949
)
5050
# Prevent overriding the parent project's compiler/linker settings
5151
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

0 commit comments

Comments
 (0)