Skip to content

Commit 3cfc74b

Browse files
authored
Merge pull request #2726 from martin-frbg/2725-2
Add detection of stdatomic.h for cmake
2 parents fcfb7ff + 9e21a10 commit 3cfc74b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmake/system_check.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,10 @@ set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
116116
endif()
117117
file(REMOVE "avx512.c" "avx512.o")
118118
endif()
119+
120+
include(CheckIncludeFile)
121+
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_C11)
122+
if (HAVE_C11 EQUAL 1)
123+
message (STATUS found stdatomic.h)
124+
set (CCOMMON_OPT "${CCOMMON_OPT} -DHAVE_C11")
125+
endif()

0 commit comments

Comments
 (0)