Use manual checks instead of cmake_minimum_required to propagate policies.

This commit is contained in:
levlam 2021-06-13 23:38:48 +03:00
parent aebbac0c37
commit 924286da8f
10 changed files with 30 additions and 10 deletions

View File

@ -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) if (NOT OPENSSL_FOUND)
find_package(OpenSSL REQUIRED) find_package(OpenSSL REQUIRED)

View File

@ -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) if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib") set(CMAKE_INSTALL_LIBDIR "lib")

View File

@ -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) if (NOT DEFINED CMAKE_INSTALL_BINDIR)
set(CMAKE_INSTALL_BINDIR "bin") set(CMAKE_INSTALL_BINDIR "bin")

View File

@ -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) if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib") set(CMAKE_INSTALL_LIBDIR "lib")

View File

@ -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) if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib") set(CMAKE_INSTALL_LIBDIR "lib")

View File

@ -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) if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib") set(CMAKE_INSTALL_LIBDIR "lib")

View File

@ -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 #SOURCE SETS
set(TDTL_SOURCE set(TDTL_SOURCE

View File

@ -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) option(TDUTILS_MIME_TYPE "Generate mime types conversion; requires gperf" ON)

View File

@ -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 # Generates files for MIME type <-> extension conversions
# DEPENDS ON: gperf grep bash/powershell # DEPENDS ON: gperf grep bash/powershell

View File

@ -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 #SOURCE SETS
set(TD_TEST_SOURCE set(TD_TEST_SOURCE