summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)AuthorFilesLines
2015-02-04Imported Upstream version 1.8.16upstream/1.8.16upstreamSimon McVittie2-1/+5
2014-09-15Imported Upstream version 1.8.8upstream/1.8.8Simon McVittie2-6/+0
2014-01-27Fix of 'dbus-daemon can only handle 64 simultaneous connections on Windows'.Cristian Onet2-0/+6
[Slightly modified by -rh] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71297 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-21Give cmake users some hints/requirements when cross compiling for Windows on ↵Ralf Habacker2-0/+31
Linux. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Let cmake 'make check' run test applications as test group.Ralf Habacker1-11/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename bus-test-launch-helper to test-bus-launch_helper to match common test ↵Ralf Habacker1-2/+2
application naming scheme. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename bus-test to test-bus to match common test application naming scheme.Ralf Habacker1-2/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename spawn-test to test-spawn to match common test application naming scheme.Ralf Habacker1-2/+2
[Same change as for shell-test in the previous commit. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename shell-test to test-shell to match common test application naming scheme.Ralf Habacker1-3/+3
[Add its source file to SOURCES: this test was previously relying on the Automake feature that the default value of foo_bar_SOURCES is foo-bar.c. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename dbus-test to test-dbus to match common test application naming scheme.Ralf Habacker1-2/+2
[reverted the dbus-specification part -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17CMake warning--.Ralf Habacker1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10tests: don't block and wait for a debugger on abortSimon McVittie1-1/+0
In general, I think developers running the tests would expect them to terminate rather than hanging. Developers who want to debug such an abort by attaching a debugger to a live process can still set DBUS_BLOCK_ON_ABORT in the environment. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2014-01-10Use macros for test and helper executable targets on cmake build system.Ralf Habacker5-101/+61
The new macros add_test_executables and add helper_executables provides a platform independent way for specifing dbus test and service applications. On native Windows and Linux/UNIX systems the test applications are directly runable. When cross compiling for Windows on Linux test applications could be executed on the Linux host system with the help of wine and activated binfmt_misc support for wine. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10Add 'check' cmake target to keep in sync with autotools.Ralf Habacker1-0/+14
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10Create session.conf and system.conf for test/data/valid-config-files from ↵Ralf Habacker1-2/+5
*.in files on cmake. We need to patch the listen address. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10Define TEST_BUS_LAUNCH_BINARY for cmake to keep in sync with autotools.Ralf Habacker3-4/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10Use cmake build in executable suffix.Ralf Habacker1-3/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-08Remove obsolete cmake project tags in sub directories; we only have one project.Ralf Habacker4-7/+0
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68506 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-07Add glib support to cmake buildsystem.Ralf Habacker6-42/+186
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68506 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-11-27cmake: fix code styleChengwei Yang1-3/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66453 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-10-08Unify the way to find dbus-daemon test binaryChengwei Yang1-3/+0
There are two ways to find the dbus-daemon for testing. The first one is defined as string at compile stage and the second one is export it from test environment. The first way has limitation that after defined, it's static string, so it's impossible to run installable check. So let's unify to the second way. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37849 [added missing "}" -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16Remove support for platforms with no 64-bit integer typeSimon McVittie1-4/+2
This has been a soft requirement since 1.5.0; anyone on such platforms would have had to configure --without-64-bit, provoking a warning that instructed them to report a D-Bus bug with details of their platform. Nobody has done so, so if anyone still lacks a 64-bit integer type, they're on their own. (Also, I tried the build with --without-64-bit and it's full of fatal compiler warnings, so it's not clear that we're actually losing anything by removing this "feature".) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65429 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-09-16dbus-sysdeps-win: don't include wspiapi.hSimon McVittie2-4/+0
This block provoked a warning on mingw-w64 because we were redefining _inline. According to Ralf's research, it was introduced in 452ff68a: Windows 2000 doesn't have getaddrinfo and related functions in ws2tcpip.h, but does have a shim implementation in wspiapi.h. At the time of 452ff68a, mingw32 didn't have wspiapi.h, so it's unclear why there was a __GNUC__ code path here. The "#define _inline" on that code path looks likely to be some sort of workaround for a faulty version of wspiapi.h? Current mingw-w64 does have wspiapi.h, so we enter the __GNUC__ code path and get the redefinition. dbus no longer supports Windows 2000, so we no longer need wspiapi.h at all, and can rely on XP or later. (Ralf's policy is to only support versions of Windows that are still supported by Microsoft, and Windows 2000 reached the end of its life-cycle in 2010.) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker
2013-09-03Tests: allow dbus-glib to be replaced with use of libdbus-internalSimon McVittie2-2/+4
We only use dbus-glib for its main loop; within dbus, DBusLoop is available as an alternative, although it isn't thread-safe and isn't public API. For tests that otherwise only use libdbus public API, it's desirable to be able to avoid DBusLoop, so we can run them against an installed libdbus as an integration test. However, if we don't have dbus-glib, we're going to have to use an in-tree main loop, which might as well be DBusLoop. The major disadvantage of using dbus-glib is that it isn't safe to link both dbus-1 and dbus-internal at the same time. This is awkward for a future test case that wants to use _dbus_getsid() in dbus-daemon.c, but only on Windows (fd.o #54445). If we use the same API wrapper around both dbus-glib and DBusLoop, we can compile that test against dbus-glib or against DBusLoop, depending on the platform. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-03Define DBUS_COMPILATION externally for all tests that use internal stuffSimon McVittie1-1/+1
It might as well go in the AM_CPPFLAGS rather than in the source code. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-08-28Generate autotools provided PACKAGE_.. and VERSION defines by a cmake macro.Ralf Habacker3-1/+74
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67072 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-28Fixed mingw gcc 4.8.1 complains about double defined macros.Ralf Habacker1-8/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67072 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-23Revert "Factor out DBusAuthorization from DBusTransport"Simon McVittie1-2/+0
This reverts commit 600621dbc8073527a958091316eddfbb490c1032.
2013-08-23Factor out DBusAuthorization from DBusTransportCosimo Alfarano1-0/+2
In order to authorize/reject a connection in a polite way, instead of cutting it off after authentication succeed and Hello() is sent, because authorization failed, we need to factor out some authorization bits from DBusTransport and pass them to DBusAuth. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39720 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-07-01cmake: do not bind to any particular POSIX C standardChengwei Yang1-1/+1
This caused build failures on FreeBSD. Defining _POSIX_C_SOURCE to a particular version will disable common non-POSIX extensions like PF_UNIX, and on some systems will also disable features of later POSIX versions, like IPv6. If we don't ask for a specific version, we'll get some sort of sensible default. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> [made the commit message more concise -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-28tests to embedded tests: replaced in cmake filesChengwei Yang5-10/+11
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28cmake: align dir watch backend detection with autotoolsChengwei Yang2-7/+33
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28cmake: terminate to generate makefiles due to fatal errorChengwei Yang1-2/+2
FATAL isn't a valid key for message according to cmake document here. http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command%3amessage Due to the real fatal error, FATAL_ERROR should be used to terminate cmake from continue generating makefiles. Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28cmake: get rid of useless commented out codeChengwei Yang1-48/+0
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28dir-watch: remove dnotify backendChengwei Yang2-7/+0
dnotify as a dir watch backend is broken since Jan 2010 (almost 3.5 years). According to fd.o: #33001, it's no harm to remove dnotify from this project. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33001 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-28cmake: clean up libxml2 glueChengwei Yang1-5/+3
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-25Explicitly define macros to get less confusing conditionsChengwei Yang1-0/+6
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65990 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-25Convert a{sv} helpers from Stats into generic utility codeSimon McVittie1-0/+2
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-06-25cmake: remove a duplicate line and fix coding styleChengwei Yang1-3/+1
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66142 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-25cmake: fix a typo DBUS_DISABLE_ASSERTS should be DBUS_DISABLE_ASSERTChengwei Yang2-9/+9
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66142 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-24Use Doxyfile.in for cmake build system too.Ralf Habacker2-182/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64875 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-18Fix of cmake xmldoc dependencies chain.Ralf Habacker1-7/+12
This patch fixes an issues that xml documentation is generated on all builds regardless if related files has been changed or not. The patch adds a global xmldoc make target to which all generated html or man files are added as build dependency. Each dependency itself depends on related CMakeLists.txt and the xml file generated from the related xml.in file. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64058 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-18Fixed wrong path for generated xml files when creating man pages with cmake.Ralf Habacker1-5/+5
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64058 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-17Replace individual global-lock variables with an array of DBusRMutex *Simon McVittie1-1/+0
This means we can use a much simpler code structure in data-slot allocators: instead of giving them a DBusRMutex ** at first-allocation, we can just give them an index into the array, which can be done statically. It doesn't make us any more thread-safe-by-default - the mutexes will only actually be used if threads were already initialized - but it's substantially better than nothing. These locks really do have to be recursive: for instance, internal_bus_get() calls dbus_bus_register() under the bus lock, and dbus_bus_register() can call _dbus_connection_close_possibly_shared(), which takes the bus lock. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> Reviewed-by: Anas Nashif <anas.nashif@intel.com>
2013-06-06XML: hard depends on expat and delete libxmlChengwei Yang3-30/+6
[The libxml code path has been broken for at least 2.5 years, and Expat is tiny, so there seems no point in supporting both. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=20253 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-05-10dbus_threads_init_default, dbus_threads_init: be safe to call at any timeSimon McVittie1-0/+1
On Unix, we use a pthreads mutex, which can be allocated and initialized in global memory. On Windows, we use a CRITICAL_SECTION, together with a call to InitializeCriticalSection() from the constructor of a global static C++ object (thanks to Ralf Habacker for suggesting this approach). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-04-29Fixed cmake windows build system bug not installing runtime part of shared ↵Ralf Habacker2-1/+7
libraries into bin dir. This patch also take care of different install directories on unix like os. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-04-18Rename default_message_unix_fds to DEFAULT_MESSAGE_UNIX_FDSSimon McVittie2-2/+2
As Ralf pointed out, we usually use upper-case when substituting variables (apart from "somethingdir", which Autoconf conventionally makes lower-case for some reason). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63682 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-04-18cmake: define default_message_unix_fds so it can be substituted in session.confSimon McVittie2-1/+5
This fixes a regression since 1.7.0: session.conf would be invalid when generated by cmake. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63682 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-04-11Set default maximum number of Unix fds according to OSMatt Fischer1-0/+2
QNX has an arbitrary limit to the number of file descriptors which may be passed in a message, which is smaller than the current default. This patch therefore changes the default from a hardcoded constant to a macro, which is determined at configure time by looking at the host operating system. [This reduces the limit from 4096 (session)/1024 (system) to 128 fds per message on QNX, and 1024 fds per message on other operating systems. I think the reduced session bus limit on other OSs is a reasonable change too, given that the default hard/soft ulimits in Linux are only 4096/1024 fds per process. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61176 Reviewed-by: Simon McVittie <simon.mcvittie.collabora.co.uk>