aboutsummaryrefslogtreecommitdiffstats
path: root/.lgtm.yml
diff options
context:
space:
mode:
authorGravatar Jonas Jensen <jonas@semmle.com>2019-03-22 16:34:26 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-03-22 10:24:23 -0700
commit8facd937f86d913d94275abb80bfa4d2b181bbc6 (patch)
tree9316f38ea733929847901b5efd881f54a3222e60 /.lgtm.yml
parentd104506f982955c7486a1bd931ba4fc98a516b5c (diff)
downloadsubsurface-8facd937f86d913d94275abb80bfa4d2b181bbc6.tar.gz
Ubuntu 18.10 LGTM build
I'm about to update the build environment on lgtm.com from Ubuntu 18.04 to 18.10, and this breaks your project. It appears that [libgit2 now depends on libmbedtls](https://packages.ubuntu.com/cosmic/libgit2-dev), and it [didn't do this before](https://packages.ubuntu.com/bionic/libgit2-dev). By default, your project links statically with libgit2, but static linking requires specifying all dependencies of the library, and your builds doesn't specify libmbedtls. I'm working around the problem here by passing the `LIBGIT2_DYNAMIC` option to your CMake script, which makes libgit2 dynamically linked, and dynamically linked libraries don't need to have their transitive dependencies specified. I'm taking this opportunity to make a few more changes to `.lgtm.yml` to prevent problems in the future when we upgrade the build environment. 1. Pass `-DNO_DOCS=ON` to avoid building things we don't need. 2. Pass `DCMAKE_VERBOSE_MAKEFILE=ON` for ease of debugging build problems. 3. Remove the manual list of dependency packages and instead rely on LGTM's automatic dependency detection. The manual dependency list contained version numbers and was therefore not likely to keep working over time. The automatic dependency detection only works in the `configure` and `index` steps, so I moved some lines from `after_prepare` to `configure`. Signed-off-by: Jonas Jensen <jonas@semmle.com>
Diffstat (limited to '.lgtm.yml')
-rw-r--r--.lgtm.yml46
1 files changed, 8 insertions, 38 deletions
diff --git a/.lgtm.yml b/.lgtm.yml
index ce547bac8..f5dc37d57 100644
--- a/.lgtm.yml
+++ b/.lgtm.yml
@@ -4,44 +4,14 @@ path_classifiers:
extraction:
cpp:
- prepare:
- packages:
- - libxml2-dev
- - libxslt1-dev
- - libzip-dev
- - libsqlite3-dev
- - libusb-1.0-0-dev
- - libssl-dev
- - libssh2-1-dev
- - libcurl4-gnutls-dev
- - libkrb5-dev
- - libhttp-parser-dev
- - libgit2-dev
- - libcrypto++-dev
- - libqt5qml5
- - libqt5quick5
- - libqt5svg5-dev
- - libqt5webkit5-dev
- - libsqlite3-dev
- - qml-module-qtlocation
- - qml-module-qtpositioning
- - qml-module-qtquick2
- - qt5-default
- - qt5-qmake
- - qtchooser
- - qtconnectivity5-dev
- - qtdeclarative5-dev
- - qtdeclarative5-private-dev
- - qtlocation5-dev
- - qtpositioning5-dev
- - qtscript5-dev
- - qttools5-dev
- - qttools5-dev-tools
- - qtquickcontrols2-5-dev
- after_prepare:
- - export INSTALL_ROOT=/opt/out
- - export PKG_CONFIG_PATH=$INSTALL_ROOT/lib/pkgconfig:$PKG_CONFIG_PATH
- - bash -x ./scripts/build-libdivecomputer.sh
+ configure:
+ command:
+ - export INSTALL_ROOT=/opt/out
+ - export PKG_CONFIG_PATH=$INSTALL_ROOT/lib/pkgconfig:$PKG_CONFIG_PATH
+ - bash -x ./scripts/build-libdivecomputer.sh
+ - mkdir _lgtm_build_dir
+ - cd _lgtm_build_dir
+ - cmake -DLIBGIT2_DYNAMIC=ON -DNO_DOCS=ON -DCMAKE_VERBOSE_MAKEFILE=ON ..
queries:
- exclude: "cpp/short-global-name"