Skip to content
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

Merged
merged 5 commits into from
Mar 31, 2021

Conversation

Avin0323
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

Update CMake minimum version to avoid CMake Error like #31748 .

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@@ -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)
Copy link
Contributor

@zhwesky2010 zhwesky2010 Mar 31, 2021

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)就会触发上次那个问题吗

Copy link
Contributor Author

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来保持兼容性。

Copy link
Contributor

Choose a reason for hiding this comment

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

OK

Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhwesky2010 zhwesky2010 merged commit 3a95a0b into PaddlePaddle:develop Mar 31, 2021
@Avin0323 Avin0323 deleted the update-cmake-version branch September 16, 2021 03:24
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.

3 participants