mirror of https://github.com/ARMmbed/mbed-os.git
replace file(copy by cmake -E copy
parent
d4062f5fcb
commit
5ae8e0eec0
|
@ -88,11 +88,20 @@ function(mbed_set_post_build target)
|
||||||
# executable suffix for all toolchains as CMake hardcodes the name of the
|
# executable suffix for all toolchains as CMake hardcodes the name of the
|
||||||
# diagnostic output file for some toolchains.
|
# diagnostic output file for some toolchains.
|
||||||
|
|
||||||
# COPY_FILE could be used with cmake >=3.21
|
# copy mapfile .map to .map.old for ram/rom statistics diff in memap.py
|
||||||
file(COPY_FILE
|
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map)
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map"
|
add_custom_command(
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map.old"
|
TARGET
|
||||||
RESULT 0)
|
${target}
|
||||||
|
PRE_BUILD
|
||||||
|
COMMAND
|
||||||
|
${CMAKE_COMMAND} -E rename "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map" "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map.old"
|
||||||
|
COMMENT
|
||||||
|
"executable:"
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
mbed_configure_memory_map(${target} "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map")
|
mbed_configure_memory_map(${target} "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map")
|
||||||
mbed_validate_application_profile(${target})
|
mbed_validate_application_profile(${target})
|
||||||
mbed_generate_bin_hex(${target})
|
mbed_generate_bin_hex(${target})
|
||||||
|
|
Loading…
Reference in New Issue