File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,25 @@ endif()
77
77
# Set platform list (order is important for dispacther generation!!!)
78
78
set (MBX_BASE_PLATFORM_LIST k1 l9 )
79
79
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
+
80
96
if (MBX_PLATFORM_LIST ) # MBX_PLATFORM_LIST may be set by user
81
97
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" )
83
99
if (MBX_PLATFORM_LIST STREQUAL "" )
84
100
message (FATAL_ERROR "MBX_PLATFORM_LIST cannot be empty" )
85
101
endif (MBX_PLATFORM_LIST STREQUAL "" )
You can’t perform that action at this time.
0 commit comments