diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-21 16:06:34 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-21 16:06:34 +0300 |
commit | 73f5cbd0b6c1461d1a4c3b69ca9e8e9fb187de92 (patch) | |
tree | 4846b1a8a677f2e7687b4d6ec6bd43db3feccd43 /configure.cmake | |
parent | 78dec1f199458cff30062296b2cf0b42a71d2466 (diff) | |
parent | a0fda162ebd991a60634103f2c9d0735154b9dd3 (diff) | |
download | mariadb-git-73f5cbd0b6c1461d1a4c3b69ca9e8e9fb187de92.tar.gz |
Merge 10.5 into 10.6
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 bfb79ef3217..182855b46f1 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) |