mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Adding configurable windows dll exports file
Allows having a single .def file template while supporting dynamic concatenation of exported functions to the list Change-Id: I5186f2f028092bad7e2968b96062edd96454d81d
This commit is contained in:
committed by
sys_ocldev
parent
ff1d2361f3
commit
e035996fcc
@@ -54,3 +54,12 @@ macro(create_project_source_tree target)
|
||||
endforeach()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(create_project_source_tree_with_exports target exports_filename)
|
||||
create_project_source_tree(${target})
|
||||
if(MSVC)
|
||||
if(NOT "${exports_filename}" STREQUAL "")
|
||||
source_group("exports" FILES "${exports_filename}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -27,6 +27,8 @@ if(POLICY CMP0063)
|
||||
endif()
|
||||
|
||||
project(neo)
|
||||
set(MSVC_DEF_ADDITIONAL_EXPORTS "")
|
||||
|
||||
if(NOT TARGET ${BIKSIM_LIB_NAME})
|
||||
add_subdirectory(builtin_kernels_simulation)
|
||||
endif()
|
||||
@@ -108,14 +110,6 @@ if(INSTRUMENTATION_LIB_NAME)
|
||||
add_dependencies(${NEO_STATIC_LIB_NAME} ${INSTRUMENTATION_LIB_NAME})
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(GTPIN_HEADERS_DIR)
|
||||
set( DEF_FILE "${CMAKE_CURRENT_SOURCE_DIR}/dll/windows/GTPinExports${IGDRCL_OPTION__BITS}.def" )
|
||||
else()
|
||||
set( DEF_FILE "${CMAKE_CURRENT_SOURCE_DIR}/dll/windows/OpenCLExports${IGDRCL_OPTION__BITS}.def" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND LIB_FLAGS_DEFINITIONS -DCIF_HEADERS_ONLY_BUILD ${SUPPORTED_GEN_FLAGS_DEFINITONS})
|
||||
|
||||
target_compile_definitions(${NEO_STATIC_LIB_NAME} PUBLIC ${LIB_FLAGS_DEFINITIONS})
|
||||
@@ -126,6 +120,14 @@ set_property(TARGET ${NEO_STATIC_LIB_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS
|
||||
|
||||
set_target_properties(${NEO_STATIC_LIB_NAME} PROPERTIES FOLDER "opencl runtime")
|
||||
|
||||
set(EXPORTS_FILENAME "")
|
||||
if(WIN32)
|
||||
set(EXPORTS_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/OpenCLExports${IGDRCL_OPTION__BITS}.def")
|
||||
set(MSVC_DEF_LIB_NAME "igdrcl${IGDRCL_OPTION__BITS}")
|
||||
set(MSVC_DEF_HEADER "This file was generated during CMake project configuration - please don't edit")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dll/windows/OpenCLExports.def.in" "${EXPORTS_FILENAME}")
|
||||
endif(WIN32)
|
||||
|
||||
if(${GENERATE_EXECUTABLE})
|
||||
if(GTPIN_HEADERS_DIR)
|
||||
foreach(GEN_TYPE ${ALL_GEN_TYPES})
|
||||
@@ -182,7 +184,7 @@ if(${GENERATE_EXECUTABLE})
|
||||
OUTPUT_NAME "${NEO_DLL_NAME_BASE}${IGDRCL_NAME_POSTFIX}${IGDRCL_OPTION__BITS}"
|
||||
)
|
||||
set_target_properties(${NEO_DYNAMIC_LIB_NAME} PROPERTIES FOLDER "opencl runtime")
|
||||
create_project_source_tree(${NEO_DYNAMIC_LIB_NAME})
|
||||
create_project_source_tree_with_exports(${NEO_DYNAMIC_LIB_NAME} "${EXPORTS_FILENAME}")
|
||||
endif(${GENERATE_EXECUTABLE})
|
||||
|
||||
create_project_source_tree(${NEO_STATIC_LIB_NAME})
|
||||
|
||||
@@ -37,9 +37,9 @@ set(RUNTIME_SRCS_DLL_BASE
|
||||
${IGDRCL_SOURCE_DIR}/runtime/helpers/debug_helpers.cpp
|
||||
${IGDRCL_SOURCE_DIR}/runtime/program/evaluate_unhandled_token.cpp
|
||||
|
||||
${DEF_FILE}
|
||||
${GTPIN_INIT_FILE}
|
||||
${HW_SRC_LINK}
|
||||
${EXPORTS_FILENAME}
|
||||
)
|
||||
|
||||
set(RUNTIME_SRCS_DLL_LINUX
|
||||
@@ -57,4 +57,4 @@ if(WIN32)
|
||||
target_sources(${NEO_DYNAMIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_DLL_WINDOWS})
|
||||
else()
|
||||
target_sources(${NEO_DYNAMIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_DLL_LINUX})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
; Copyright (c) 2017, Intel Corporation
|
||||
;
|
||||
; Permission is hereby granted, free of charge, to any person obtaining a
|
||||
; copy of this software and associated documentation files (the "Software"),
|
||||
; to deal in the Software without restriction, including without limitation
|
||||
; the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
; and/or sell copies of the Software, and to permit persons to whom the
|
||||
; Software is furnished to do so, subject to the following conditions:
|
||||
;
|
||||
; The above copyright notice and this permission notice shall be included
|
||||
; in all copies or substantial portions of the Software.
|
||||
;
|
||||
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
; OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
; ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
; OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
LIBRARY "igdrcl64"
|
||||
EXPORTS
|
||||
clGetPlatformIDs
|
||||
clGetPlatformInfo
|
||||
clGetDeviceIDs
|
||||
clGetDeviceInfo
|
||||
clCreateContext
|
||||
clCreateContextFromType
|
||||
clRetainContext
|
||||
clReleaseContext
|
||||
clGetContextInfo
|
||||
clCreateCommandQueue
|
||||
clRetainCommandQueue
|
||||
clReleaseCommandQueue
|
||||
clGetCommandQueueInfo
|
||||
clCreateBuffer
|
||||
clCreateImage2D
|
||||
clCreateImage3D
|
||||
clRetainMemObject
|
||||
clReleaseMemObject
|
||||
clGetSupportedImageFormats
|
||||
clGetMemObjectInfo
|
||||
clGetImageInfo
|
||||
clCreateSampler
|
||||
clRetainSampler
|
||||
clReleaseSampler
|
||||
clGetSamplerInfo
|
||||
clCreateProgramWithSource
|
||||
clCreateProgramWithBinary
|
||||
clRetainProgram
|
||||
clReleaseProgram
|
||||
clBuildProgram
|
||||
clGetProgramInfo
|
||||
clGetProgramBuildInfo
|
||||
clCreateKernel
|
||||
clCreateKernelsInProgram
|
||||
clRetainKernel
|
||||
clReleaseKernel
|
||||
clSetKernelArg
|
||||
clGetKernelInfo
|
||||
clGetKernelSubGroupInfoKHR
|
||||
clGetKernelWorkGroupInfo
|
||||
clWaitForEvents
|
||||
clGetEventInfo
|
||||
clRetainEvent
|
||||
clReleaseEvent
|
||||
clGetEventProfilingInfo
|
||||
clFlush
|
||||
clFinish
|
||||
clEnqueueReadBuffer
|
||||
clEnqueueWriteBuffer
|
||||
clEnqueueCopyBuffer
|
||||
clEnqueueReadImage
|
||||
clEnqueueWriteImage
|
||||
clEnqueueCopyImage
|
||||
clEnqueueCopyImageToBuffer
|
||||
clEnqueueCopyBufferToImage
|
||||
clEnqueueMapBuffer
|
||||
clEnqueueMapImage
|
||||
clEnqueueUnmapMemObject
|
||||
clEnqueueNDRangeKernel
|
||||
clEnqueueTask
|
||||
clEnqueueNativeKernel
|
||||
clEnqueueMarker
|
||||
clEnqueueWaitForEvents
|
||||
clEnqueueBarrier
|
||||
clGetExtensionFunctionAddress
|
||||
GTPin_Init
|
||||
@@ -1,4 +1,4 @@
|
||||
; Copyright (c) 2017, Intel Corporation
|
||||
; Copyright (c) 2017 - 2018, Intel Corporation
|
||||
;
|
||||
; Permission is hereby granted, free of charge, to any person obtaining a
|
||||
; copy of this software and associated documentation files (the "Software"),
|
||||
@@ -18,7 +18,9 @@
|
||||
; ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
; OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
LIBRARY "igdrcl32"
|
||||
; ${MSVC_DEF_HEADER}
|
||||
|
||||
LIBRARY "${MSVC_DEF_LIB_NAME}"
|
||||
EXPORTS
|
||||
clGetPlatformIDs
|
||||
clGetPlatformInfo
|
||||
@@ -85,4 +87,4 @@ clEnqueueMarker
|
||||
clEnqueueWaitForEvents
|
||||
clEnqueueBarrier
|
||||
clGetExtensionFunctionAddress
|
||||
GTPin_Init
|
||||
${MSVC_DEF_ADDITIONAL_EXPORTS}
|
||||
@@ -1,87 +0,0 @@
|
||||
; Copyright (c) 2017, Intel Corporation
|
||||
;
|
||||
; Permission is hereby granted, free of charge, to any person obtaining a
|
||||
; copy of this software and associated documentation files (the "Software"),
|
||||
; to deal in the Software without restriction, including without limitation
|
||||
; the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
; and/or sell copies of the Software, and to permit persons to whom the
|
||||
; Software is furnished to do so, subject to the following conditions:
|
||||
;
|
||||
; The above copyright notice and this permission notice shall be included
|
||||
; in all copies or substantial portions of the Software.
|
||||
;
|
||||
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
; OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
; ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
; OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
LIBRARY "igdrcl32"
|
||||
EXPORTS
|
||||
clGetPlatformIDs
|
||||
clGetPlatformInfo
|
||||
clGetDeviceIDs
|
||||
clGetDeviceInfo
|
||||
clCreateContext
|
||||
clCreateContextFromType
|
||||
clRetainContext
|
||||
clReleaseContext
|
||||
clGetContextInfo
|
||||
clCreateCommandQueue
|
||||
clRetainCommandQueue
|
||||
clReleaseCommandQueue
|
||||
clGetCommandQueueInfo
|
||||
clCreateBuffer
|
||||
clCreateImage2D
|
||||
clCreateImage3D
|
||||
clRetainMemObject
|
||||
clReleaseMemObject
|
||||
clGetSupportedImageFormats
|
||||
clGetMemObjectInfo
|
||||
clGetImageInfo
|
||||
clCreateSampler
|
||||
clRetainSampler
|
||||
clReleaseSampler
|
||||
clGetSamplerInfo
|
||||
clCreateProgramWithSource
|
||||
clCreateProgramWithBinary
|
||||
clRetainProgram
|
||||
clReleaseProgram
|
||||
clBuildProgram
|
||||
clGetProgramInfo
|
||||
clGetProgramBuildInfo
|
||||
clCreateKernel
|
||||
clCreateKernelsInProgram
|
||||
clRetainKernel
|
||||
clReleaseKernel
|
||||
clSetKernelArg
|
||||
clGetKernelInfo
|
||||
clGetKernelSubGroupInfoKHR
|
||||
clGetKernelWorkGroupInfo
|
||||
clWaitForEvents
|
||||
clGetEventInfo
|
||||
clRetainEvent
|
||||
clReleaseEvent
|
||||
clGetEventProfilingInfo
|
||||
clFlush
|
||||
clFinish
|
||||
clEnqueueReadBuffer
|
||||
clEnqueueWriteBuffer
|
||||
clEnqueueCopyBuffer
|
||||
clEnqueueReadImage
|
||||
clEnqueueWriteImage
|
||||
clEnqueueCopyImage
|
||||
clEnqueueCopyImageToBuffer
|
||||
clEnqueueCopyBufferToImage
|
||||
clEnqueueMapBuffer
|
||||
clEnqueueMapImage
|
||||
clEnqueueUnmapMemObject
|
||||
clEnqueueNDRangeKernel
|
||||
clEnqueueTask
|
||||
clEnqueueNativeKernel
|
||||
clEnqueueMarker
|
||||
clEnqueueWaitForEvents
|
||||
clEnqueueBarrier
|
||||
clGetExtensionFunctionAddress
|
||||
@@ -1,87 +0,0 @@
|
||||
; Copyright (c) 2017, Intel Corporation
|
||||
;
|
||||
; Permission is hereby granted, free of charge, to any person obtaining a
|
||||
; copy of this software and associated documentation files (the "Software"),
|
||||
; to deal in the Software without restriction, including without limitation
|
||||
; the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
; and/or sell copies of the Software, and to permit persons to whom the
|
||||
; Software is furnished to do so, subject to the following conditions:
|
||||
;
|
||||
; The above copyright notice and this permission notice shall be included
|
||||
; in all copies or substantial portions of the Software.
|
||||
;
|
||||
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
; OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
; ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
; OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
LIBRARY "igdrcl64"
|
||||
EXPORTS
|
||||
clGetPlatformIDs
|
||||
clGetPlatformInfo
|
||||
clGetDeviceIDs
|
||||
clGetDeviceInfo
|
||||
clCreateContext
|
||||
clCreateContextFromType
|
||||
clRetainContext
|
||||
clReleaseContext
|
||||
clGetContextInfo
|
||||
clCreateCommandQueue
|
||||
clRetainCommandQueue
|
||||
clReleaseCommandQueue
|
||||
clGetCommandQueueInfo
|
||||
clCreateBuffer
|
||||
clCreateImage2D
|
||||
clCreateImage3D
|
||||
clRetainMemObject
|
||||
clReleaseMemObject
|
||||
clGetSupportedImageFormats
|
||||
clGetMemObjectInfo
|
||||
clGetImageInfo
|
||||
clCreateSampler
|
||||
clRetainSampler
|
||||
clReleaseSampler
|
||||
clGetSamplerInfo
|
||||
clCreateProgramWithSource
|
||||
clCreateProgramWithBinary
|
||||
clRetainProgram
|
||||
clReleaseProgram
|
||||
clBuildProgram
|
||||
clGetProgramInfo
|
||||
clGetProgramBuildInfo
|
||||
clCreateKernel
|
||||
clCreateKernelsInProgram
|
||||
clRetainKernel
|
||||
clReleaseKernel
|
||||
clSetKernelArg
|
||||
clGetKernelInfo
|
||||
clGetKernelSubGroupInfoKHR
|
||||
clGetKernelWorkGroupInfo
|
||||
clWaitForEvents
|
||||
clGetEventInfo
|
||||
clRetainEvent
|
||||
clReleaseEvent
|
||||
clGetEventProfilingInfo
|
||||
clFlush
|
||||
clFinish
|
||||
clEnqueueReadBuffer
|
||||
clEnqueueWriteBuffer
|
||||
clEnqueueCopyBuffer
|
||||
clEnqueueReadImage
|
||||
clEnqueueWriteImage
|
||||
clEnqueueCopyImage
|
||||
clEnqueueCopyImageToBuffer
|
||||
clEnqueueCopyBufferToImage
|
||||
clEnqueueMapBuffer
|
||||
clEnqueueMapImage
|
||||
clEnqueueUnmapMemObject
|
||||
clEnqueueNDRangeKernel
|
||||
clEnqueueTask
|
||||
clEnqueueNativeKernel
|
||||
clEnqueueMarker
|
||||
clEnqueueWaitForEvents
|
||||
clEnqueueBarrier
|
||||
clGetExtensionFunctionAddress
|
||||
@@ -32,6 +32,11 @@ if(GTPIN_HEADERS_DIR)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_notify.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_defs.h
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(MSVC_DEF_ADDITIONAL_EXPORTS "${MSVC_DEF_ADDITIONAL_EXPORTS}\nGTPin_Init")
|
||||
endif()
|
||||
|
||||
else()
|
||||
set(RUNTIME_SRCS_GTPIN
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
@@ -41,3 +46,4 @@ else()
|
||||
endif()
|
||||
|
||||
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_GTPIN})
|
||||
set(MSVC_DEF_ADDITIONAL_EXPORTS "${MSVC_DEF_ADDITIONAL_EXPORTS}" PARENT_SCOPE)
|
||||
|
||||
Reference in New Issue
Block a user