summaryrefslogtreecommitdiff
path: root/cmake/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2018-10-21 11:34:13 +0200
committerRalf Habacker <ralf.habacker@freenet.de>2018-10-24 10:03:30 +0200
commit6c95c7e39556c3686cff6945035c0586975b111a (patch)
treeb07a356bc86dc803b8d2336ee14fa41324227740 /cmake/ConfigureChecks.cmake
parentbd6ece893a45e8103a696ee64adc1baa2096c422 (diff)
downloaddbus-6c95c7e39556c3686cff6945035c0586975b111a.tar.gz
Add cmake check for DBUS_USE_SYNC
Reviewed-by: Simon McVittie <smcv@collabora.com> Bug: https://gitlab.freedesktop.org/dbus/dbus/merge_requests/18
Diffstat (limited to 'cmake/ConfigureChecks.cmake')
-rw-r--r--cmake/ConfigureChecks.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
index b31d5b6b..39c2ed5b 100644
--- a/cmake/ConfigureChecks.cmake
+++ b/cmake/ConfigureChecks.cmake
@@ -142,6 +142,14 @@ if (NOT VA_COPY_AS_ARRAY)
set(DBUS_VA_COPY_AS_ARRAY 1 CACHE STRING "'va_lists' cannot be copies as values")
endif()
+CHECK_C_SOURCE_COMPILES("
+int main() {
+ int a = 4;
+ int b = __sync_sub_and_fetch(&a, 4);
+ exit(b);
+}
+" DBUS_USE_SYNC)
+
# missing:
# DBUS_HAVE_GCC33_GCOV