mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-22 19:49:36 +00:00
Adjust API version logic
This commit is contained in:
parent
d735caa334
commit
ca8bef3ade
2 changed files with 8 additions and 2 deletions
|
@ -18,6 +18,8 @@ option(WITH_MSR "Enable MSR mod & 1st-gen Ryzen fix" ON)
|
|||
option(WITH_ENV_VARS "Enable environment variables support in config file" ON)
|
||||
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
|
||||
option(WITH_OPENCL "Enable OpenCL backend" ON)
|
||||
set(WITH_OPENCL_VERSION 200 CACHE STRING "Target OpenCL version")
|
||||
set_property(CACHE WITH_OPENCL_VERSION PROPERTY STRINGS 120 200 210 220)
|
||||
option(WITH_CUDA "Enable CUDA backend" ON)
|
||||
option(WITH_NVML "Enable NVML (NVIDIA Management Library) support (only if CUDA backend enabled)" ON)
|
||||
option(WITH_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON)
|
||||
|
|
|
@ -5,9 +5,13 @@ if (BUILD_STATIC AND XMRIG_OS_UNIX AND WITH_OPENCL)
|
|||
endif()
|
||||
|
||||
if (WITH_OPENCL)
|
||||
add_definitions(/DCL_TARGET_OPENCL_VERSION=200)
|
||||
add_definitions(/DCL_USE_DEPRECATED_OPENCL_1_2_APIS)
|
||||
add_definitions(/DXMRIG_FEATURE_OPENCL)
|
||||
add_definitions(/DCL_USE_DEPRECATED_OPENCL_1_2_APIS)
|
||||
if (XMRIG_OS_APPLE)
|
||||
add_definitions(/DCL_TARGET_OPENCL_VERSION=120)
|
||||
elseif (WITH_OPENCL_VERSION)
|
||||
add_definitions(/DCL_TARGET_OPENCL_VERSION=${WITH_OPENCL_VERSION})
|
||||
endif()
|
||||
|
||||
set(HEADERS_BACKEND_OPENCL
|
||||
src/backend/opencl/cl/OclSource.h
|
||||
|
|
Loading…
Reference in a new issue