Sfoglia il codice sorgente

test:hal test specify the family on find_package calls

Hector PHARAM 3 anni fa
parent
commit
4c55796970
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      tests/hal/CMakeLists.txt

+ 5 - 2
tests/hal/CMakeLists.txt

@@ -5,6 +5,9 @@ if(NOT TEST_FAMILIES)
     set(TEST_FAMILIES F0 F1 F2 F3 F4 F7 G0 G4 H7 L0 L1 L4 L5 MP1 U5 WB WL)
     set(TEST_FAMILIES F0 F1 F2 F3 F4 F7 G0 G4 H7 L0 L1 L4 L5 MP1 U5 WB WL)
 endif()
 endif()
 
 
+# Generate the family long names list by prepending STM32 to elements in TEST_FAMILIES
+list(TRANSFORM TEST_FAMILIES PREPEND STM32 OUTPUT_VARIABLE TEST_FAMILIES_LONG_NAMES)
+
 project(hal-test C ASM)
 project(hal-test C ASM)
 set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
 set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
 
 
@@ -13,8 +16,8 @@ if(FETCH_ST_SOURCES)
     stm32_fetch_hal(${TEST_FAMILIES})
     stm32_fetch_hal(${TEST_FAMILIES})
 endif()
 endif()
 
 
-find_package(CMSIS REQUIRED)
-find_package(HAL REQUIRED)
+find_package(CMSIS REQUIRED ${TEST_FAMILIES_LONG_NAMES})
+find_package(HAL REQUIRED ${TEST_FAMILIES_LONG_NAMES})
 
 
 set(SOURCES main.c)
 set(SOURCES main.c)