From a8c79efb75488e4a9958ef9ac9c16593d8793cfa Mon Sep 17 00:00:00 2001 From: Graeme A Stewart Date: Fri, 26 Jan 2024 08:10:00 +0100 Subject: [PATCH] Use CMake found binary path Actually use the binary that CMake found, rather than searching PATH again --- cmake/pythonFormat.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/pythonFormat.cmake b/cmake/pythonFormat.cmake index 92e584760..1e8aea100 100644 --- a/cmake/pythonFormat.cmake +++ b/cmake/pythonFormat.cmake @@ -11,7 +11,7 @@ find_program(BLACK_EXECUTABLE black) if(BLACK_EXECUTABLE) add_custom_target( black - COMMAND black + COMMAND ${BLACK_EXECUTABLE} ${ALL_PYTHON_FILES} ) set_target_properties(black PROPERTIES EXCLUDE_FROM_ALL TRUE) @@ -23,7 +23,7 @@ find_program(FLAKE8_EXECUTABLE flake8) if(FLAKE8_EXECUTABLE) add_custom_target( flake8 - COMMAND flake8 + COMMAND ${FLAKE8_EXECUTABLE} --config=${CMAKE_CURRENT_SOURCE_DIR}/.flake8 ${ALL_PYTHON_FILES} )