Skip to content

block xxhash warning of c4711 #37442

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

Merged
merged 3 commits into from
Nov 26, 2021
Merged

Conversation

betterpig
Copy link
Contributor

@betterpig betterpig commented Nov 22, 2021

PR types

Others

PR changes

Others

Describe

block xxhash's warning C4711: function * selected for automatic inline expansion when build in windows

  • add /wd4710 /wd4711 in c/cxx_flags to block these warnings
  • add cmake_flags in configure_command

before
image
after
image

@@ -31,6 +31,9 @@ ENDIF()

if (WIN32)
set(XXHASH_LIBRARIES "${XXHASH_INSTALL_DIR}/lib/xxhash.lib")
# block warning about inline function
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4710 /wd4711")
Copy link
Contributor

Choose a reason for hiding this comment

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

这个会影响其他target,直接写到下面吧 -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} /wd4710 /wd4711"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

@zhwesky2010 zhwesky2010 merged commit 6b7c061 into PaddlePaddle:develop Nov 26, 2021
@betterpig betterpig deleted the block_xxhash branch November 26, 2021 06:20
Zjq9409 pushed a commit to Zjq9409/Paddle that referenced this pull request Dec 10, 2021
* block xxhash warning of c4711

* modify according to zhouwei's comment

* fix syntax error
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