From fecf02a342e9b69b6f4890023eb688e87a514036 Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Mon, 19 May 2025 17:09:39 +0100 Subject: [PATCH] Add printout of picotool location This prints out the location of the picotool executable being used For example: * `Using picotool from /usr/local/bin/picotool` for a system install * `Using picotool from /home/name/pico-examples/build/_deps/picotool/picotool` for a picotool fetched by the SDK --- tools/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 5273840a5..bb9f7eaa3 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -139,6 +139,14 @@ function(pico_init_picotool) endif() endif() + if (TARGET picotool AND NOT DEFINED ENV{_PICOTOOL_FOUND_THIS_RUN}) + # Internal environment variable to prevent printing multiple times + set(ENV{_PICOTOOL_FOUND_THIS_RUN} 1) + + get_property(picotool_location TARGET picotool PROPERTY LOCATION) + message("Using picotool from ${picotool_location}") + endif() + if (TARGET picotool) set(picotool_FOUND 1 PARENT_SCOPE) else()