In the add_source_if_enabled function in
src/third_party/blake3/CMakeLists.txt, the suffix variable is unset on a
CMake reconfigure in an already configured build tree. This makes CMake
guess the extension and always choose ā.cā on a reconfigure.
Fix this by always setting the suffix variable.
set(compile_flags "${others_flags}")
endif()
+ if(MSVC)
+ set(suffix "_x86-64_windows_msvc.asm")
+ elseif(WIN32)
+ set(suffix "_x86-64_windows_gnu.S")
+ else()
+ set(suffix "_x86-64_unix.S")
+ endif()
+
# 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(MSVC)
- set(suffix "_x86-64_windows_msvc.asm")
- elseif(WIN32)
- set(suffix "_x86-64_windows_gnu.S")
- else()
- set(suffix "_x86-64_unix.S")
- endif()
-
if(NOT CMAKE_REQUIRED_QUIET)
message(STATUS "Performing Test ${have_feature}")
endif()