aboutsummaryrefslogtreecommitdiff
path: root/rtos/CMakeLists.txt
diff options
context:
space:
mode:
authorLedion Daja <ledion.daja@arm.com>2022-06-21 12:22:13 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2022-09-13 09:42:31 +0200
commit449c8d81f5b0c4d75c632b7849ddd9966cfd71cf (patch)
tree88011ec0e51e834b8f1492a8fd628bdd139f35f9 /rtos/CMakeLists.txt
parent311d6533177769b1eb81ac21442c7563faac21a8 (diff)
downloadethos-u-core-software-449c8d81f5b0c4d75c632b7849ddd9966cfd71cf.tar.gz
Remove CMake workaround for Arm Clang
Previous version of CMake did not allow CMAKE_SYSTEM_PROCESSOR to contain CPU features for Arm Clang toolchain. A workaround was added to manually strip the CPU features. Recent versions of CMake have removed this limitation and instead requires the toolchain to manually add -mcpu=<CPU+features>, which means that the workaround can be removed. Change-Id: I3e8647c47df27a96cdd103614ecf2540f150ab36
Diffstat (limited to 'rtos/CMakeLists.txt')
-rw-r--r--rtos/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/rtos/CMakeLists.txt b/rtos/CMakeLists.txt
index 753b307..6c91a83 100644
--- a/rtos/CMakeLists.txt
+++ b/rtos/CMakeLists.txt
@@ -24,12 +24,14 @@ endif()
# Include ThreadX
# Only enable cortex-m55 until cortex-m33 is sorted out upstream
-if((CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m55") AND
+if((CMAKE_SYSTEM_PROCESSOR MATCHES "cortex-m55") AND
(CORE_SOFTWARE_RTOS_LOWER STREQUAL "threadx" OR CORE_SOFTWARE_RTOS_LOWER STREQUAL "all"))
#threadx build requires 2 defines: THREADX_ARCH (format: cortex_m4) and THREADX_TOOLCHAIN (ac5/ac6/gnu).
#set them according to existing defines CMAKE_SYSTEM_PROCESSOR and CMAKE_CXX_COMPILER_ID:
- string(REPLACE "-" "_" THREADX_ARCH ${CMAKE_SYSTEM_PROCESSOR})
+ string(REGEX MATCH "^cortex-m([0-9]+[a-z]*)" THREADX_ARCH ${CMAKE_SYSTEM_PROCESSOR})
+ string(REPLACE "-" "_" THREADX_ARCH ${THREADX_ARCH})
string(TOLOWER ${CMAKE_CXX_COMPILER_ID} THREADX_TOOLCHAIN)
+
#if armclang, change the format to "ac6".
if(THREADX_TOOLCHAIN STREQUAL "armclang")
set(THREADX_TOOLCHAIN "ac6")