Add trivial check for stdatomic.h

This commit is contained in:
Martin Kroeker 2020-07-20 22:52:09 +00:00 committed by GitHub
parent 31d30312dc
commit 9e21a100e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -116,3 +116,10 @@ set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
endif() endif()
file(REMOVE "avx512.c" "avx512.o") file(REMOVE "avx512.c" "avx512.o")
endif() endif()
include(CheckIncludeFile)
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_C11)
if (HAVE_C11 EQUAL 1)
message (STATUS found stdatomic.h)
set (CCOMMON_OPT "${CCOMMON_OPT} -DHAVE_C11")
endif()