Skip to content

Commit 1d9773b

Browse files
authored
Use proper extension on the avx512 testcase filename
The need to call it .tmp existed only when it was generated by a tmpfile call, and the "-x c" option to tell the compiler it is actually a C source is not universally supported (this broke the test with clang-cl at least)
1 parent c0da205 commit 1d9773b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmake/system_check.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ else()
109109
endif()
110110

111111
if (X86_64 OR X86)
112-
file(WRITE ${PROJECT_BINARY_DIR}/avx512.tmp "#include <immintrin.h>\n\nint main(void){ __asm__ volatile(\"vbroadcastss -4 * 4(%rsi), %zmm2\"); }")
113-
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -c -v -o ${PROJECT_BINARY_DIR}/avx512.o -x c ${PROJECT_BINARY_DIR}/avx512.tmp OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
112+
file(WRITE ${PROJECT_BINARY_DIR}/avx512.c "#include <immintrin.h>\n\nint main(void){ __asm__ volatile(\"vbroadcastss -4 * 4(%rsi), %zmm2\"); }")
113+
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -c -v -o ${PROJECT_BINARY_DIR}/avx512.o ${PROJECT_BINARY_DIR}/avx512.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
114114
if (NO_AVX512 EQUAL 1)
115115
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
116116
endif()
117-
file(REMOVE "avx512.tmp" "avx512.o")
117+
file(REMOVE "avx512.c" "avx512.o")
118118
endif()

0 commit comments

Comments
 (0)