From 14d75c0b78e2b222e32cb9896500ddf48a7b1ef4 Mon Sep 17 00:00:00 2001 From: will-v-pi <108662275+will-v-pi@users.noreply.github.com> Date: Tue, 20 May 2025 21:29:41 +0100 Subject: [PATCH] Add printout of picotool location (#2475) 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 5273840a..bb9f7eaa 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()