If I build an openCL Program from source code like this
cl::Program program = cl::Program(context, sourceCode);
program.build(devices);
I would like to check if this was successful. I saw a few examples of how to do this in C, but since my project ist in C++ I was wondering how to get (in case something goes wrong) a readable text message that indicates what might be the issue using the C++ wrapper.
I have also enabled exceptions
#define CL_HPP_ENABLE_EXCEPTIONS
but do not know if build(...)
throws an exception.
I am using the AMD APP SDK 3.0 and the cl2.hpp
from the Khronos webpage (as it was not included in the SDK).