aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2021-06-13 23:38:48 +0300
committerlevlam <levlam@telegram.org>2021-06-13 23:38:48 +0300
commit924286da8ff5b3d0a42b2e93beada80abb43b4cd (patch)
treee02b597632f44a32b38cdab2a2274334910dd09b
parentaebbac0c37a5447e6064afea4b9c80b331dce92c (diff)
Use manual checks instead of cmake_minimum_required to propagate policies.
-rw-r--r--benchmark/CMakeLists.txt4
-rw-r--r--sqlite/CMakeLists.txt4
-rw-r--r--td/generate/CMakeLists.txt4
-rw-r--r--tdactor/CMakeLists.txt4
-rw-r--r--tddb/CMakeLists.txt4
-rw-r--r--tdnet/CMakeLists.txt4
-rw-r--r--tdtl/CMakeLists.txt4
-rw-r--r--tdutils/CMakeLists.txt4
-rw-r--r--tdutils/generate/CMakeLists.txt4
-rw-r--r--test/CMakeLists.txt4
10 files changed, 30 insertions, 10 deletions
diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt
index 78bb649f5..c4f17cae9 100644
--- a/benchmark/CMakeLists.txt
+++ b/benchmark/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
if (NOT OPENSSL_FOUND)
find_package(OpenSSL REQUIRED)
diff --git a/sqlite/CMakeLists.txt b/sqlite/CMakeLists.txt
index 30ab83e51..091b00cde 100644
--- a/sqlite/CMakeLists.txt
+++ b/sqlite/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib")
diff --git a/td/generate/CMakeLists.txt b/td/generate/CMakeLists.txt
index 7e0e2c6b5..e7f6aea06 100644
--- a/td/generate/CMakeLists.txt
+++ b/td/generate/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
if (NOT DEFINED CMAKE_INSTALL_BINDIR)
set(CMAKE_INSTALL_BINDIR "bin")
diff --git a/tdactor/CMakeLists.txt b/tdactor/CMakeLists.txt
index 3cec195fa..c20af79cd 100644
--- a/tdactor/CMakeLists.txt
+++ b/tdactor/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib")
diff --git a/tddb/CMakeLists.txt b/tddb/CMakeLists.txt
index 05a9dc00d..036f0ca61 100644
--- a/tddb/CMakeLists.txt
+++ b/tddb/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib")
diff --git a/tdnet/CMakeLists.txt b/tdnet/CMakeLists.txt
index b385bc236..c81d031b4 100644
--- a/tdnet/CMakeLists.txt
+++ b/tdnet/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib")
diff --git a/tdtl/CMakeLists.txt b/tdtl/CMakeLists.txt
index b0f83cd98..8b139ddc6 100644
--- a/tdtl/CMakeLists.txt
+++ b/tdtl/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
#SOURCE SETS
set(TDTL_SOURCE
diff --git a/tdutils/CMakeLists.txt b/tdutils/CMakeLists.txt
index 61fd1f1e2..d4ddc09e8 100644
--- a/tdutils/CMakeLists.txt
+++ b/tdutils/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
option(TDUTILS_MIME_TYPE "Generate mime types conversion; requires gperf" ON)
diff --git a/tdutils/generate/CMakeLists.txt b/tdutils/generate/CMakeLists.txt
index c0254e925..82f544934 100644
--- a/tdutils/generate/CMakeLists.txt
+++ b/tdutils/generate/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
# Generates files for MIME type <-> extension conversions
# DEPENDS ON: gperf grep bash/powershell
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index dfba657ef..0a4d9413c 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
+ message(FATAL_ERROR "CMake >= 3.0.2 is required")
+endif()
#SOURCE SETS
set(TD_TEST_SOURCE