KomputeProject / kompute

General purpose GPU compute framework built on Vulkan to support 1000s of cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends). Blazing fast, mobile-enabled, asynchronous and optimized for advanced GPU data processing usecases. Backed by the Linux Foundation.
http://kompute.cc/
Apache License 2.0
1.99k stars 154 forks source link

Error when enabling `KOMPUTE_ENABLE_SPDLOG` #268

Closed david-cortes closed 2 years ago

david-cortes commented 2 years ago

Using #define KOMPUTE_ENABLE_SPDLOG (as is suggested by the ifdef's in the examples) triggers a compilation error:

kompute/Kompute.hpp:640:26: error: #if with no expression
  640 | #if KOMPUTE_ENABLE_SPDLOG

This is regardles of whether #include <spdlog/spdlog.h> is added before or not.

axsaucedo commented 2 years ago

How are you building the project? By default a value is provided to KOMPUTE_ENABLE_SPDLOG by cmake, so it should still work, are you looking to disable it? If that's the case you just have to add KOMPUTE_ENABLE_SPDLOG=0 - could you try that?

david-cortes commented 2 years ago

Oh, I was thinking this was a configuration option for projects that link to this library rather than for the library itself.

axsaucedo commented 2 years ago

No worries @david-cortes - this is certainly an external variable for users to configure accordingly, but the main thing is that it has to be set to a value otherwise it would error out as you suggest - I think perhaps adding a further note in the docs could provide more context