diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-21 15:26:25 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-21 15:26:25 +0300 |
commit | 5f8561a6bcdb66e05ca539365cce33a9fc1817a2 (patch) | |
tree | 3ceb20e3e0e8fc1a0759199ccdf7238f31fd4267 /configure.cmake | |
parent | 3c2ab896b9642c43805a5dfc174c81fc5f902db0 (diff) | |
parent | 489ef007bec398c3b7b628325b225c3a015922cf (diff) | |
download | mariadb-git-5f8561a6bcdb66e05ca539365cce33a9fc1817a2.tar.gz |
Merge 10.4 into 10.5
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 a78b83bd33c..c97240237e9 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) |