Skip to content

refactor: simplify CMake version requirements#107

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
18202781743:master
May 28, 2025
Merged

refactor: simplify CMake version requirements#107
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
18202781743:master

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented May 28, 2025

  1. Removed upper bound restriction on CMake version (3.10...3.27 → 3.10)
  2. Removed explicit CMP0177 policy setting which is now default in newer
    CMake
  3. Maintains minimum version requirement while allowing newer CMake
    versions
  4. Makes build configuration more flexible for different environments

refactor: 简化 CMake 版本要求

  1. 移除了 CMake 版本的上限限制 (从 3.10...3.27 改为 3.10)
  2. 移除了显式的 CMP0177 策略设置,该策略在新版 CMake 中已是默认
  3. 保持最低版本要求的同时允许使用更新的 CMake 版本
  4. 使构建配置对不同环境更具灵活性

Summary by Sourcery

Relax and simplify CMake version requirements to improve build flexibility

Enhancements:

  • Allow use of newer CMake versions beyond the previous upper bound
  • Improve build configuration flexibility across different environments

Build:

  • Require CMake version ≥ 3.10 without an upper bound
  • Remove explicit CMP0177 policy setting

1. Removed upper bound restriction on CMake version (3.10...3.27 → 3.10)
2. Removed explicit CMP0177 policy setting which is now default in newer
CMake
3. Maintains minimum version requirement while allowing newer CMake
versions
4. Makes build configuration more flexible for different environments

refactor: 简化 CMake 版本要求

1. 移除了 CMake 版本的上限限制 (从 3.10...3.27 改为 3.10)
2. 移除了显式的 CMP0177 策略设置,该策略在新版 CMake 中已是默认
3. 保持最低版本要求的同时允许使用更新的 CMake 版本
4. 使构建配置对不同环境更具灵活性
@18202781743 18202781743 requested review from BLumia and mhduiy May 28, 2025 10:46
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • cmake_minimum_required(VERSION 3.10...3.27) 被简化为 cmake_minimum_required(VERSION 3.10),这可能会限制项目的兼容性,因为不再支持从3.10到3.27之间的任何版本。
  • cmake_policy(SET CMP0177 NEW) 被移除,这可能会影响项目的构建行为,因为CMP0177是一个重要的CMake策略,用于处理目标属性和命令的兼容性。

是否建议立即修改:

  • 是,建议恢复 cmake_minimum_required(VERSION 3.10...3.27) 以保持项目的兼容性。
  • 是,建议恢复 cmake_policy(SET CMP0177 NEW) 以确保项目的构建行为符合预期。

@18202781743
Copy link
Contributor Author

/forcemerge

@sourcery-ai
Copy link

sourcery-ai bot commented May 28, 2025

Reviewer's Guide

This refactor streamlines the CMake configuration by dropping the upper-bound version restriction and removing an explicit policy override, preserving the minimum requirement while embracing newer CMake defaults for greater build flexibility.

File-Level Changes

Change Details Files
Relax CMake minimum version bound to remove upper limit
  • Removed the version range in cmake_minimum_required
  • Simplified requirement to a single lower bound of 3.10
CMakeLists.txt
Remove redundant CMP0177 policy override
  • Deleted explicit cmake_policy(SET CMP0177 NEW) line
  • Rely on CMake’s default policy behavior in recent versions
CMakeLists.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-bot
Copy link
Contributor

deepin-bot bot commented May 28, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit 36b2b5e into linuxdeepin:master May 28, 2025
18 of 22 checks passed
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @18202781743 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants