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

block warning when building cryptopp in windows with ninja #37890

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

betterpig
Copy link
Contributor

@betterpig betterpig commented Dec 6, 2021

PR types

Others

PR changes

Others

Describe

Both "/FI"winapifamily.h"" and "/FIwinapifamily.h" will cause compile warning when building cryptopp in windows with ninja, so I substitute it by "/nologo" to block showing of copyright by the way.
before
Popeieht (C) Microsote Corporation  All rights revsrved
after
image

@paddle-bot-old
Copy link

paddle-bot-old bot commented Dec 6, 2021

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

@@ -447,7 +447,7 @@ if (MSVC)
if (CMAKE_SYSTEM_VERSION MATCHES "10\\.0.*")
list(APPEND CRYPTOPP_COMPILE_DEFINITIONS "_WIN32_WINNT=0x0A00")
endif ()
list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FIwinapifamily.h")
list(APPEND CRYPTOPP_COMPILE_OPTIONS "/nologo")
Copy link
Contributor

@zhwesky2010 zhwesky2010 Dec 7, 2021

Choose a reason for hiding this comment

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

FIwinapifamily.h起什么作用,nologo起什么作用,有没可能去除patches。patches一般都是冗余代码,如果没有必须的作用,尽可能去除

Copy link
Contributor Author

@betterpig betterpig Dec 7, 2021

Choose a reason for hiding this comment

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

  • /FI:添加预处理的包含文件。
  • winapifamily.h 是在开发不同平台(win32桌面应用、手机商店应用、游戏和app等)的app时用来指定Windows api家族用的,当指定为某平台时,在编译时将隐藏其他平台的APIS。
  • /nologo:去除版权显示
    image
  • 若去除patches,则需要改动cryptopp的源文件CMakeLists.txt, 以删除"/FIwinapifamily.h"选项,相比pathes在版权方面没那么好。

@zhwesky2010 zhwesky2010 merged commit ca6ff1f into PaddlePaddle:develop Dec 7, 2021
Zjq9409 pushed a commit to Zjq9409/Paddle that referenced this pull request Dec 10, 2021
@betterpig betterpig deleted the block_cryptopp branch February 18, 2022 06:45
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