Repository navigation
CMake warning - policy CMP0135 #116866
Description
Activity
- addedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Dec 12, 2022 Hi @Asmitta-01
This issue doesn't seem to describe a bug or a feature request. Please see https://flutter.dev/community for resources and asking questions like this,
you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you- addedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on Dec 12, 2022 I'm also getting this issue, is it not an issue with the flutter implementation of windows?
Reacted by Michal Valkoun and alphacentauri4711This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Mar 3, 2023 - addedtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.platform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallya: desktopRunning on desktopRunning on desktopa: buildBuilding flutter applications with the toolBuilding flutter applications with the tooland removedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter respondsin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Mar 29, 2023 @cbracken I see this with recent versions of VS; I think it just needs a CMakeList.txt migrator to add the policy (and a corresponding template update for new projects). See
for existing policy settings for similar warnings.flutter/packages/flutter_tools/templates/app_shared/windows.tmpl/CMakeLists.txt.tmpl
Lines 9 to 11 in fa01649
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. cmake_policy(SET CMP0063 NEW) Reacted by Loïc Sharma and Brayan Tiwa1 remaining item
- unlocked this conversation
on Mar 30, 2023 - addedP2Important issues not at the top of the work listImportant issues not at the top of the work list
on Mar 30, 2023 Important repro information I had missed (because I mostly build our 1P plugin examples, and they use
FetchContentfor gtest) is that you need to be building a project that has a download step. In the original report it'sModules/ExternalProject.cmake, and with 1P (and I'm sure a number of 3P) plugins it'sModules/FetchContent.cmake.It might be possible to set the policy in individual files (e.g., our plugin template which also uses
FetchContent), but I'm not sure what happens if there are multiple conflicting declarations. It seems like we should probably still set this at the root level to just avoid the warning for all projects across the board.Alternately, we may want to just migrate our existing
cmake_policyto be version-based instead, so this kind of thing can be fixed in the future by just updating a single version number in the file.but I'm not sure what happens if there are multiple conflicting declarations
It looks like this is harmless, according to the docs:
CMake keeps policy settings on a stack, so changes made by the cmake_policy command affect only the top of the stack. A new entry on the policy stack is managed automatically for each subdirectory to protect its parents and siblings.
But it'll still be easiest for the ecosystem if everyone doesn't have to do this themselves, and the version-based approach seems like a sustainable way to manage this in a single place.
- added a commit that references this issue
on Apr 26, 2023 - added a commit that references this issue
on Apr 26, 2023 - added a commit that references this issue
on Apr 28, 2023 - addedr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
on May 6, 2023 This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on May 20, 2023
Hey
I reinstall windows on my laptop then flutter and all the needed components. I clone my project from git (i was working on it since 3 weeks) and launch it but while debugging a get this warning message:
How can i remove this ?