From 999496bb9335c2ffe01898aacad3010b34cf0fdc Mon Sep 17 00:00:00 2001 From: clemahieu Date: Tue, 5 Apr 2016 21:50:48 -0500 Subject: [PATCH] Fixing cmake and adding static variable instance. --- CMakeLists.txt | 2 +- rai/plat/posix/openclapi.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d6f1496..c489a0e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,7 +210,7 @@ set_target_properties (rai_wallet qt_test PROPERTIES LINK_FLAGS "${PLATFORM_LINK if (WIN32) set (PLATFORM_LIBS ws2_32 mswsock) else (WIN32) - set (PLATFORM_LIBS pthread OpenCL) + set (PLATFORM_LIBS pthread dl) endif (WIN32) if (WIN32) diff --git a/rai/plat/posix/openclapi.cpp b/rai/plat/posix/openclapi.cpp index 3cf841b2..5dcc5cc6 100644 --- a/rai/plat/posix/openclapi.cpp +++ b/rai/plat/posix/openclapi.cpp @@ -26,6 +26,8 @@ public: }; } +opencl_initializer opencl_initializer::initializer; + cl_int clGetPlatformIDs (cl_uint num_entries, cl_platform_id * platforms, cl_uint * num_platforms) { cl_int result; @@ -44,4 +46,4 @@ cl_int clGetPlatformIDs (cl_uint num_entries, cl_platform_id * platforms, cl_uin cl_int clGetDeviceIDs (cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id * devices, cl_uint * num_devices) { return clGetDeviceIDs (platform, device_type, num_entries, devices, num_devices); -} \ No newline at end of file +}