|
|
@ -52,7 +52,8 @@ function(setup_firmware_target name) |
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" |
|
|
|
) |
|
|
|
get_property(targets GLOBAL PROPERTY VALID_TARGETS) |
|
|
|
set_property(GLOBAL PROPERTY VALID_TARGETS "${targets} ${name}") |
|
|
|
list(APPEND targets ${name}) |
|
|
|
set_property(GLOBAL PROPERTY VALID_TARGETS "${targets}") |
|
|
|
setup_openocd(${name}) |
|
|
|
setup_svd(${name}) |
|
|
|
endfunction() |
|
|
@ -67,8 +68,11 @@ endfunction() |
|
|
|
function(collect_targets) |
|
|
|
get_property(targets GLOBAL PROPERTY VALID_TARGETS) |
|
|
|
list(SORT targets) |
|
|
|
list(JOIN targets " " target_names) |
|
|
|
set(list_target_name "targets") |
|
|
|
add_custom_target(${list_target_name} |
|
|
|
COMMAND cmake -E echo "Valid targets: ${targets}") |
|
|
|
COMMAND cmake -E echo "Valid targets: ${target_names}") |
|
|
|
exclude_from_all(${list_target_name}) |
|
|
|
list(LENGTH targets target_count) |
|
|
|
message("-- ${target_count} targets found for toolchain ${TOOLCHAIN}") |
|
|
|
endfunction() |