aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-09-03 07:20:27 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-09-03 07:20:27 +0200
commitdf66314bb47f1a824f35e9d5c7764305a4f103cb (patch)
tree3e38184de0aaea4f37ee5ba019da8add9b3d0752
parent2736eb8ff2e95daf6ec8b2616d70381054d1a238 (diff)
downloadlibquotient-df66314bb47f1a824f35e9d5c7764305a4f103cb.tar.gz
libquotient-df66314bb47f1a824f35e9d5c7764305a4f103cb.zip
Tacitly allow CMake 3.13 to keep LGTM working
Also: drop olm from the LGTM build environment, it's of no use there for now.
-rw-r--r--.lgtm.yml18
-rw-r--r--CMakeLists.txt9
2 files changed, 15 insertions, 12 deletions
diff --git a/.lgtm.yml b/.lgtm.yml
index f6dfb229..308675a8 100644
--- a/.lgtm.yml
+++ b/.lgtm.yml
@@ -6,15 +6,13 @@ path_classifiers:
extraction:
cpp:
prepare:
- packages: # Assuming package base of cosmic
- - ninja-build
- - qt5-default
+ packages: # Assuming package base of eoan
- qtmultimedia5-dev
- after_prepare:
- - git clone https://gitlab.matrix.org/matrix-org/olm.git
- - pushd olm
- - cmake . -Bbuild -GNinja
- - cmake --build build
- - popd
+# after_prepare:
+# - git clone https://gitlab.matrix.org/matrix-org/olm.git
+# - pushd olm
+# - cmake . -Bbuild -GNinja
+# - cmake --build build
+# - popd
configure:
- command: "cmake . -GNinja -DOlm_DIR=olm/build"
+ command: "cmake . -GNinja" # -DOlm_DIR=olm/build"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c0a39932..7043a653 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.16)
+# Officially CMake 3.16+ is needed but LGTM.com still sits on eoan that only
+# has CMake 3.13
+cmake_minimum_required(VERSION 3.13)
if (POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
@@ -295,7 +297,10 @@ set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY
# C++17 required, C++20 desired (see above)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
-if (NOT CMAKE_CXX_COMPILER_ID STREQUAL GNU) # https://bugzilla.redhat.com/show_bug.cgi?id=1721553
+# TODO: Bump the CMake requirement and drop the version check here once
+# LGTM upgrades
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.16.0"
+ AND NOT CMAKE_CXX_COMPILER_ID STREQUAL GNU) # https://bugzilla.redhat.com/show_bug.cgi?id=1721553
target_precompile_headers(${PROJECT_NAME} PRIVATE lib/converters.h)
endif ()