mirror of https://github.com/ARMmbed/mbed-os.git
app.cmake: Replace tabs with spaces
The coding standards of Mbed OS require indentation of four spaces.pull/14874/head
parent
75808eaaf2
commit
2a1d50f0fa
|
@ -34,27 +34,27 @@ include(CheckPythonPackage)
|
||||||
# Check python packages from requirements.txt
|
# Check python packages from requirements.txt
|
||||||
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/requirements.txt PYTHON_REQUIREMENTS)
|
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/requirements.txt PYTHON_REQUIREMENTS)
|
||||||
foreach(REQUIREMENT ${PYTHON_REQUIREMENTS})
|
foreach(REQUIREMENT ${PYTHON_REQUIREMENTS})
|
||||||
# Look for a string from the start of each line that does not contain "<", ">", "=", or " ".
|
# Look for a string from the start of each line that does not contain "<", ">", "=", or " ".
|
||||||
if(REQUIREMENT MATCHES "^([^<>= ]+)")
|
if(REQUIREMENT MATCHES "^([^<>= ]+)")
|
||||||
set(PACKAGE_NAME ${CMAKE_MATCH_1})
|
set(PACKAGE_NAME ${CMAKE_MATCH_1})
|
||||||
string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UCASE) # Ucase name needed for CMake variable
|
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
|
string(TOLOWER ${PACKAGE_NAME} PACKAGE_NAME_LCASE) # Lcase name needed for import statement
|
||||||
|
|
||||||
check_python_package(${PACKAGE_NAME_LCASE} HAVE_PYTHON_${PACKAGE_NAME_UCASE})
|
check_python_package(${PACKAGE_NAME_LCASE} HAVE_PYTHON_${PACKAGE_NAME_UCASE})
|
||||||
if(NOT HAVE_PYTHON_${PACKAGE_NAME_UCASE})
|
if(NOT HAVE_PYTHON_${PACKAGE_NAME_UCASE})
|
||||||
message(WARNING "Missing Python dependency ${PACKAGE_NAME}")
|
message(WARNING "Missing Python dependency ${PACKAGE_NAME}")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Cannot parse line \"${REQUIREMENT}\" in requirements.txt")
|
message(FATAL_ERROR "Cannot parse line \"${REQUIREMENT}\" in requirements.txt")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Check deps for memap
|
# Check deps for memap
|
||||||
if(Python3_FOUND AND HAVE_PYTHON_INTELHEX AND HAVE_PYTHON_PRETTYTABLE)
|
if(Python3_FOUND AND HAVE_PYTHON_INTELHEX AND HAVE_PYTHON_PRETTYTABLE)
|
||||||
set(HAVE_MEMAP_DEPS TRUE)
|
set(HAVE_MEMAP_DEPS TRUE)
|
||||||
else()
|
else()
|
||||||
set(HAVE_MEMAP_DEPS FALSE)
|
set(HAVE_MEMAP_DEPS FALSE)
|
||||||
message(STATUS "Missing Python dependencies (python3, intelhex, prettytable) so the memory map cannot be printed")
|
message(STATUS "Missing Python dependencies (python3, intelhex, prettytable) so the memory map cannot be printed")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue