1 function(setup_svd target_exe target_name)
2 get_property(svd_name TARGET ${target_exe} PROPERTY SVD)
3 set(svd_target_name "svd_${target_name}")
4 if (svd_name AND NOT svd_name STREQUAL "")
5 add_custom_target(${svd_target_name}
6 COMMAND ${CMAKE_COMMAND} -E copy
7 ${SVD_DIR}/${svd_name}.svd
8 ${CMAKE_BINARY_DIR}/svd/${target_name}.svd
11 add_custom_target(${svd_target_name}
12 ${CMAKE_COMMAND} -E echo "target ${target_name} does not declare an SVD filename"
13 COMMAND ${CMAKE_COMMAND} -E false)
15 exclude_from_all(${svd_target_name})