From f3d5de18f2bdf89d5923d560420ae23cac051cb8 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 14 Nov 2020 11:45:52 +0800 Subject: DEB: added cmake directive to create compilation database 'compile_commands.json' at build time. This can be used to provide linting, autocompletion, hovering info, go-to-definition and in general other LSP functionality in development environments. Signed-off-by: Michele Calgaro (cherry picked from commit eb16e7c7281e182297581fa8d565561869c81bca) --- debian/_base/dependencies/akode/debian/rules | 1 + debian/_base/dependencies/arts/debian/rules | 17 +++++++++++++++-- debian/_base/dependencies/avahi-tqt/debian/rules | 1 + debian/_base/dependencies/dbus-1-tqt/debian/rules | 1 + debian/_base/dependencies/libart-lgpl/debian/rules | 1 + debian/_base/dependencies/libcaldav/debian/rules | 1 + debian/_base/dependencies/libcarddav/debian/rules | 1 + debian/_base/dependencies/libr/debian/rules | 1 + debian/_base/dependencies/tqca-tls/debian/rules | 1 + debian/_base/dependencies/tqca/debian/rules | 1 + debian/_base/dependencies/tqtinterface/debian/rules | 1 + 11 files changed, 25 insertions(+), 2 deletions(-) (limited to 'debian/_base/dependencies') diff --git a/debian/_base/dependencies/akode/debian/rules b/debian/_base/dependencies/akode/debian/rules index a3ea2722b..c912fbebf 100755 --- a/debian/_base/dependencies/akode/debian/rules +++ b/debian/_base/dependencies/akode/debian/rules @@ -22,6 +22,7 @@ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \ # Build options DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_SKIP_RPATH="OFF" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ diff --git a/debian/_base/dependencies/arts/debian/rules b/debian/_base/dependencies/arts/debian/rules index c3167d04f..708852525 100755 --- a/debian/_base/dependencies/arts/debian/rules +++ b/debian/_base/dependencies/arts/debian/rules @@ -12,8 +12,21 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/cmake.mk include debian/cdbs/debian-tde.mk -DEB_CMAKE_EXTRA_FLAGS := -DPKGCONFIG_INSTALL_DIR="/usr/lib/pkgconfig" -DLIB_SUFFIX="" -DCMAKE_INSTALL_PREFIX="/opt/trinity" -DCONFIG_INSTALL_DIR="/etc/trinity" -DSYSCONF_INSTALL_DIR="/etc/trinity" -DCMAKE_LIBRARY_PATH="/opt/trinity/lib" -DCMAKE_INCLUDE_PATH="/opt/trinity/include/tde" -DAUTODETECT_QT_DIRS="ON" -DCMAKE_VERBOSE_MAKEFILE="ON" -DBUILD_ALL="ON" -DCMAKE_SKIP_RPATH="OFF" -DWITH_GCC_VISIBILITY="ON" \ --DCMAKE_BUILD_TYPE=RelWithDebInfo +DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ + -DPKGCONFIG_INSTALL_DIR="/usr/lib/pkgconfig" \ + -DLIB_SUFFIX="" \ + -DCMAKE_INSTALL_PREFIX="/opt/trinity" \ + -DCONFIG_INSTALL_DIR="/etc/trinity" \ + -DSYSCONF_INSTALL_DIR="/etc/trinity" \ + -DCMAKE_LIBRARY_PATH="/opt/trinity/lib" \ + -DCMAKE_INCLUDE_PATH="/opt/trinity/include/tde" \ + -DAUTODETECT_QT_DIRS="ON" \ + -DCMAKE_VERBOSE_MAKEFILE="ON" \ + -DBUILD_ALL="ON" \ + -DCMAKE_SKIP_RPATH="OFF" \ + -DWITH_GCC_VISIBILITY="ON" \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo DEB_DH_STRIP_ARGS := --dbg-package=arts-trinity-dbg diff --git a/debian/_base/dependencies/avahi-tqt/debian/rules b/debian/_base/dependencies/avahi-tqt/debian/rules index 32d30901d..89f073b9f 100755 --- a/debian/_base/dependencies/avahi-tqt/debian/rules +++ b/debian/_base/dependencies/avahi-tqt/debian/rules @@ -9,6 +9,7 @@ export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,defs -Wl,-O1 # Build options DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_SKIP_RPATH="OFF" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ diff --git a/debian/_base/dependencies/dbus-1-tqt/debian/rules b/debian/_base/dependencies/dbus-1-tqt/debian/rules index 600b2dd68..07781ae3e 100755 --- a/debian/_base/dependencies/dbus-1-tqt/debian/rules +++ b/debian/_base/dependencies/dbus-1-tqt/debian/rules @@ -8,6 +8,7 @@ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \ # Build options DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_SKIP_RPATH="OFF" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ diff --git a/debian/_base/dependencies/libart-lgpl/debian/rules b/debian/_base/dependencies/libart-lgpl/debian/rules index 9f7abd076..86885792c 100755 --- a/debian/_base/dependencies/libart-lgpl/debian/rules +++ b/debian/_base/dependencies/libart-lgpl/debian/rules @@ -12,6 +12,7 @@ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \ # Build options DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_SKIP_RPATH="OFF" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ diff --git a/debian/_base/dependencies/libcaldav/debian/rules b/debian/_base/dependencies/libcaldav/debian/rules index c75240154..bdcb3033c 100755 --- a/debian/_base/dependencies/libcaldav/debian/rules +++ b/debian/_base/dependencies/libcaldav/debian/rules @@ -14,6 +14,7 @@ else endif DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_SKIP_RPATH="OFF" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ diff --git a/debian/_base/dependencies/libcarddav/debian/rules b/debian/_base/dependencies/libcarddav/debian/rules index c75240154..bdcb3033c 100755 --- a/debian/_base/dependencies/libcarddav/debian/rules +++ b/debian/_base/dependencies/libcarddav/debian/rules @@ -14,6 +14,7 @@ else endif DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_SKIP_RPATH="OFF" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ diff --git a/debian/_base/dependencies/libr/debian/rules b/debian/_base/dependencies/libr/debian/rules index 5d37a7e50..808640608 100755 --- a/debian/_base/dependencies/libr/debian/rules +++ b/debian/_base/dependencies/libr/debian/rules @@ -11,6 +11,7 @@ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \ # Build options DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_SKIP_RPATH="OFF" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo diff --git a/debian/_base/dependencies/tqca-tls/debian/rules b/debian/_base/dependencies/tqca-tls/debian/rules index 5ea7b5378..8c2dd70cc 100755 --- a/debian/_base/dependencies/tqca-tls/debian/rules +++ b/debian/_base/dependencies/tqca-tls/debian/rules @@ -8,6 +8,7 @@ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \ && echo xz || echo bzip2) DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCONFIG_INSTALL_DIR="/etc/trinity" \ -DSYSCONF_INSTALL_DIR="/etc/trinity" \ diff --git a/debian/_base/dependencies/tqca/debian/rules b/debian/_base/dependencies/tqca/debian/rules index 5d7f84feb..ec48d0a8d 100755 --- a/debian/_base/dependencies/tqca/debian/rules +++ b/debian/_base/dependencies/tqca/debian/rules @@ -14,6 +14,7 @@ else endif DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_SKIP_RPATH="OFF" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ diff --git a/debian/_base/dependencies/tqtinterface/debian/rules b/debian/_base/dependencies/tqtinterface/debian/rules index 135e9455a..17142c7f0 100755 --- a/debian/_base/dependencies/tqtinterface/debian/rules +++ b/debian/_base/dependencies/tqtinterface/debian/rules @@ -12,6 +12,7 @@ version=Debian Package $(DEB_VERSION) DEB_OPT_FLAG += -DDEBIAN_VERSION=$(DEB_VERSION) DEB_CMAKE_EXTRA_FLAGS := \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -- cgit v1.2.3