CMake: define enable core files only once

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski 2022-02-17 17:29:25 +00:00 committed by Compute-Runtime-Automation
parent 84a1ccb991
commit aae7858ed9
7 changed files with 17 additions and 15 deletions

View File

@ -467,7 +467,7 @@ if(BUILD_WITH_L0)
endif()
endif()
append_sources_from_properties(L0_SHARED_LIB_SRCS L0_SRCS_DLL NEO_CORE_SRCS_LINK)
append_sources_from_properties(L0_SHARED_LIB_SRCS L0_SRCS_DLL NEO_CORE_SRCS_LINK NEO_SRCS_ENABLE_CORE)
target_sources(${TARGET_NAME_L0} PRIVATE $<TARGET_OBJECTS:${L0_RELEASE_LIB_NAME}> ${L0_SHARED_LIB_SRCS})
target_link_libraries(${TARGET_NAME_L0}

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2018-2021 Intel Corporation
# Copyright (C) 2018-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@ -40,7 +40,10 @@ set(RUNTIME_SRCS_DLL_BASE
${EXPORTS_FILENAME}
)
append_sources_from_properties(RUNTIME_SRCS_DLL_BASE NEO_CORE_SRCS_LINK)
append_sources_from_properties(RUNTIME_SRCS_DLL_BASE
NEO_CORE_SRCS_LINK
NEO_SRCS_ENABLE_CORE
)
set(RUNTIME_SRCS_DLL_LINUX
${NEO_SHARED_DIRECTORY}/dll/linux/drm_neo_create.cpp

View File

@ -78,6 +78,7 @@ set(IGDRCL_SRCS_offline_compiler_tests
${CLOC_LIB_SRCS_LIB}
${CLOC_LIB_SRCS_UTILITIES}
)
append_sources_from_properties(IGDRCL_SRCS_offline_compiler_tests NEO_SRCS_ENABLE_CORE)
if(WIN32)
list(APPEND IGDRCL_SRCS_offline_compiler_tests

View File

@ -153,10 +153,6 @@ macro(macro_for_each_core_type)
if(EXISTS ${SRC_FILE}_${CORE_TYPE_LOWER}.cpp)
list(APPEND CLOC_LIB_SRCS_LIB ${SRC_FILE}_${CORE_TYPE_LOWER}.cpp)
endif()
set(SRC_FILE ${NEO_SHARED_DIRECTORY}${BRANCH}${CORE_TYPE_LOWER}${BRANCH_DIR}enable_${CORE_TYPE_LOWER}.cpp)
if(EXISTS ${SRC_FILE})
list(APPEND CLOC_LIB_SRCS_LIB ${SRC_FILE})
endif()
endforeach()
endforeach()
endforeach()

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2019-2021 Intel Corporation
# Copyright (C) 2019-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@ -193,7 +193,10 @@ else()
endif()
endif()
set_property(GLOBAL PROPERTY NEO_CORE_SRCS_LINK ${CORE_SRCS_LINK})
set_property(GLOBAL APPEND PROPERTY NEO_CORE_SRCS_LINK ${CORE_SRCS_LINK})
get_property(NEO_SRCS_ENABLE_CORE GLOBAL PROPERTY NEO_SRCS_ENABLE_CORE)
target_sources(ocloc_lib PRIVATE ${NEO_SRCS_ENABLE_CORE})
if(UNIX)
set_property(GLOBAL APPEND PROPERTY NEO_CORE_SRCS_LINK ${CORE_SRCS_LINK_LINUX})
endif()

View File

@ -139,13 +139,9 @@ macro(macro_for_each_core_type)
list(APPEND ${CORE_TYPE}_SRC_LINK_BASE ${SRC_FILE})
endif()
set(SRC_FILE ${CORE_COREX_PREFIX}${BRANCH_DIR}enable_${CORE_TYPE_LOWER}.cpp)
if(EXISTS ${SRC_FILE})
list(APPEND ${CORE_TYPE}_SRC_LINK_BASE ${SRC_FILE})
endif()
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${CORE_TYPE_LOWER}/enable_${CORE_TYPE_LOWER}.cpp)
if(EXISTS ${SRC_FILE})
list(APPEND ${CORE_TYPE}_SRC_LINK_BASE ${SRC_FILE})
list(APPEND NEO_SRCS_ENABLE_CORE ${SRC_FILE})
endif()
set(SRC_FILE "${CORE_COREX_PREFIX}/os_agnostic_hw_info_config_${CORE_TYPE_LOWER}.inl")
@ -191,3 +187,4 @@ set_property(GLOBAL PROPERTY CORE_SRCS_COREX_ALL_BASE ${CORE_SRCS_COREX_ALL_BASE
set_property(GLOBAL PROPERTY CORE_SRCS_COREX_ALL_LINUX ${CORE_SRCS_COREX_ALL_LINUX})
set_property(GLOBAL PROPERTY CORE_SRCS_COREX_ALL_WDDM ${CORE_SRCS_COREX_ALL_WDDM})
set_property(GLOBAL PROPERTY CORE_SRCS_COREX_ALL_WINDOWS ${CORE_SRCS_COREX_ALL_WINDOWS})
set_property(GLOBAL APPEND PROPERTY NEO_SRCS_ENABLE_CORE ${NEO_SRCS_ENABLE_CORE})

View File

@ -40,7 +40,7 @@ macro(macro_for_each_core_type)
if(EXISTS ${SRC_FILE})
list(APPEND neo_libult_common_SRCS_ENABLE_TESTED_HW ${SRC_FILE})
endif()
foreach(SRC_IT "enable_" "enable_family_full_core_" "implicit_scaling_")
foreach(SRC_IT "enable_family_full_core_" "implicit_scaling_")
set(SRC_FILE ${NEO_SHARED_DIRECTORY}${BRANCH}${CORE_TYPE_LOWER}${BRANCH_DIR}${SRC_IT}${CORE_TYPE_LOWER}.cpp)
if(EXISTS ${SRC_FILE})
list(APPEND neo_libult_common_SRCS_ENABLE_TESTED_HW ${SRC_FILE})
@ -58,6 +58,8 @@ endmacro()
apply_macro_for_each_core_type("TESTED")
append_sources_from_properties(neo_libult_common_SRCS_ENABLE_TESTED_HW NEO_SRCS_ENABLE_CORE)
set(neo_libult_common_SRCS_LIB_ULT
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/aub_command_stream_receiver_fixture.h
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/device_fixture.cpp