diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-21 14:57:00 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-21 14:57:00 +0300 |
commit | 489ef007bec398c3b7b628325b225c3a015922cf (patch) | |
tree | 7d1d5b1ea2c55d608f8697377776b9777fa622be /configure.cmake | |
parent | d10c42b42541deed899dd1d1e04b69475339196c (diff) | |
parent | d5bcccdabbf1a23c75ab4ee0c14149eb6ed27d98 (diff) | |
download | mariadb-git-489ef007bec398c3b7b628325b225c3a015922cf.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/configure.cmake b/configure.cmake index c7d992812bf..d2111c2a91e 100644 --- a/configure.cmake +++ b/configure.cmake @@ -866,7 +866,25 @@ int main() long long int *ptr= &var; return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); }" -HAVE_GCC_C11_ATOMICS) +HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) +IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) + SET(HAVE_GCC_C11_ATOMICS True) +ELSE() + SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) + LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") + CHECK_CXX_SOURCE_COMPILES(" + int main() + { + long long int var= 1; + long long int *ptr= &var; + return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); + }" + HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + SET(HAVE_GCC_C11_ATOMICS True) + ENDIF() + SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) +ENDIF() IF(WITH_VALGRIND) SET(HAVE_valgrind 1) |