Skip to content

Commit ffc0ccb

Browse files
author
ipl_ci
committed
[MB][Build][Fix] Add CheckPlatformList for crypto_mb-only builds
1 parent 511890f commit ffc0ccb

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

sources/ippcp/crypto_mb/CMakeLists.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,25 @@ endif()
7777
# Set platform list (order is important for dispacther generation!!!)
7878
set(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+
8096
if(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 "")

0 commit comments

Comments
 (0)