We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to the main target to generate .map file for the project.
The text was updated successfully, but these errors were encountered:
I do it like this in my project:
I am using CMake 3.19.4 and cannot guarantee this will work back to CMake 3.14.
function(nrf5_target target) # .... some code above # Generate linker map file target_linker_map(${target}) # .... some code below endfunction() function(target_linker_map target) set(GEN_MAP_FILE "-Wl,-Map,") get_target_property(map_dir ${target} BINARY_DIR) # Read which folder target is defined target_link_options(${target} PRIVATE ${GEN_MAP_FILE}${map_dir}/${target}.map) # place .map file is same folder as target # allow ninja clean command to remove file set_target_properties(${target} PROPERTIES ADDITIONAL_CLEAN_FILES ${target}.map) endfunction()
Sorry, something went wrong.
No branches or pull requests
Add an option to the main target to generate .map file for the project.
The text was updated successfully, but these errors were encountered: