Simplify getAllSupportedTargetPlatforms function
Change-Id: Ib270a8ee20995adf132a3b11873f0cddc31db1e9 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
9d2b25c69b
commit
c6ea9ee62e
|
@ -71,8 +71,11 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "," ALL_SUPPORTED_PRODUCT_FAMILIES "${ALL_SUPPORTED_PRODUCT_FAMILY}")
|
||||
|
||||
set(CLOC_LIB_FLAGS_DEFINITIONS
|
||||
-DCIF_HEADERS_ONLY_BUILD
|
||||
-DALL_SUPPORTED_PRODUCT_FAMILIES=${ALL_SUPPORTED_PRODUCT_FAMILIES}
|
||||
)
|
||||
|
||||
set(RUNTIME_GENX_CPP_FILES
|
||||
|
|
|
@ -36,13 +36,7 @@ bool requestedFatBinary(int argc, const char *argv[]) {
|
|||
}
|
||||
|
||||
std::vector<PRODUCT_FAMILY> getAllSupportedTargetPlatforms() {
|
||||
std::vector<PRODUCT_FAMILY> ret;
|
||||
for (unsigned int productId = 0; productId < IGFX_MAX_PRODUCT; ++productId) {
|
||||
if (nullptr != hardwarePrefix[productId]) {
|
||||
ret.push_back(static_cast<PRODUCT_FAMILY>(productId));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
return std::vector<PRODUCT_FAMILY>{ALL_SUPPORTED_PRODUCT_FAMILIES};
|
||||
}
|
||||
|
||||
std::vector<ConstStringRef> toProductNames(const std::vector<PRODUCT_FAMILY> &productIds) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2018-2019 Intel Corporation
|
||||
# Copyright (C) 2018-2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
@ -218,6 +218,7 @@ INIT_LIST("CONFIGURATIONS" "UNIT_TESTS")
|
|||
INIT_LIST("CONFIGURATIONS" "AUB_TESTS")
|
||||
INIT_LIST("CONFIGURATIONS" "MT_TESTS")
|
||||
INIT_PRODUCTS_LIST("TESTED")
|
||||
INIT_PRODUCTS_LIST("SUPPORTED")
|
||||
|
||||
# Add supported and tested platforms
|
||||
if(SUPPORT_GEN8)
|
||||
|
@ -225,6 +226,7 @@ if(SUPPORT_GEN8)
|
|||
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN8" "BDWFamily")
|
||||
endif()
|
||||
if(SUPPORT_BDW)
|
||||
ADD_PRODUCT("SUPPORTED" "BDW" "IGFX_BROADWELL")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN8" "BDW" "CORE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_2_0" "GEN8" "BDW" "CORE")
|
||||
if(TESTS_BDW)
|
||||
|
@ -243,6 +245,7 @@ if(SUPPORT_GEN9)
|
|||
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN9" "SKLFamily")
|
||||
endif()
|
||||
if(SUPPORT_SKL)
|
||||
ADD_PRODUCT("SUPPORTED" "SKL" "IGFX_SKYLAKE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN9" "SKL" "CORE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_2_0" "GEN9" "SKL" "CORE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_VME" "GEN9" "SKL" "CORE")
|
||||
|
@ -259,6 +262,7 @@ if(SUPPORT_GEN9)
|
|||
endif()
|
||||
|
||||
if(SUPPORT_KBL)
|
||||
ADD_PRODUCT("SUPPORTED" "KBL" "IGFX_KABYLAKE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN9" "KBL" "CORE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_2_0" "GEN9" "KBL" "CORE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_VME" "GEN9" "KBL" "CORE")
|
||||
|
@ -270,6 +274,7 @@ if(SUPPORT_GEN9)
|
|||
endif()
|
||||
|
||||
if(SUPPORT_GLK)
|
||||
ADD_PRODUCT("SUPPORTED" "GLK" "IGFX_GEMINILAKE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN9" "GLK" "LP")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_VME" "GEN9" "GLK" "LP")
|
||||
if(TESTS_GLK)
|
||||
|
@ -280,6 +285,7 @@ if(SUPPORT_GEN9)
|
|||
endif()
|
||||
|
||||
if(SUPPORT_CFL)
|
||||
ADD_PRODUCT("SUPPORTED" "CFL" "IGFX_COFFEELAKE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN9" "CFL" "CORE")
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" "SUPPORTED_2_0" "GEN9" "CFL")
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" "SUPPORTED_VME" "GEN9" "CFL")
|
||||
|
@ -291,6 +297,7 @@ if(SUPPORT_GEN9)
|
|||
endif()
|
||||
|
||||
if(SUPPORT_BXT)
|
||||
ADD_PRODUCT("SUPPORTED" "BXT" "IGFX_BROXTON")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN9" "BXT" "LP")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_VME" "GEN9" "BXT" "LP")
|
||||
if(TESTS_BXT)
|
||||
|
@ -308,6 +315,7 @@ if(SUPPORT_GEN11)
|
|||
endif()
|
||||
|
||||
if(SUPPORT_ICLLP)
|
||||
ADD_PRODUCT("SUPPORTED" "ICLLP" "IGFX_ICELAKE_LP")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN11" "ICLLP" "LP")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_2_0" "GEN11" "ICLLP" "LP")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_VME" "GEN11" "ICLLP" "LP")
|
||||
|
@ -322,6 +330,7 @@ if(SUPPORT_GEN11)
|
|||
endif()
|
||||
|
||||
if(SUPPORT_LKF)
|
||||
ADD_PRODUCT("SUPPORTED" "LKF" "IGFX_LAKEFIELD")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN11" "LKF" "LP")
|
||||
if(TESTS_LKF)
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" "TESTED" "GEN11" "LKF")
|
||||
|
@ -331,6 +340,7 @@ if(SUPPORT_GEN11)
|
|||
endif()
|
||||
|
||||
if(SUPPORT_EHL)
|
||||
ADD_PRODUCT("SUPPORTED" "EHL" "IGFX_ELKHARTLAKE")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN11" "EHL" "LP")
|
||||
if(TESTS_EHL)
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" "TESTED" "GEN11" "EHL")
|
||||
|
@ -345,6 +355,7 @@ if(SUPPORT_GEN12LP)
|
|||
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN12LP" "TGLLPFamily")
|
||||
endif()
|
||||
if(SUPPORT_TGLLP)
|
||||
ADD_PRODUCT("SUPPORTED" "TGLLP" "IGFX_TIGERLAKE_LP")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN12LP" "TGLLP" "LP")
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED_2_0" "GEN12LP" "TGLLP" "LP")
|
||||
if(TESTS_TGLLP)
|
||||
|
@ -358,18 +369,19 @@ if(SUPPORT_GEN12LP)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Get platform lists, flag definition and set default platforms
|
||||
GET_AVAILABLE_PLATFORMS("SUPPORTED" "SUPPORT" ALL_AVAILABLE_SUPPORTED_PLATFORMS)
|
||||
GET_AVAILABLE_PLATFORMS("TESTED" "TESTS" ALL_AVAILABLE_TESTED_PLATFORMS)
|
||||
GET_AVAILABLE_PRODUCTS("TESTED" ALL_PRODUCT_FAMILY_LIST DEFAULT_TESTED_PRODUCT_FAMILY)
|
||||
GET_AVAILABLE_PRODUCTS("SUPPORTED" ALL_PRODUCT_FAMILY_LIST DEFAULT_SUPPORTED_PRODUCT_FAMILY)
|
||||
|
||||
message(STATUS "All supported platforms: ${ALL_AVAILABLE_SUPPORTED_PLATFORMS}")
|
||||
message(STATUS "All tested platforms: ${ALL_AVAILABLE_TESTED_PLATFORMS}")
|
||||
|
||||
message(STATUS "Default supported platform: ${DEFAULT_SUPPORTED_PLATFORM}")
|
||||
|
||||
message(STATUS "All product families: ${ALL_PRODUCT_FAMILY_LIST}")
|
||||
message(STATUS "All tested product families: ${ALL_TESTED_PRODUCT_FAMILY}")
|
||||
message(STATUS "All supported product families: ${ALL_SUPPORTED_PRODUCT_FAMILY}")
|
||||
message(STATUS "Default tested product family: ${DEFAULT_TESTED_PRODUCT_FAMILY}")
|
||||
|
||||
list(FIND SUPPORTED_PLATFORM_LIST ${DEFAULT_SUPPORTED_PLATFORM} VALID_DEFAULT_SUPPORTED_PLATFORM)
|
||||
|
|
Loading…
Reference in New Issue