From 16299515303a9e709c8a31c5310a2dbd7a303bb2 Mon Sep 17 00:00:00 2001 From: Andrej Dundovic Date: Sat, 25 Nov 2023 18:33:21 +0100 Subject: [PATCH] fix CMake deprication warnings --- CMakeLists.txt | 6 +++--- lib/gtest/googletest/CMakeLists.txt | 2 +- lib/gtest/googletest/cmake/internal_utils.cmake | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd88b062..0bd521e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.1) +cmake_minimum_required (VERSION 3.5) project(hermes C CXX) set(HERMES_RELEASE_VERSION 0.9) @@ -345,8 +345,8 @@ target_link_libraries(hermes ${HERMES_EXTRA_LIBRARIES}) # Python # ---------------------------------------------------------------------------- option(ENABLE_PYTHON "Create python library via Pybind11" OFF) -find_package(PythonInterp) -find_package(PythonLibs) +include(FindPython3) +find_package(Python3 COMPONENTS Interpreter Development) if(ENABLE_PYTHON AND PYTHONLIBS_FOUND) include_directories(${PYTHON_INCLUDE_DIRS}) diff --git a/lib/gtest/googletest/CMakeLists.txt b/lib/gtest/googletest/CMakeLists.txt index a5ff296e..e41e5976 100644 --- a/lib/gtest/googletest/CMakeLists.txt +++ b/lib/gtest/googletest/CMakeLists.txt @@ -53,7 +53,7 @@ else() cmake_policy(SET CMP0048 NEW) project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) endif() -cmake_minimum_required(VERSION 2.8...3.13) +cmake_minimum_required(VERSION 3.5) if (POLICY CMP0063) # Visibility cmake_policy(SET CMP0063 NEW) diff --git a/lib/gtest/googletest/cmake/internal_utils.cmake b/lib/gtest/googletest/cmake/internal_utils.cmake index 2f70f0b0..956f3856 100644 --- a/lib/gtest/googletest/cmake/internal_utils.cmake +++ b/lib/gtest/googletest/cmake/internal_utils.cmake @@ -240,7 +240,8 @@ function(cxx_executable name dir libs) endfunction() # Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE. -find_package(PythonInterp) +include(FindPython3) +find_package (Python3 COMPONENTS Interpreter Development) # cxx_test_with_flags(name cxx_flags libs srcs...) #