cmake: Whitespace and commentary fixes
Cosmetics, no functional change expected. Fixed leading space alignment. Replaced tabs with spaces. Emulation error message output is now aligned. To locate tabs in cmake, the following bash is useful: grep -PRil "\t" * | grep -i cmake | grep -v ^sanity Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
This commit is contained in:
parent
b6ab4e8a7f
commit
0efad5f7fd
12 changed files with 118 additions and 120 deletions
|
@ -34,15 +34,16 @@ if(NOT PROPERTY_LINKER_SCRIPT_DEFINES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
define_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT BRIEF_DOCS " " FULL_DOCS " ")
|
define_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT BRIEF_DOCS " " FULL_DOCS " ")
|
||||||
set_property( GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-little${ARCH})
|
set_property( GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-little${ARCH}) # BFD format
|
||||||
|
|
||||||
# zephyr_interface is a source-less library that has all the global
|
# "zephyr_interface" is a source-less library that encapsulates all the global
|
||||||
# compiler options needed by all source files. All zephyr libraries,
|
# compiler options needed by all source files. All zephyr libraries,
|
||||||
# including the library named "zephyr" link with this library to
|
# including the library named "zephyr" link with this library to
|
||||||
# obtain these flags.
|
# obtain these flags.
|
||||||
|
# https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#interface-libraries
|
||||||
add_library(zephyr_interface INTERFACE)
|
add_library(zephyr_interface INTERFACE)
|
||||||
|
|
||||||
# zephyr is a catchall CMake library for source files that can be
|
# "zephyr" is a catch-all CMake library for source files that can be
|
||||||
# built purely with the include paths, defines, and other compiler
|
# built purely with the include paths, defines, and other compiler
|
||||||
# flags that come with zephyr_interface.
|
# flags that come with zephyr_interface.
|
||||||
zephyr_library_named(zephyr)
|
zephyr_library_named(zephyr)
|
||||||
|
@ -1397,7 +1398,6 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(cmake/flash)
|
add_subdirectory(cmake/flash)
|
||||||
|
|
||||||
add_subdirectory(cmake/usage)
|
add_subdirectory(cmake/usage)
|
||||||
add_subdirectory(cmake/reports)
|
add_subdirectory(cmake/reports)
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ add_custom_target(code_data_relocation_target)
|
||||||
# CMake's 'project' concept has proven to not be very useful for Zephyr
|
# CMake's 'project' concept has proven to not be very useful for Zephyr
|
||||||
# due in part to how Zephyr is organized and in part to it not fitting well
|
# due in part to how Zephyr is organized and in part to it not fitting well
|
||||||
# with cross compilation.
|
# with cross compilation.
|
||||||
# CMake therefore tries to rely as little as possible on project()
|
# Zephyr therefore tries to rely as little as possible on project()
|
||||||
# and its associated variables, e.g. PROJECT_SOURCE_DIR.
|
# and its associated variables, e.g. PROJECT_SOURCE_DIR.
|
||||||
# It is recommended to always use ZEPHYR_BASE instead of PROJECT_SOURCE_DIR
|
# It is recommended to always use ZEPHYR_BASE instead of PROJECT_SOURCE_DIR
|
||||||
# when trying to reference ENV${ZEPHYR_BASE}.
|
# when trying to reference ENV${ZEPHYR_BASE}.
|
||||||
|
@ -344,9 +344,10 @@ if(CONFIG_QEMU_TARGET)
|
||||||
-nic tap,model=${CONFIG_ETH_NIC_MODEL},script=no,downscript=no,ifname=zeth
|
-nic tap,model=${CONFIG_ETH_NIC_MODEL},script=no,downscript=no,ifname=zeth
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR "
|
||||||
"No Qemu ethernet driver configured!
|
No Qemu ethernet driver configured!
|
||||||
Enable Qemu supported ethernet driver like e1000 at drivers/ethernet")
|
Enable Qemu supported ethernet driver like e1000 at drivers/ethernet"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
list(APPEND QEMU_FLAGS_${ARCH}
|
list(APPEND QEMU_FLAGS_${ARCH}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
# 1.1. zephyr_*
|
# 1.1. zephyr_*
|
||||||
#
|
#
|
||||||
# The following methods are for modifying the CMake library[0] called
|
# The following methods are for modifying the CMake library[0] called
|
||||||
# "zephyr". zephyr is a catchall CMake library for source files that
|
# "zephyr". zephyr is a catch-all CMake library for source files that
|
||||||
# can be built purely with the include paths, defines, and other
|
# can be built purely with the include paths, defines, and other
|
||||||
# compiler flags that all zephyr source files use.
|
# compiler flags that all zephyr source files use.
|
||||||
# [0] https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html
|
# [0] https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html
|
||||||
|
@ -1190,10 +1190,7 @@ function(find_appropriate_cache_directory dir)
|
||||||
set(${dir} ${local_dir} PARENT_SCOPE)
|
set(${dir} ${local_dir} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(generate_unique_target_name_from_filename
|
function(generate_unique_target_name_from_filename filename target_name)
|
||||||
filename
|
|
||||||
target_name
|
|
||||||
)
|
|
||||||
get_filename_component(basename ${filename} NAME)
|
get_filename_component(basename ${filename} NAME)
|
||||||
string(REPLACE "." "_" x ${basename})
|
string(REPLACE "." "_" x ${basename})
|
||||||
string(REPLACE "@" "_" x ${x})
|
string(REPLACE "@" "_" x ${x})
|
||||||
|
|
|
@ -18,7 +18,7 @@ foreach(arch ${arch_list})
|
||||||
foreach(root ${BOARD_ROOT})
|
foreach(root ${BOARD_ROOT})
|
||||||
set(board_arch_dir ${root}/boards/${arch})
|
set(board_arch_dir ${root}/boards/${arch})
|
||||||
|
|
||||||
# Match the .yanl files in the board directories to make sure we are
|
# Match the .yaml files in the board directories to make sure we are
|
||||||
# finding boards, e.g. qemu_xtensa/qemu_xtensa.yaml
|
# finding boards, e.g. qemu_xtensa/qemu_xtensa.yaml
|
||||||
file(GLOB_RECURSE yamls_for_${arch}
|
file(GLOB_RECURSE yamls_for_${arch}
|
||||||
RELATIVE ${board_arch_dir}
|
RELATIVE ${board_arch_dir}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue