From e6c49c127f8e39cebb970232676d1532ba490c29 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Sat, 7 Dec 2024 15:24:15 +0100 Subject: [PATCH] Cmake build: Remove warning about deprecated Compatibility with cmake < 3.10 Also use NEW policy CMP0177, since we already should not use '..' or '.' in destination paths. --- 3rdparty/dtl/CMakeLists.txt | 2 +- 3rdparty/hunspell/CMakeLists.txt | 2 +- 3rdparty/libiconv/CMakeLists.txt | 2 +- 3rdparty/mythes/CMakeLists.txt | 2 +- 3rdparty/zlib/CMakeLists.txt | 2 +- CMakeLists.txt | 5 ++++- development/Win32/vld/cmake/CMakeLists.txt | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/3rdparty/dtl/CMakeLists.txt b/3rdparty/dtl/CMakeLists.txt index 20df178997..7c72b047d4 100644 --- a/3rdparty/dtl/CMakeLists.txt +++ b/3rdparty/dtl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.0) +cmake_minimum_required(VERSION 3.10) set(LYX_IPO_SUPPORTED FALSE) if (POLICY CMP0069) diff --git a/3rdparty/hunspell/CMakeLists.txt b/3rdparty/hunspell/CMakeLists.txt index 00b36491b1..fbb0baccd4 100644 --- a/3rdparty/hunspell/CMakeLists.txt +++ b/3rdparty/hunspell/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.5.0) +cmake_minimum_required(VERSION 3.10) set(LYX_IPO_SUPPORTED FALSE) if (POLICY CMP0069) diff --git a/3rdparty/libiconv/CMakeLists.txt b/3rdparty/libiconv/CMakeLists.txt index cb921d071d..6d2a6fe5fe 100644 --- a/3rdparty/libiconv/CMakeLists.txt +++ b/3rdparty/libiconv/CMakeLists.txt @@ -5,7 +5,7 @@ # Please note that the package source code is licensed under its own license. project ( libiconv C ) -cmake_minimum_required(VERSION 3.5.0) +cmake_minimum_required(VERSION 3.10) set(LYX_IPO_SUPPORTED FALSE) if (POLICY CMP0069) diff --git a/3rdparty/mythes/CMakeLists.txt b/3rdparty/mythes/CMakeLists.txt index 251d4ffc93..dfce98ffca 100644 --- a/3rdparty/mythes/CMakeLists.txt +++ b/3rdparty/mythes/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.0) +cmake_minimum_required(VERSION 3.10) set(LYX_IPO_SUPPORTED FALSE) if (POLICY CMP0069) diff --git a/3rdparty/zlib/CMakeLists.txt b/3rdparty/zlib/CMakeLists.txt index 0b539a58b0..f314adf86a 100644 --- a/3rdparty/zlib/CMakeLists.txt +++ b/3rdparty/zlib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.0) +cmake_minimum_required(VERSION 3.10) set(LYX_IPO_SUPPORTED FALSE) if (POLICY CMP0069) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ee7ad8edc..e32d91b8a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,8 +4,11 @@ # Copyright (c) 2006-2011 Peter Kümmel, # Copyright (c) 2008-2024 Kornel Benko, -cmake_minimum_required(VERSION 3.5.0) +cmake_minimum_required(VERSION 3.10) +if (POLICY CMP0177) + cmake_policy(SET CMP0177 NEW) +endif() set(LYX_PROJECT LyX) # Instruct cmake to not use gnu extensions, # this prevents the mix of '-std=c++*' and '-std=gnu++*' flags diff --git a/development/Win32/vld/cmake/CMakeLists.txt b/development/Win32/vld/cmake/CMakeLists.txt index 5ccbe1572c..c7fab976b8 100644 --- a/development/Win32/vld/cmake/CMakeLists.txt +++ b/development/Win32/vld/cmake/CMakeLists.txt @@ -22,7 +22,7 @@ #// #//////////////////////////////////////////////////////////////////////////////// -cmake_minimum_required(VERSION 3.5.0) +cmake_minimum_required(VERSION 3.10) project(vld)