From c2efbffcb1ff072c1b590d17f0ae2e683f799d9f Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Sun, 22 Jan 2017 01:01:08 +0100 Subject: [PATCH] Fix CMake warning about minimum version when trying to find KF5 Disable even trying to build the GUI when we deal with a CMake older than 2.8.12. CMake Warning (dev) at /home/milian/projects/compiled/kf5/share/ECM/modules/ECMFindModuleHelpers.cmake:133 (message): Your project should require at least CMake 2.8.12 to use FindKF5.cmake Call Stack (most recent call first): /home/milian/projects/compiled/kf5/share/ECM/find-modules/FindKF5.cmake:52 (ecm_find_package_version_check) CMakeLists.txt:35 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fb2cf0..a643db6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,10 @@ -cmake_minimum_required(VERSION 2.8.9) +if (CMAKE_VERSION VERSION_LESS "2.8.12") + cmake_minimum_required(VERSION 2.8.9) + set(HEAPTRACK_BUILD_GUI OFF) +else() + cmake_minimum_required(VERSION 2.8.12) +endif() + project(heaptrack) enable_testing() -- 2.7.4