From 99ed1e38625cf3a7a3446bd5561ee118828416d6 Mon Sep 17 00:00:00 2001 From: Bogumil Sapinski Date: Fri, 23 Jun 2023 12:42:24 +0200 Subject: [PATCH 1/2] fixed warning unused function in UT --- tests/test_openclhpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_openclhpp.cpp b/tests/test_openclhpp.cpp index c794b16b..fd7ed5d1 100644 --- a/tests/test_openclhpp.cpp +++ b/tests/test_openclhpp.cpp @@ -1310,6 +1310,7 @@ void testBufferConstructorQueueIterator(void) clReleaseCommandQueue_ExpectAndReturn(make_command_queue(0), CL_SUCCESS); } +#if CL_HPP_TARGET_OPENCL_VERSION >= 300 static cl_mem clCreateBufferWithProperties_testBufferWithProperties( cl_context context, const cl_mem_properties *properties, @@ -1334,7 +1335,6 @@ static cl_mem clCreateBufferWithProperties_testBufferWithProperties( void testBufferWithProperties(void) { -#if CL_HPP_TARGET_OPENCL_VERSION >= 300 clCreateBufferWithProperties_StubWithCallback(clCreateBufferWithProperties_testBufferWithProperties); VECTOR_CLASS props{11}; @@ -1346,8 +1346,8 @@ void testBufferWithProperties(void) // prevent destructor from interfering with the test buffer() = nullptr; -#endif } +#endif //CL_HPP_TARGET_OPENCL_VERSION >= 300 /**************************************************************************** * Tests for cl::Image1DBuffer From 47765a478b212610bd093e9c0f00e588324609e0 Mon Sep 17 00:00:00 2001 From: Bogumil Sapinski Date: Thu, 29 Jun 2023 16:22:46 +0200 Subject: [PATCH 2/2] fixing linking issue --- tests/test_openclhpp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_openclhpp.cpp b/tests/test_openclhpp.cpp index fd7ed5d1..52ff198f 100644 --- a/tests/test_openclhpp.cpp +++ b/tests/test_openclhpp.cpp @@ -1332,9 +1332,11 @@ static cl_mem clCreateBufferWithProperties_testBufferWithProperties( return make_mem(0); } +#endif //CL_HPP_TARGET_OPENCL_VERSION >= 300 void testBufferWithProperties(void) { +#if CL_HPP_TARGET_OPENCL_VERSION >= 300 clCreateBufferWithProperties_StubWithCallback(clCreateBufferWithProperties_testBufferWithProperties); VECTOR_CLASS props{11}; @@ -1346,8 +1348,8 @@ void testBufferWithProperties(void) // prevent destructor from interfering with the test buffer() = nullptr; -} #endif //CL_HPP_TARGET_OPENCL_VERSION >= 300 +} /**************************************************************************** * Tests for cl::Image1DBuffer