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

@@ -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})