cmake: Various refactorings and whitespace fixes

This commit applies various refactorings and whitespace fixes in
preparation for the patch that fixes #13001.

It includes changing indentation from tabs to spaces and splitting
tokens across more lines to increase readability and minimize patch
sizes.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2019-02-08 15:39:37 +01:00 committed by Kumar Gala
parent 1cc8bbb4ae
commit 7a6afcdc04

View file

@ -456,7 +456,9 @@ function(construct_add_custom_command_for_linker_pass linker_output_name output_
set(${output_variable}
OUTPUT ${linker_cmd_file_name}
DEPENDS ${LINKER_SCRIPT}
DEPENDS
${LINKER_SCRIPT}
# NB: 'linker_script_dep' will use a keyword that ends 'DEPENDS'
${linker_script_dep}
COMMAND ${CMAKE_C_COMPILER}
-x assembler-with-cpp
@ -746,7 +748,10 @@ if (CONFIG_CODE_DATA_RELOCATION)
set(CODE_RELOCATION_DEP code_relocation_source_lib)
endif() # CONFIG_CODE_DATA_RELOCATION
construct_add_custom_command_for_linker_pass(linker custom_command)
construct_add_custom_command_for_linker_pass(
linker
custom_command
)
add_custom_command(
${custom_command}
)
@ -1147,7 +1152,10 @@ if(CONFIG_APP_SHARED_MEM AND CONFIG_USERSPACE)
endif()
if(CONFIG_USERSPACE AND CONFIG_ARM)
construct_add_custom_command_for_linker_pass(linker_priv_stacks custom_command)
construct_add_custom_command_for_linker_pass(
linker_priv_stacks
custom_command
)
add_custom_command(
${custom_command}
)
@ -1188,7 +1196,10 @@ if(GKOF OR GKSF)
# The second linker pass uses the same source linker script of the
# first pass (LINKER_SCRIPT), but this time with a different output
# file and preprocessed with the define LINKER_PASS2.
construct_add_custom_command_for_linker_pass(linker_pass_final custom_command)
construct_add_custom_command_for_linker_pass(
linker_pass_final
custom_command
)
add_custom_command(
${custom_command}
)