mirror of
https://github.com/curl/curl.git
synced 2026-04-15 03:21:41 +03:00
cmake: pre-fill HAVE_STDATOMIC_H, HAVE_ATOMIC for mingw-w64
`stdatomic.h` and `_Atomic` were first available in gcc 4.9.0 and llvm/clang 3.6. Set detection values accordingly and save these two detections on configure runs. Closes #16036
This commit is contained in:
parent
25b445e479
commit
d5fb2b29d5
1 changed files with 8 additions and 0 deletions
|
|
@ -45,6 +45,14 @@ if(MINGW)
|
|||
set(HAVE_UTIME_H 1) # wrapper to sys/utime.h
|
||||
set(HAVE_DIRENT_H 1)
|
||||
set(HAVE_OPENDIR 1)
|
||||
if((CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) OR
|
||||
(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6))
|
||||
set(HAVE_STDATOMIC_H 1)
|
||||
set(HAVE_ATOMIC 1)
|
||||
else()
|
||||
set(HAVE_STDATOMIC_H 0)
|
||||
set(HAVE_ATOMIC 0)
|
||||
endif()
|
||||
else()
|
||||
set(HAVE_LIBGEN_H 0)
|
||||
set(HAVE_FTRUNCATE 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue