diff --git a/cmake/external/cryptopp.cmake b/cmake/external/cryptopp.cmake index 913fbfed316d8e5cc35e2d93a80ed720f549442d..27a013c1763a723a38368c108d756e9f170b9810 100644 --- a/cmake/external/cryptopp.cmake +++ b/cmake/external/cryptopp.cmake @@ -22,9 +22,9 @@ SET(CRYPTOPP_TAG CRYPTOPP_8_2_0) IF(WIN32) SET(CRYPTOPP_LIBRARIES "${CRYPTOPP_INSTALL_DIR}/lib/cryptopp-static.lib" CACHE FILEPATH "cryptopp library." FORCE) - # There is a compilation parameter 'FI\"winapifamily.h\"' can't be used correctly + # There is a compilation parameter "/FI\"winapifamily.h\"" or "/FIwinapifamily.h" can't be used correctly # with Ninja on Windows. The only difference between the patch file and original - # file is that the compilation parameters are changed to 'FIwinapifamily.h'. This + # file is that the compilation parameters are changed to '/nologo'. This # patch command can be removed when upgrading to a higher version. if("${CMAKE_GENERATOR}" STREQUAL "Ninja") set(CRYPTOPP_PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PADDLE_SOURCE_DIR}/patches/cryptopp/CMakeLists.txt" "/") diff --git a/patches/cryptopp/CMakeLists.txt b/patches/cryptopp/CMakeLists.txt index c533b707350d69c040d855c720f28605fdcffe8d..d5918d6a1da77005c1ce2d855d878a0c9e3bb3b0 100644 --- a/patches/cryptopp/CMakeLists.txt +++ b/patches/cryptopp/CMakeLists.txt @@ -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") endif () # Enable PIC for all target machines except 32-bit i386 due to register pressures.