Skip to content

Commit 7a32405

Browse files
Clean up headers & cmake files
Files that were dedicated to specific platforms were incorrectly attached at the level of the supported gen. Additionally, header inclusion has been corrected. Signed-off-by: Daria Hinz <daria.hinz@intel.com>
1 parent b67b1bd commit 7a32405

File tree

7 files changed

+16
-26
lines changed

7 files changed

+16
-26
lines changed

shared/source/enable_cores.cmake

+11
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ macro(macro_for_each_platform)
5050
list(APPEND CORE_SRCS_${CORE_TYPE}_CPP_BASE ${SRC_FILE})
5151
endif()
5252

53+
set(PLATFORM_FILE "hw_cmds_${PLATFORM_IT_LOWER}.inl")
54+
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${CORE_TYPE_LOWER}/definitions${BRANCH_DIR_SUFFIX}${PLATFORM_FILE})
55+
if(EXISTS ${SRC_FILE})
56+
list(APPEND CORE_SRCS_${CORE_TYPE}_CPP_BASE ${SRC_FILE})
57+
endif()
58+
5359
foreach(BRANCH ${BRANCH_DIR_LIST})
5460
set(PATH_TO_CORE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${CORE_TYPE_LOWER}${BRANCH})
5561

@@ -58,6 +64,11 @@ macro(macro_for_each_platform)
5864
list(APPEND CORE_SRCS_${CORE_TYPE}_H_BASE ${SRC_FILE})
5965
endif()
6066

67+
set(SRC_FILE ${PATH_TO_CORE}${PLATFORM_IT_LOWER}${BRANCH_DIR_SUFFIX}hw_cmds_${PLATFORM_IT_LOWER}.cpp)
68+
if(EXISTS ${SRC_FILE})
69+
list(APPEND CORE_SRCS_${CORE_TYPE}_H_BASE ${SRC_FILE})
70+
endif()
71+
6172
set(SRC_FILE ${PATH_TO_CORE}linux/hw_info_extra_${PLATFORM_IT_LOWER}.cpp)
6273
if(EXISTS ${SRC_FILE})
6374
list(APPEND CORE_SRCS_${CORE_TYPE}_CPP_LINUX ${SRC_FILE})

shared/source/gen12lp/CMakeLists.txt

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
#
2-
# Copyright (C) 2020-2021 Intel Corporation
2+
# Copyright (C) 2020-2022 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
66

77
set_property(GLOBAL PROPERTY SHARED_SRCS_ADDITIONAL_FILES_GEN12LP ${SHARED_SRCS_ADDITIONAL_FILES_GEN12LP})
88

9-
if(SUPPORT_ADLP)
10-
set(HW_DEFINITIONS_ADLP
11-
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
12-
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}hw_cmds_adlp.inl
13-
)
14-
set_property(GLOBAL APPEND PROPERTY CORE_SRCS_COREX_ALL_BASE ${HW_DEFINITIONS_ADLP})
15-
endif()
16-
179
if(SUPPORT_GEN12LP)
1810
add_subdirectories()
1911
endif()
+1-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
#
2-
# Copyright (C) 2021 Intel Corporation
2+
# Copyright (C) 2021-2022 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
66

77
if(SUPPORT_XE_HP_CORE)
8-
set(HW_DEFINITIONS_XE_HP_CORE
9-
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
10-
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}hw_cmds_xehp.inl
11-
)
12-
set_property(GLOBAL APPEND PROPERTY CORE_SRCS_COREX_ALL_BASE ${HW_DEFINITIONS_XE_HP_CORE})
13-
148
add_subdirectories()
159
endif()

shared/source/xe_hpc_core/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,5 @@
55
#
66

77
if(SUPPORT_XE_HPC_CORE)
8-
set(HW_DEFINITIONS_XE_HPC_CORE
9-
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
10-
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}hw_cmds_pvc.cpp
11-
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}hw_cmds_pvc.inl
12-
${CMAKE_CURRENT_SOURCE_DIR}/compiler_hw_info_config_pvc.inl
13-
)
14-
15-
set_property(GLOBAL APPEND PROPERTY NEO_CORE_HELPERS ${HW_DEFINITIONS_XE_HPC_CORE})
16-
178
add_subdirectories()
189
endif()

shared/source/xe_hpg_core/hw_cmds_base.h

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "shared/source/helpers/debug_helpers.h"
1111
#include "shared/source/xe_hpg_core/hw_info.h"
1212

13-
#include "device_ids_configs_dg2.h"
1413
#include "igfxfmid.h"
1514

1615
#include <cstddef>

shared/source/xe_hpg_core/hw_cmds_dg2.h

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
#pragma once
99
#include "shared/source/xe_hpg_core/hw_cmds_base.h"
10+
11+
#include "device_ids_configs_dg2.h"
12+
1013
namespace NEO {
1114

1215
struct DG2 : public XE_HPG_COREFamily {

0 commit comments

Comments
 (0)