diff --git a/level_zero/CMakeLists.txt b/level_zero/CMakeLists.txt index ad5e7f0481..b809fa379f 100644 --- a/level_zero/CMakeLists.txt +++ b/level_zero/CMakeLists.txt @@ -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 $ ${L0_SHARED_LIB_SRCS}) target_link_libraries(${TARGET_NAME_L0} diff --git a/opencl/source/dll/CMakeLists.txt b/opencl/source/dll/CMakeLists.txt index e8dc8eb89a..8449bb2666 100644 --- a/opencl/source/dll/CMakeLists.txt +++ b/opencl/source/dll/CMakeLists.txt @@ -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 diff --git a/opencl/test/unit_test/offline_compiler/CMakeLists.txt b/opencl/test/unit_test/offline_compiler/CMakeLists.txt index c86f81968e..6d3b521ed4 100644 --- a/opencl/test/unit_test/offline_compiler/CMakeLists.txt +++ b/opencl/test/unit_test/offline_compiler/CMakeLists.txt @@ -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 diff --git a/shared/offline_compiler/source/CMakeLists.txt b/shared/offline_compiler/source/CMakeLists.txt index 579224ee0e..d88b1bf871 100644 --- a/shared/offline_compiler/source/CMakeLists.txt +++ b/shared/offline_compiler/source/CMakeLists.txt @@ -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() diff --git a/shared/source/CMakeLists.txt b/shared/source/CMakeLists.txt index 515f6650d9..435b372890 100644 --- a/shared/source/CMakeLists.txt +++ b/shared/source/CMakeLists.txt @@ -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() diff --git a/shared/source/enable_cores.cmake b/shared/source/enable_cores.cmake index 211c1b3ab4..b22c925fd2 100644 --- a/shared/source/enable_cores.cmake +++ b/shared/source/enable_cores.cmake @@ -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}) diff --git a/shared/test/common/libult/CMakeLists.txt b/shared/test/common/libult/CMakeLists.txt index 1e5aca1997..d0707e8819 100644 --- a/shared/test/common/libult/CMakeLists.txt +++ b/shared/test/common/libult/CMakeLists.txt @@ -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