app.cmake: Replace tabs with spaces

The coding standards of Mbed OS require indentation of four spaces.
pull/14874/head
Lingkai Dong 2021-07-05 16:09:07 +01:00
parent 75808eaaf2
commit 2a1d50f0fa
1 changed files with 15 additions and 15 deletions

View File

@ -34,27 +34,27 @@ include(CheckPythonPackage)
# Check python packages from requirements.txt
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/requirements.txt PYTHON_REQUIREMENTS)
foreach(REQUIREMENT ${PYTHON_REQUIREMENTS})
# Look for a string from the start of each line that does not contain "<", ">", "=", or " ".
if(REQUIREMENT MATCHES "^([^<>= ]+)")
set(PACKAGE_NAME ${CMAKE_MATCH_1})
string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UCASE) # Ucase name needed for CMake variable
string(TOLOWER ${PACKAGE_NAME} PACKAGE_NAME_LCASE) # Lcase name needed for import statement
# Look for a string from the start of each line that does not contain "<", ">", "=", or " ".
if(REQUIREMENT MATCHES "^([^<>= ]+)")
set(PACKAGE_NAME ${CMAKE_MATCH_1})
string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UCASE) # Ucase name needed for CMake variable
string(TOLOWER ${PACKAGE_NAME} PACKAGE_NAME_LCASE) # Lcase name needed for import statement
check_python_package(${PACKAGE_NAME_LCASE} HAVE_PYTHON_${PACKAGE_NAME_UCASE})
if(NOT HAVE_PYTHON_${PACKAGE_NAME_UCASE})
message(WARNING "Missing Python dependency ${PACKAGE_NAME}")
endif()
else()
message(FATAL_ERROR "Cannot parse line \"${REQUIREMENT}\" in requirements.txt")
endif()
check_python_package(${PACKAGE_NAME_LCASE} HAVE_PYTHON_${PACKAGE_NAME_UCASE})
if(NOT HAVE_PYTHON_${PACKAGE_NAME_UCASE})
message(WARNING "Missing Python dependency ${PACKAGE_NAME}")
endif()
else()
message(FATAL_ERROR "Cannot parse line \"${REQUIREMENT}\" in requirements.txt")
endif()
endforeach()
# Check deps for memap
if(Python3_FOUND AND HAVE_PYTHON_INTELHEX AND HAVE_PYTHON_PRETTYTABLE)
set(HAVE_MEMAP_DEPS TRUE)
set(HAVE_MEMAP_DEPS TRUE)
else()
set(HAVE_MEMAP_DEPS FALSE)
message(STATUS "Missing Python dependencies (python3, intelhex, prettytable) so the memory map cannot be printed")
set(HAVE_MEMAP_DEPS FALSE)
message(STATUS "Missing Python dependencies (python3, intelhex, prettytable) so the memory map cannot be printed")
endif()