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.88k stars 145 forks source link

Fix example build #340

Closed ToKiNoBug closed 8 months ago

ToKiNoBug commented 9 months ago

I see 2 example tests in "C++ Test" action failed after merging my PR.

It was caused by CMAKE_SOURCE_DIR in file cmake/set_package_info.cmake to access readme and license files. It seems ok beacuse they works almost the same as PROJECT_SOURCE_DIR, but in example builds CMAKE_SOURCE_DIR points to examples/logistic_regression , however license and readme files are not located here.

So I replaced CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR to fix this.

The cpp_example gh action is also changed. Before this, cmd line parameter KOMPUTE_OPT_FROM_SOURCE=ON doesn't start with a -D prefix, so it will be ignored without any warnings and the value of KOMPUTE_OPT_FROM_SOURCE is still false. As a result, example builds will still access kompute from the remote master branch instead of the parent directory. I have to fix this, otherwise gh actions will always fail.