From bf54d1dcfda5787217d755c517ca5a7a78cda270 Mon Sep 17 00:00:00 2001
From: Florian Franzmann <bwlf@bandrate.org>
Date: Sun, 1 Dec 2019 18:03:18 +0100
Subject: [PATCH 23/35] Use LTO if available

---
 CMakeLists.txt  | 4 ++--
 cmake/lto.cmake | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
 create mode 100644 cmake/lto.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30a1cbf..7109b24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.6)
+cmake_minimum_required(VERSION 3.9)
 
 project(hiberlite)
 
@@ -15,7 +15,7 @@ set(TARGET_NAME hiberlite)
 
 include(linker)
 include(sqlite)
-
+include(lto)
 
 find_package(Threads REQUIRED)
 
diff --git a/cmake/lto.cmake b/cmake/lto.cmake
new file mode 100644
index 0000000..492f29e
--- /dev/null
+++ b/cmake/lto.cmake
@@ -0,0 +1 @@
+set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
-- 
2.24.0

