mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Cleanup shared sources
- link sources to neo_core Change-Id: I7efaadcee80f7bbf8ac40f141c60d31f69161de7 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
@ -32,7 +32,6 @@ add_library(${NEO_STATIC_LIB_NAME} STATIC EXCLUDE_FROM_ALL
|
||||
add_subdirectories()
|
||||
add_subdirectory(instrumentation${NEO__INSTRUMENTATION_DIR_SUFFIX})
|
||||
include(enable_gens.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/core_files.cmake)
|
||||
|
||||
# Enable SSE4/AVX2 options for files that need them
|
||||
if(MSVC)
|
||||
@ -148,7 +147,7 @@ if(${GENERATE_EXECUTABLE})
|
||||
|
||||
add_subdirectory(dll)
|
||||
|
||||
target_link_libraries(${NEO_DYNAMIC_LIB_NAME} ${NEO_STATIC_LIB_NAME} ${NEO_CORE_LIB} ${NEO_STATIC_LIB_NAME} ${IGDRCL_EXTRA_LIBS})
|
||||
target_link_libraries(${NEO_DYNAMIC_LIB_NAME} ${NEO_STATIC_LIB_NAME} ${NEO_CORE_LIB} ${NEO_STATIC_LIB_NAME} ${NEO_CORE_LIB} ${IGDRCL_EXTRA_LIBS})
|
||||
|
||||
target_include_directories(${NEO_DYNAMIC_LIB_NAME} BEFORE PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
|
@ -1,48 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019-2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${NEO_SOURCE_DIR}/opencl/source/core_files.cmake)
|
||||
|
||||
append_sources_from_properties(NEO_CORE_SOURCES
|
||||
NEO_CORE_BUILT_INS
|
||||
NEO_CORE_COMMAND_STREAM
|
||||
NEO_CORE_COMMANDS
|
||||
NEO_CORE_DEVICE
|
||||
NEO_CORE_COMMAND_ENCODERS
|
||||
NEO_CORE_GMM_HELPER
|
||||
NEO_CORE_KERNEL
|
||||
NEO_CORE_MEMORY_MANAGER
|
||||
NEO_CORE_OS_INTERFACE
|
||||
NEO_CORE_PAGE_FAULT_MANAGER
|
||||
NEO_CORE_PROGRAM
|
||||
NEO_CORE_IMAGE
|
||||
)
|
||||
|
||||
append_sources_from_properties(NEO_CORE_SOURCES_WINDOWS
|
||||
NEO_CORE_GMM_HELPER_WINDOWS
|
||||
NEO_CORE_OS_INTERFACE_WINDOWS
|
||||
NEO_CORE_PAGE_FAULT_MANAGER_WINDOWS
|
||||
NEO_CORE_SKU_INFO_WINDOWS
|
||||
NEO_CORE_SRCS_HELPERS_WINDOWS
|
||||
NEO_CORE_UTILITIES_WINDOWS
|
||||
)
|
||||
|
||||
append_sources_from_properties(NEO_CORE_SOURCES_LINUX
|
||||
NEO_CORE_OS_INTERFACE_LINUX
|
||||
NEO_CORE_PAGE_FAULT_MANAGER_LINUX
|
||||
NEO_CORE_UTILITIES_LINUX
|
||||
)
|
||||
|
||||
set_property(GLOBAL PROPERTY NEO_CORE_SOURCES ${NEO_CORE_SOURCES})
|
||||
set_property(GLOBAL PROPERTY NEO_CORE_SOURCES_WINDOWS ${NEO_CORE_SOURCES_WINDOWS})
|
||||
set_property(GLOBAL PROPERTY NEO_CORE_SOURCES_LINUX ${NEO_CORE_SOURCES_LINUX})
|
||||
|
||||
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${NEO_CORE_SOURCES})
|
||||
if(WIN32)
|
||||
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${NEO_CORE_SOURCES_WINDOWS})
|
||||
else()
|
||||
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${NEO_CORE_SOURCES_LINUX})
|
||||
endif()
|
@ -21,6 +21,8 @@ set(RUNTIME_SRCS_HELPERS_BASE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_properties.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/error_mappers.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/get_info_status_mapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gmm_types_converter.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gmm_types_converter.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper_base.inl
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gmm_helper/gmm_types_converter.h"
|
||||
#include "opencl/source/helpers/gmm_types_converter.h"
|
||||
|
||||
#include "shared/source/helpers/get_info.h"
|
||||
#include "shared/source/helpers/surface_format_info.h"
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_types_converter.h"
|
||||
#include "shared/source/gmm_helper/resource_info.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
@ -25,6 +24,7 @@
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/device/cl_device.h"
|
||||
#include "opencl/source/helpers/get_info_status_mapper.h"
|
||||
#include "opencl/source/helpers/gmm_types_converter.h"
|
||||
#include "opencl/source/helpers/memory_properties_flags_helpers.h"
|
||||
#include "opencl/source/helpers/mipmap.h"
|
||||
#include "opencl/source/helpers/surface_formats.h"
|
||||
|
@ -8,12 +8,12 @@
|
||||
#include "opencl/source/sharings/d3d/d3d_surface.h"
|
||||
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_types_converter.h"
|
||||
#include "shared/source/helpers/get_info.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/device/cl_device.h"
|
||||
#include "opencl/source/helpers/gmm_types_converter.h"
|
||||
#include "opencl/source/helpers/memory_properties_flags_helpers.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/mem_obj/mem_obj_helper.h"
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_types_converter.h"
|
||||
#include "shared/source/gmm_helper/resource_info.h"
|
||||
#include "shared/source/helpers/get_info.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
@ -17,6 +16,7 @@
|
||||
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/device/cl_device.h"
|
||||
#include "opencl/source/helpers/gmm_types_converter.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/gmm_types_converter.h"
|
||||
#include "shared/source/gmm_helper/resource_info.h"
|
||||
#include "shared/source/helpers/get_info.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
@ -18,6 +17,7 @@
|
||||
#include "opencl/extensions/public/cl_gl_private_intel.h"
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/device/cl_device.h"
|
||||
#include "opencl/source/helpers/gmm_types_converter.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/sharings/gl/gl_texture.h"
|
||||
#include "opencl/source/sharings/gl/windows/gl_sharing_windows.h"
|
||||
|
@ -141,7 +141,7 @@ if(NOT MSVC)
|
||||
set_source_files_properties(helpers/uint16_sse4_tests.cpp PROPERTIES COMPILE_FLAGS -msse4.2)
|
||||
endif()
|
||||
|
||||
target_link_libraries(igdrcl_tests ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME})
|
||||
target_link_libraries(igdrcl_tests ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME})
|
||||
target_link_libraries(igdrcl_tests igdrcl_mocks)
|
||||
|
||||
option(SHOW_VERBOSE_UTESTS_RESULTS "Use the default/verbose test output" OFF)
|
||||
|
@ -69,7 +69,7 @@ copy_gmm_dll_for(igdrcl_aub_tests)
|
||||
add_subdirectories()
|
||||
|
||||
target_link_libraries(igdrcl_aub_tests igdrcl_mocks)
|
||||
target_link_libraries(igdrcl_aub_tests ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME})
|
||||
target_link_libraries(igdrcl_aub_tests ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} )
|
||||
target_link_libraries(igdrcl_aub_tests igdrcl_mocks)
|
||||
target_link_libraries(igdrcl_aub_tests gmock-gtest ${IGDRCL_EXTRA_LIBS})
|
||||
if(UNIX)
|
||||
|
@ -7,12 +7,12 @@
|
||||
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/gmm_types_converter.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/sku_info/operations/sku_info_transfer.h"
|
||||
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
|
||||
|
||||
#include "opencl/source/helpers/gmm_types_converter.h"
|
||||
#include "opencl/source/memory_manager/os_agnostic_memory_manager.h"
|
||||
#include "opencl/source/platform/platform.h"
|
||||
#include "opencl/test/unit_test/helpers/variable_backup.h"
|
||||
|
@ -32,7 +32,7 @@ if(NEO__LIBVA_FOUND)
|
||||
target_sources(igdrcl_${target_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/va_tests.cpp)
|
||||
endif()
|
||||
|
||||
target_link_libraries(igdrcl_${target_name} ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME} igdrcl_mocks ${IGDRCL_EXTRA_LIBS} gmock-gtest)
|
||||
target_link_libraries(igdrcl_${target_name} ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} igdrcl_mocks ${IGDRCL_EXTRA_LIBS} gmock-gtest)
|
||||
|
||||
set_property(TARGET igdrcl_${target_name} APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS})
|
||||
target_include_directories(igdrcl_${target_name} PRIVATE
|
||||
|
@ -24,7 +24,7 @@ target_include_directories(igdrcl_mt_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_subdirectories()
|
||||
|
||||
target_link_libraries(igdrcl_mt_tests ${TSAN_LIB})
|
||||
target_link_libraries(igdrcl_mt_tests ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME})
|
||||
target_link_libraries(igdrcl_mt_tests ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME})
|
||||
target_link_libraries(igdrcl_mt_tests gmock-gtest)
|
||||
target_link_libraries(igdrcl_mt_tests igdrcl_mocks ${IGDRCL_EXTRA_LIBS})
|
||||
|
||||
|
@ -34,7 +34,7 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(neo_page_fault_manager_tests ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME} igdrcl_mocks gmock-gtest ${IGDRCL_EXTRA_LIBS})
|
||||
target_link_libraries(neo_page_fault_manager_tests ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} ${NEO_MOCKABLE_LIB_NAME} ${NEO_CORE_MOCKABLE_LIB_NAME} igdrcl_mocks gmock-gtest ${IGDRCL_EXTRA_LIBS})
|
||||
|
||||
target_include_directories(neo_page_fault_manager_tests PRIVATE
|
||||
${NEO_CORE_TEST_DIRECTORY}/unit_test/test_macros${BRANCH_DIR_SUFFIX}
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gmm_helper/gmm_types_converter.h"
|
||||
#include "shared/source/helpers/get_info.h"
|
||||
|
||||
#include "opencl/source/helpers/gmm_types_converter.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/sharings/gl/gl_texture.h"
|
||||
#include "opencl/test/unit_test/libult/ult_command_stream_receiver.h"
|
||||
|
@ -5,8 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gmm_helper/gmm_types_converter.h"
|
||||
|
||||
#include "opencl/source/helpers/gmm_types_converter.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/platform/platform.h"
|
||||
#include "opencl/source/sharings/gl/gl_texture.h"
|
||||
|
@ -24,9 +24,12 @@ function(generate_core_lib LIB_NAME MOCKABLE)
|
||||
|
||||
list(APPEND LIB_FLAGS_DEFINITIONS ${SUPPORTED_GEN_FLAGS_DEFINITONS})
|
||||
|
||||
target_compile_definitions(${LIB_NAME} PUBLIC ${LIB_FLAGS_DEFINITIONS})
|
||||
set_property(TARGET ${LIB_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS} ${TSAN_FLAGS})
|
||||
target_compile_definitions(${LIB_NAME} PUBLIC PUBLIC GMM_LIB_DLL ${LIB_FLAGS_DEFINITIONS} DEFAULT_PLATFORM=${DEFAULT_SUPPORTED_PLATFORM} PRIVATE OGL=1)
|
||||
target_compile_definitions(${LIB_NAME} PUBLIC ${NEO_CORE_COMPILE_DEFS})
|
||||
|
||||
target_include_directories(${LIB_NAME} PUBLIC
|
||||
${KMDAF_HEADERS_DIR}
|
||||
${ENGINE_NODE_DIR}
|
||||
${NEO__GMM_INCLUDE_DIR}
|
||||
${CIF_BASE_DIR}
|
||||
@ -46,48 +49,73 @@ function(generate_core_lib LIB_NAME MOCKABLE)
|
||||
${NEO_CORE_DIRECTORY}/os_interface/linux
|
||||
)
|
||||
endif()
|
||||
|
||||
create_project_source_tree(${LIB_NAME})
|
||||
endfunction()
|
||||
|
||||
add_subdirectories()
|
||||
|
||||
set(NEO_CORE_COMPILE_DEFS "")
|
||||
set(CORE_SOURCES ${CORE_SRCS_GENX_ALL_BASE})
|
||||
|
||||
add_subdirectories()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND CORE_SOURCES ${CORE_SRCS_GENX_ALL_WINDOWS})
|
||||
else()
|
||||
list(APPEND CORE_SOURCES ${CORE_SRCS_GENX_ALL_LINUX})
|
||||
endif()
|
||||
|
||||
message("${NEO_CORE_SRCS_BUILT_INS}")
|
||||
|
||||
append_sources_from_properties(CORE_SOURCES
|
||||
NEO_CORE_COMMAND_CONTAINER
|
||||
NEO_CORE_DEBUG_SETTINGS
|
||||
NEO_CORE_DEBUGGER
|
||||
NEO_CORE_DIRECT_SUBMISSION
|
||||
NEO_CORE_DIRECT_SUBMISSION_DISPATCHERS
|
||||
NEO_CORE_EXECUTION_ENVIRONMENT
|
||||
NEO_CORE_HELPERS
|
||||
NEO_CORE_INDIRECT_HEAP
|
||||
NEO_CORE_SKU_INFO_BASE
|
||||
NEO_CORE_SRCS_BUILT_INS
|
||||
NEO_CORE_SRCS_BUILT_IN_KERNELS
|
||||
NEO_CORE_SRCS_BUILT_INS_OPS
|
||||
NEO_CORE_UTILITIES
|
||||
NEO_UNIFIED_MEMORY
|
||||
NEO_CORE_BUILT_INS
|
||||
NEO_CORE_COMMAND_STREAM
|
||||
NEO_CORE_COMMANDS
|
||||
NEO_CORE_COMMAND_CONTAINER
|
||||
NEO_CORE_COMMAND_ENCODERS
|
||||
NEO_CORE_DEBUG_SETTINGS
|
||||
NEO_CORE_DEBUGGER
|
||||
NEO_CORE_DEVICE
|
||||
NEO_CORE_DIRECT_SUBMISSION
|
||||
NEO_CORE_DIRECT_SUBMISSION_DISPATCHERS
|
||||
NEO_CORE_EXECUTION_ENVIRONMENT
|
||||
NEO_CORE_GMM_HELPER
|
||||
NEO_CORE_HELPERS
|
||||
NEO_CORE_IMAGE
|
||||
NEO_CORE_INDIRECT_HEAP
|
||||
NEO_CORE_KERNEL
|
||||
NEO_CORE_MEMORY_MANAGER
|
||||
NEO_CORE_OS_INTERFACE
|
||||
NEO_CORE_PAGE_FAULT_MANAGER
|
||||
NEO_CORE_PROGRAM
|
||||
NEO_CORE_SKU_INFO_BASE
|
||||
NEO_CORE_SRCS_BUILT_INS
|
||||
NEO_CORE_SRCS_BUILT_IN_KERNELS
|
||||
NEO_CORE_SRCS_BUILT_INS_OPS
|
||||
NEO_CORE_UTILITIES
|
||||
NEO_UNIFIED_MEMORY
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
append_sources_from_properties(CORE_SOURCES
|
||||
NEO_CORE_GMM_HELPER_WINDOWS
|
||||
NEO_CORE_DIRECT_SUBMISSION_WINDOWS
|
||||
NEO_CORE_OS_INTERFACE_WINDOWS
|
||||
NEO_CORE_PAGE_FAULT_MANAGER_WINDOWS
|
||||
NEO_CORE_SKU_INFO_WINDOWS
|
||||
NEO_CORE_SRCS_HELPERS_WINDOWS
|
||||
NEO_CORE_UTILITIES_WINDOWS
|
||||
)
|
||||
else()
|
||||
append_sources_from_properties(CORE_SOURCES
|
||||
NEO_CORE_DIRECT_SUBMISSION_LINUX
|
||||
NEO_CORE_OS_INTERFACE_LINUX
|
||||
NEO_CORE_PAGE_FAULT_MANAGER_LINUX
|
||||
NEO_CORE_UTILITIES_LINUX
|
||||
)
|
||||
endif()
|
||||
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${BRANCH_TYPE}/core_sources.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/${BRANCH_TYPE}/core_sources.cmake)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -fPIC")
|
||||
endif()
|
||||
|
@ -16,8 +16,6 @@ set(NEO_CORE_GMM_HELPER
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gmm_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gmm_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gmm_lib.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gmm_types_converter.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gmm_types_converter.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/gmm_utils.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/page_table_mngr.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/page_table_mngr_impl.cpp
|
||||
|
Reference in New Issue
Block a user