File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,9 +77,25 @@ endif()
7777# Set platform list (order is important for dispacther generation!!!)
7878set (MBX_BASE_PLATFORM_LIST k1 l9)
7979
80+ # Function to check that platform_list only contains valid platforms from the reference_platform_list
81+ function (CheckPlatformListMB platform_list reference_platform_list error_message )
82+ foreach (platform ${platform_list} )
83+ set (FOUND_PLATFORM false )
84+ foreach (ref_platform ${reference_platform_list} )
85+ string (STRIP "${platform} " platform_strip)
86+ if (platform_strip STREQUAL ref_platform)
87+ set (FOUND_PLATFORM true )
88+ endif ()
89+ endforeach (ref_platform ${reference_platform_list} )
90+ if (NOT FOUND_PLATFORM)
91+ message (FATAL_ERROR ${error_message} ": " ${platform} )
92+ endif ()
93+ endforeach (platform ${platform_list} )
94+ endfunction ()
95+
8096if (MBX_PLATFORM_LIST) # MBX_PLATFORM_LIST may be set by user
8197 if (NOT MBX_MERGED_BLD)
82- CheckPlatformList ("${MBX_PLATFORM_LIST} " "${MBX_BASE_PLATFORM_LIST} " "CRYPTO_MB incorrect platform" )
98+ CheckPlatformListMB ("${MBX_PLATFORM_LIST} " "${MBX_BASE_PLATFORM_LIST} " "CRYPTO_MB incorrect platform" )
8399 if (MBX_PLATFORM_LIST STREQUAL "" )
84100 message (FATAL_ERROR "MBX_PLATFORM_LIST cannot be empty" )
85101 endif (MBX_PLATFORM_LIST STREQUAL "" )
You can’t perform that action at this time.
0 commit comments