-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
update cmake minimum version to 3.15 #31807
update cmake minimum version to 3.15 #31807
Conversation
Thanks for your contribution! |
@@ -12,7 +12,8 @@ | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License | |||
|
|||
cmake_minimum_required(VERSION 3.10) | |||
cmake_minimum_required(VERSION 3.15) | |||
cmake_policy(VERSION 3.10) |
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.
cmake_policy会影响哪些方面,默认是cmake_policy(VERSION 3.15)就会触发上次那个问题吗
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.
cmake_minimum_required
会内部调用cmake_policy
,会影响cmake一些行为,比如Windows下RuntimeLibrary在3.10从CXX_FLAGS中获取,在高版本中改为从CMAKE_MSVC_RUNTIME_LIBRARY
获取。
这个限制最低版本到3.15,为了保证整体cmake配置与以前一致,显示调用cmake_policy
来保持兼容性。
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.
OK
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.
LGTM
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.
LGTM
PR types
Others
PR changes
Others
Describe
Update CMake minimum version to avoid CMake Error like #31748 .