Skip to content

Commit 14d75c0

Browse files
authored
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
1 parent 550aa09 commit 14d75c0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ function(pico_init_picotool)
139139
endif()
140140
endif()
141141

142+
if (TARGET picotool AND NOT DEFINED ENV{_PICOTOOL_FOUND_THIS_RUN})
143+
# Internal environment variable to prevent printing multiple times
144+
set(ENV{_PICOTOOL_FOUND_THIS_RUN} 1)
145+
146+
get_property(picotool_location TARGET picotool PROPERTY LOCATION)
147+
message("Using picotool from ${picotool_location}")
148+
endif()
149+
142150
if (TARGET picotool)
143151
set(picotool_FOUND 1 PARENT_SCOPE)
144152
else()

0 commit comments

Comments
 (0)