Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ option(OPENCL_ICD_LOADER_BUILD_SHARED_LIBS "Build OpenCL ICD Loader as shared li
# It is currently needed default while the specification is being formalized,
# and to study the performance impact.
option (ENABLE_OPENCL_LAYERS "Enable OpenCL Layers" ON)
option (ENABLE_OPENCL_LOADER_MANAGED_DISPATCH "Enable OpenCL Loader managed dispatch" ON)
include(CMakeDependentOption)
cmake_dependent_option(ENABLE_OPENCL_LOADER_MANAGED_DISPATCH "Enable OpenCL Loader managed dispatch" ON OPENCL_ICD_LOADER_BUILD_SHARED_LIBS OFF)
cmake_dependent_option(ENABLE_OPENCL_LAYERINFO "Enable building cllayerinfo tool" ON ENABLE_OPENCL_LAYERS OFF)

include(GNUInstallDirs)
Expand Down Expand Up @@ -170,6 +170,7 @@ set (OPENCL_COMPILE_DEFINITIONS
OPENCL_ICD_LOADER_VERSION_REV=8
$<$<BOOL:${ENABLE_OPENCL_LAYERS}>:CL_ENABLE_LAYERS>
$<$<BOOL:${ENABLE_OPENCL_LOADER_MANAGED_DISPATCH}>:CL_ENABLE_LOADER_MANAGED_DISPATCH>
$<$<BOOL:${OPENCL_ICD_LOADER_BUILD_SHARED_LIBS}>:CL_SHARED_BUILD>
)

target_compile_definitions (OpenCL
Expand Down
2 changes: 1 addition & 1 deletion loader/windows/icd_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void khrIcdOsVendorsEnumerateOnce()
InitOnceExecuteOnce(&initialized, khrIcdOsVendorsEnumerate, NULL, NULL);
}

#ifndef CL_LAYER_INFO
#if !defined(CL_LAYER_INFO) && defined(CL_SHARED_BUILD)
BOOL APIENTRY DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
(void)hinst;
(void)reserved;
Expand Down