CMake: Remove trailing whitespace from CMakeLists.txt

pull/14765/head
Robert Walton 2021-06-10 15:19:35 +01:00
parent aeaac0e70c
commit eb733925dc
1 changed files with 8 additions and 8 deletions

View File

@ -13,14 +13,14 @@ endif()
project(mbed-os) project(mbed-os)
# Add all paths to the list files within Mbed OS # Add all paths to the list files within Mbed OS
list(APPEND CMAKE_MODULE_PATH list(APPEND CMAKE_MODULE_PATH
"${mbed-os_SOURCE_DIR}/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_Cypress/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_NXP/scripts" "${mbed-os_SOURCE_DIR}/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_Cypress/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_NXP/scripts"
) )
option(BUILD_TESTING "Run unit tests only." OFF) option(BUILD_TESTING "Run unit tests only." OFF)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
include(CTest) include(CTest)
add_subdirectory(UNITTESTS) add_subdirectory(UNITTESTS)
endif() endif()
@ -68,19 +68,19 @@ if(${CMAKE_CROSSCOMPILING})
"Invalid printf library type '${MBED_PRINTF_LIB}'. Possible values:\n ${MBED_PRINTF_LIB_TYPES}" "Invalid printf library type '${MBED_PRINTF_LIB}'. Possible values:\n ${MBED_PRINTF_LIB_TYPES}"
) )
endif() endif()
mbed_set_cpu_core_definitions(mbed-core) mbed_set_cpu_core_definitions(mbed-core)
if(${MBED_TOOLCHAIN_FILE_USED}) if(${MBED_TOOLCHAIN_FILE_USED})
mbed_set_profile_options(mbed-core ${MBED_TOOLCHAIN}) mbed_set_profile_options(mbed-core ${MBED_TOOLCHAIN})
mbed_set_c_lib(mbed-core ${MBED_C_LIB}) mbed_set_c_lib(mbed-core ${MBED_C_LIB})
mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB}) mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB})
target_compile_features(mbed-core target_compile_features(mbed-core
INTERFACE INTERFACE
c_std_11 c_std_11
cxx_std_14 cxx_std_14
) )
endif() endif()
target_compile_definitions(mbed-core target_compile_definitions(mbed-core
@ -98,7 +98,7 @@ if(${CMAKE_CROSSCOMPILING})
endif() endif()
# We need to generate a "response file" to pass to the C preprocessor when we preprocess the linker # We need to generate a "response file" to pass to the C preprocessor when we preprocess the linker
# script, because of path le ngth limitations on Windows. We set the response file and bind the path # script, because of path length limitations on Windows. We set the response file and bind the path
# to a global property here. The MBED_TARGET being built queries this global property when it sets # to a global property here. The MBED_TARGET being built queries this global property when it sets
# the linker script. # the linker script.
# #
@ -110,7 +110,7 @@ if(${CMAKE_CROSSCOMPILING})
# using response files or global properties. # using response files or global properties.
mbed_generate_options_for_linker(mbed-core RESPONSE_FILE_PATH) mbed_generate_options_for_linker(mbed-core RESPONSE_FILE_PATH)
set_property(GLOBAL PROPERTY COMPILE_DEFS_RESPONSE_FILE ${RESPONSE_FILE_PATH}) set_property(GLOBAL PROPERTY COMPILE_DEFS_RESPONSE_FILE ${RESPONSE_FILE_PATH})
# Add compile definitions for backward compatibility with the toolchain # Add compile definitions for backward compatibility with the toolchain
# supported. New source files should instead check for __GNUC__ and __clang__ # supported. New source files should instead check for __GNUC__ and __clang__
# for the GCC_ARM and ARM toolchains respectively. # for the GCC_ARM and ARM toolchains respectively.
@ -164,7 +164,7 @@ if(${CMAKE_CROSSCOMPILING})
string(TOLOWER ${MBED_TARGET} MBED_TARGET_CONVERTED) string(TOLOWER ${MBED_TARGET} MBED_TARGET_CONVERTED)
string(REPLACE "_" "-" MBED_TARGET_CONVERTED ${MBED_TARGET_CONVERTED}) string(REPLACE "_" "-" MBED_TARGET_CONVERTED ${MBED_TARGET_CONVERTED})
string(PREPEND MBED_TARGET_CONVERTED "mbed-") string(PREPEND MBED_TARGET_CONVERTED "mbed-")
target_link_libraries(mbed-core INTERFACE ${MBED_TARGET_CONVERTED}) target_link_libraries(mbed-core INTERFACE ${MBED_TARGET_CONVERTED})
endif() endif()