Cmake refactor part 16

igdrcl_tests: define gen specific sources in subdirectories
libult: append gen specific sources needed to link hw tests

Change-Id: I72505729f1ff27439cd43904688de9c2cfbe080f
This commit is contained in:
Mateusz Jablonski
2018-03-15 08:53:27 +01:00
committed by sys_ocldev
parent 7644209288
commit e21e220540
27 changed files with 587 additions and 199 deletions

View File

@ -86,16 +86,12 @@ target_link_libraries(igdrcl_aub_tests gtest gmock ${IGDRCL_EXTRA_LIBS})
target_include_directories(igdrcl_aub_tests BEFORE PRIVATE ${IGDRCL_SOURCE_DIR}/unit_tests/gen_common)
target_compile_definitions(igdrcl_aub_tests PUBLIC ${TESTED_GEN_FLAGS_DEFINITONS})
foreach(GEN_NUM RANGE ${MAX_GEN})
GEN_CONTAINS_PLATFORMS("TESTED" ${GEN_NUM} GENX_HAS_PLATFORMS)
if(${GENX_HAS_PLATFORMS})
GET_PLATFORMS_FOR_GEN("TESTED" ${GEN_NUM} TESTED_GENX_PLATFORMS)
foreach(PLATFORM_IT ${TESTED_GENX_PLATFORMS})
string(TOLOWER ${PLATFORM_IT} PLATFORM_IT_LOWER)
target_sources(igdrcl_aub_tests PRIVATE
${IGDRCL_SOURCE_DIR}/unit_tests/gen${GEN_NUM}/cmd_parse_gen${GEN_NUM}.cpp
)
add_custom_target(${PLATFORM_IT_LOWER}_aub_tests
DEPENDS igdrcl_aub_tests
DEPENDS copy_test_files_${PLATFORM_IT_LOWER}