clMathLibraries / clBLAS

a software library containing BLAS functions written in OpenCL
Apache License 2.0
839 stars 240 forks source link

Is there a debug build option? #241

Closed anadon closed 8 years ago

anadon commented 8 years ago

I was looking at https://github.com/clMathLibraries/clBLAS/wiki/Build to see if there were a way to enable a global '-g' flag during compilation and having debug information included in the resulting libraries and test programs. I do not see such an option. Is this something that needs to be added or added to the build page?

In particular, the backtrace on test-short is hard to read when it is segfaulting on my system.

pavanky commented 8 years ago

cmake -DCMAKE_BUILD_TYPE=Debug should do the trick. If this is not enough, you should be able to pass additional flags to cmake like this: CFLAGS=MYCFLAGS CXXFLAGS=CFLAGS cmake -DCMAKE_BUILD_TYPE=Debug

anadon commented 8 years ago

Added a small blurb in the build wiki page.

pavanky commented 8 years ago

BTW what you added to the wiki is not specific to clBLAS, it is a cmake feature and is consistent across all projects using cmake.

anadon commented 8 years ago

Maybe I should leave linux land more often then >_<