Fix build issues with spaces and parentheses (#1136)
Add VERBATIM to add_custom_command Fixes #1043
This commit is contained in:
parent
56594e75af
commit
0b52603667
@ -3,18 +3,20 @@
|
||||
enable_language(ASM)
|
||||
|
||||
function(pico_add_hex_output TARGET)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex $<TARGET_FILE:${TARGET}> $<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.hex)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex $<TARGET_FILE:${TARGET}> $<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.hex
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
function(pico_add_bin_output TARGET)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${TARGET}> $<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.bin)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${TARGET}> $<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.bin
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
function(pico_add_dis_output TARGET)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_OBJDUMP} -h $<TARGET_FILE:${TARGET}> >$<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.dis
|
||||
COMMAND ${CMAKE_OBJDUMP} -d $<TARGET_FILE:${TARGET}> >>$<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.dis
|
||||
)
|
||||
COMMAND ${CMAKE_OBJDUMP} -h $<TARGET_FILE:${TARGET}> > $<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.dis
|
||||
COMMAND ${CMAKE_OBJDUMP} -d $<TARGET_FILE:${TARGET}> >> $<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.dis
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
function(pico_add_extra_outputs TARGET)
|
||||
|
@ -63,12 +63,13 @@ function(pico_define_boot_stage2 NAME SOURCES)
|
||||
find_package (Python3 REQUIRED COMPONENTS Interpreter)
|
||||
|
||||
add_custom_target(${NAME}_bin DEPENDS ${ORIGINAL_BIN})
|
||||
add_custom_command(OUTPUT ${ORIGINAL_BIN} DEPENDS ${NAME} COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${NAME}> ${ORIGINAL_BIN})
|
||||
add_custom_command(OUTPUT ${ORIGINAL_BIN} DEPENDS ${NAME} COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${NAME}> ${ORIGINAL_BIN}
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(${NAME}_padded_checksummed_asm DEPENDS ${PADDED_CHECKSUMMED_ASM})
|
||||
add_custom_command(OUTPUT ${PADDED_CHECKSUMMED_ASM} DEPENDS ${ORIGINAL_BIN}
|
||||
COMMAND ${Python3_EXECUTABLE} ${PICO_BOOT_STAGE2_DIR}/pad_checksum -s 0xffffffff ${ORIGINAL_BIN} ${PADDED_CHECKSUMMED_ASM}
|
||||
)
|
||||
VERBATIM)
|
||||
|
||||
add_library(${NAME}_library INTERFACE)
|
||||
add_dependencies(${NAME}_library ${NAME}_padded_checksummed_asm)
|
||||
|
@ -58,7 +58,7 @@ if (EXISTS ${PICO_CYW43_DRIVER_PATH}/${CYW43_DRIVER_TEST_FILE})
|
||||
--redefine-sym _binary_${CYW43_FIRMWARE_BIN_}_end=${CYW43_FIRMWARE_PRETTY}_end
|
||||
--redefine-sym _binary_${CYW43_FIRMWARE_BIN_}_size=${CYW43_FIRMWARE_PRETTY}_size
|
||||
${CYW43_FIRMWARE_BIN} ${CYW43_FIRMWARE_OBJ}
|
||||
)
|
||||
VERBATIM)
|
||||
|
||||
add_library(cyw43_driver_picow INTERFACE)
|
||||
target_sources(cyw43_driver_picow INTERFACE
|
||||
|
@ -33,7 +33,7 @@ function(pico_generate_pio_header TARGET PIO)
|
||||
add_custom_command(OUTPUT ${HEADER}
|
||||
DEPENDS ${PIO}
|
||||
COMMAND Pioasm -o ${OUTPUT_FORMAT} ${PIO} ${HEADER}
|
||||
)
|
||||
VERBATIM)
|
||||
add_dependencies(${TARGET} ${HEADER_GEN_TARGET})
|
||||
get_target_property(target_type ${TARGET} TYPE)
|
||||
if ("INTERFACE_LIBRARY" STREQUAL "${target_type}")
|
||||
@ -59,6 +59,7 @@ function(pico_add_uf2_output TARGET)
|
||||
endif()
|
||||
if (ELF2UF2_FOUND)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND ELF2UF2 $<TARGET_FILE:${TARGET}> ${output_path}$<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.uf2)
|
||||
COMMAND ELF2UF2 $<TARGET_FILE:${TARGET}> ${output_path}$<IF:$<BOOL:$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>>,$<TARGET_PROPERTY:${TARGET},OUTPUT_NAME>,$<TARGET_PROPERTY:${TARGET},NAME>>.uf2
|
||||
VERBATIM)
|
||||
endif()
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user