From a9e73ced116fe7ecf185f6c404622a78d17a6574 Mon Sep 17 00:00:00 2001 From: Fabien Date: Mon, 21 Oct 2024 18:08:52 +0200 Subject: [PATCH] [cmake] Remove redundant find_package(Python) Summary: These calls are no-op because the FindPython for the interpreter is already called in the main CMakeLists.txt (and the variable is cached). Also these calls don't make it mandatory nor enforce a minimum version which is confusing. Test Plan: ninja all check-all Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D16947 --- cmake/modules/Coverage.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/modules/Coverage.cmake b/cmake/modules/Coverage.cmake index 4dce5e5f..3c8e2813 100644 --- a/cmake/modules/Coverage.cmake +++ b/cmake/modules/Coverage.cmake @@ -55,8 +55,7 @@ function(enable_coverage ENABLE_BRANCH_COVERAGE) find_program_or_fail(GCOV_EXECUTABLE gcov) find_program_or_fail(GENHTML_EXECUTABLE genhtml) find_program_or_fail(CXXFILT_EXECUTABLE c++filt) - find_package(Python3 COMPONENTS Interpreter REQUIRED) - set(__COVERAGE_PYTHON "${Python3_EXECUTABLE}" CACHE PATH "Path to the Python interpreter") + set(__COVERAGE_PYTHON "${Python_EXECUTABLE}" CACHE PATH "Path to the Python interpreter") get_property(_project_languages GLOBAL PROPERTY ENABLED_LANGUAGES) set(COVERAGE_FLAG --coverage)