From: Rafael Kitover Date: Mon, 22 May 2023 22:13:19 +0000 (+0000) Subject: fix: Disable masm on msbuild for blake3 with VS X-Git-Tag: v4.8.2~9^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=350787245e7e894c8a472b176545f59a10e9dadb;p=thirdparty%2Fccache.git fix: Disable masm on msbuild for blake3 with VS Because of some bug with either msbuild or the cmake generator, the C compiler flags are passed to the masm assembler making it fail. Use the C intrinsic versions for blake3 when msbuild is in use. Fix #1278 Signed-off-by: Rafael Kitover --- diff --git a/src/third_party/blake3/CMakeLists.txt b/src/third_party/blake3/CMakeLists.txt index a30342d5d..1e30eb3cf 100644 --- a/src/third_party/blake3/CMakeLists.txt +++ b/src/third_party/blake3/CMakeLists.txt @@ -27,7 +27,11 @@ function(add_source_if_enabled feature msvc_flags others_flags intrinsic) # First check if it's possible to use the assembler variant for the feature. string(TOUPPER "have_asm_${feature}" have_feature) - if(NOT DEFINED "${have_feature}" AND CMAKE_SIZEOF_VOID_P EQUAL 8) + if(NOT DEFINED "${have_feature}" AND CMAKE_SIZEOF_VOID_P EQUAL 8 +# Force intrinsic version for msbuild because of a bug in the cmake generator +# or msbuild itself with masm flags. + AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") + if(NOT CMAKE_REQUIRED_QUIET) message(STATUS "Performing Test ${have_feature}") endif()