Skip to content

Commit 8543f0f

Browse files
committed
Remove property definition, and rename to PICOTOOL_PROCESSING_CONFIGURED and picotool_check_configurable
1 parent c61a06d commit 8543f0f

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

tools/CMakeLists.txt

+12-18
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ define_property(TARGET
7171
BRIEF_DOCS "Extra arguments to pass to uf2 conversion"
7272
FULL_DOCS "Extra arguments to pass to uf2 conversion"
7373
)
74-
define_property(TARGET
75-
PROPERTY PICOTOOL_PROCESSING_DONE
76-
INHERITED
77-
BRIEF_DOCS "Set once post-processing has been completed in CMake"
78-
FULL_DOCS "Set once post-processing has been completed in CMake"
79-
)
8074

8175
# Check pioasm is installed, or build it if not installed
8276
function(pico_init_pioasm)
@@ -152,8 +146,8 @@ function(pico_init_picotool)
152146
endif()
153147
endfunction()
154148

155-
function(picotool_check_not_done TARGET)
156-
get_target_property(done ${TARGET} PICOTOOL_PROCESSING_DONE)
149+
function(picotool_check_configurable TARGET)
150+
get_target_property(done ${TARGET} PICOTOOL_PROCESSING_CONFIGURED)
157151
if (done)
158152
message(FATAL_ERROR "All picotool post-processing functions for \"${TARGET}\" must come before pico_add_extra_outputs(${TARGET})")
159153
endif()
@@ -211,7 +205,7 @@ endfunction()
211205
# dropping, and it will be copied to SRAM by the bootrom before execution.
212206
# This sets PICOTOOL_UF2_PACKAGE_ADDR to PACKADDR.
213207
function(pico_package_uf2_output TARGET PACKADDR)
214-
picotool_check_not_done(${TARGET})
208+
picotool_check_configurable(${TARGET})
215209
set_target_properties(${TARGET} PROPERTIES
216210
PICOTOOL_UF2_PACKAGE_ADDR ${PACKADDR}
217211
)
@@ -221,7 +215,7 @@ endfunction()
221215
# Output the public key hash and other necessary rows to an otp JSON file.
222216
# This sets PICOTOOL_OTP_FILE to OTPFILE.
223217
function(pico_set_otp_key_output_file TARGET OTPFILE)
224-
picotool_check_not_done(${TARGET})
218+
picotool_check_configurable(${TARGET})
225219
set_target_properties(${TARGET} PROPERTIES
226220
PICOTOOL_OTP_FILE ${OTPFILE}
227221
)
@@ -232,7 +226,7 @@ endfunction()
232226
# before loading the binary. This appends the `--clear` argument
233227
# to PICOTOOL_EXTRA_PROCESS_ARGS.
234228
function(pico_load_map_clear_sram TARGET)
235-
picotool_check_not_done(${TARGET})
229+
picotool_check_configurable(${TARGET})
236230
# get and set, to inherit list
237231
get_target_property(extra_args ${TARGET} PICOTOOL_EXTRA_PROCESS_ARGS)
238232
if (extra_args)
@@ -250,7 +244,7 @@ endfunction()
250244
# to PICOTOOL_EXTRA_PROCESS_ARGS if setting the rollback version, or set as compile
251245
# definitions if only setting the major/minor versions.
252246
function(pico_set_binary_version TARGET)
253-
picotool_check_not_done(${TARGET})
247+
picotool_check_configurable(${TARGET})
254248
set(oneValueArgs MAJOR MINOR ROLLBACK)
255249
set(multiValueArgs ROWS)
256250
cmake_parse_arguments(PARSE_ARGV 1 SV "" "${oneValueArgs}" "${multiValueArgs}")
@@ -300,7 +294,7 @@ endfunction()
300294
# Set the UF2 family to use when creating the UF2.
301295
# This sets PICOTOOL_UF2_FAMILY to FAMILY.
302296
function(pico_set_uf2_family TARGET FAMILY)
303-
picotool_check_not_done(${TARGET})
297+
picotool_check_configurable(${TARGET})
304298
set_target_properties(${TARGET} PROPERTIES
305299
PICOTOOL_UF2_FAMILY ${FAMILY}
306300
)
@@ -313,7 +307,7 @@ endfunction()
313307
# specify a common SIGFILE for multiple targets, the SIGFILE property can be
314308
# set for a given scope, and then the SIGFILE argument is optional.
315309
function(pico_sign_binary TARGET)
316-
picotool_check_not_done(${TARGET})
310+
picotool_check_configurable(${TARGET})
317311
# Enforce signing through target properties
318312
set_target_properties(${TARGET} PROPERTIES
319313
PICOTOOL_SIGN_OUTPUT true
@@ -339,7 +333,7 @@ endfunction()
339333
# pico_hash_binary(TARGET)
340334
# Hash the target binary. This sets PICOTOOL_HASH_OUTPUT to true.
341335
function(pico_hash_binary TARGET)
342-
picotool_check_not_done(${TARGET})
336+
picotool_check_configurable(${TARGET})
343337
# Enforce hashing through target properties
344338
set_target_properties(${TARGET} PROPERTIES
345339
PICOTOOL_HASH_OUTPUT true
@@ -350,7 +344,7 @@ endfunction()
350344
# Create the specified partition table from JSON, and embed it in the
351345
# block loop. This sets PICOTOOL_EMBED_PT to PTFILE.
352346
function(pico_embed_pt_in_binary TARGET PTFILE)
353-
picotool_check_not_done(${TARGET})
347+
picotool_check_configurable(${TARGET})
354348
set_target_properties(${TARGET} PROPERTIES
355349
PICOTOOL_EMBED_PT ${PTFILE}
356350
)
@@ -362,7 +356,7 @@ endfunction()
362356
# This sets PICOTOOL_AESFILE to AESFILE, and PICOTOOL_ENC_SIGFILE to SIGFILE
363357
# if present, else PICOTOOL_SIGFILE.
364358
function(pico_encrypt_binary TARGET AESFILE)
365-
picotool_check_not_done(${TARGET})
359+
picotool_check_configurable(${TARGET})
366360
set_target_properties(${TARGET} PROPERTIES
367361
PICOTOOL_AESFILE ${AESFILE}
368362
)
@@ -445,7 +439,7 @@ endfunction()
445439
# all required properties have been set
446440
function(picotool_postprocess_binary TARGET)
447441
set_target_properties(${TARGET} PROPERTIES
448-
PICOTOOL_PROCESSING_DONE true
442+
PICOTOOL_PROCESSING_CONFIGURED true
449443
)
450444
# Read target properties
451445
get_target_property(picotool_sign_output ${TARGET} PICOTOOL_SIGN_OUTPUT)

0 commit comments

Comments
 (0)