preda / gpuowl

GPU Mersenne primality test.
GNU General Public License v3.0
163 stars 39 forks source link

Enabled Link Time Optimization and updated CI jobs #275

Closed tdulcet closed 8 months ago

tdulcet commented 8 months ago

Here was the compiler error (the warnings were a similar issue):

src/main.cpp: In function 'int main(int, char**)':
src/main.cpp:45:12: error: no matching function for call to 'initLog(const std::filesystem::__cxx11::path::value_type*)'
   45 |     initLog((poolDir / "gpuowl.log").c_str());
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/common.h:5,
                 from src/Args.h:5,
                 from src/main.cpp:4:
src/log.h:11:6: note: candidate: 'void initLog()'
   11 | void initLog();
      |      ^~~~~~~
src/log.h:11:6: note:   candidate expects 0 arguments, 1 provided
src/log.h:12:6: note: candidate: 'void initLog(const char*)'
   12 | void initLog(const char *);
      |      ^~~~~~~
src/log.h:12:14: note:   no known conversion for argument 1 from 'const std::filesystem::__cxx11::path::value_type*' {aka 'const wchar_t*'} to 'const char*'
   12 | void initLog(const char *);
      |              ^~~~~~~~~~~~
make: *** [Makefile:59: build-release/main.o] Error 1

Anyway, all six GitHub Actions jobs now succeed! Note that there are several additional compiler warnings, as well as lots of linter errors from Cppcheck and Clang-Tidy that you may want to look at. Many of the Clang-Tidy errors can be fixed automatically with the --fix flag. See the Actions tab for more information about the issues.

preda commented 8 months ago

Nice, thanks!