Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

googlebench: 'numeric_limits' is not a member of 'std' #65

Open
Klummel69 opened this issue Sep 4, 2024 · 2 comments
Open

googlebench: 'numeric_limits' is not a member of 'std' #65

Klummel69 opened this issue Sep 4, 2024 · 2 comments

Comments

@Klummel69
Copy link
Contributor

Hi Mike

I finally have time to deal with fpm again. When I build the project via cmake the following error message appears:

[build] fpm/3rdparty/googlebench/src/benchmark_register.h:18:30: error: 'numeric_limits' is not a member of 'std'

[build]    18 |   static const T kmax = std::numeric_limits<T>::max(); 

Tested with

  • GCC 14.2.0 x86_64-w64-mingw32
  • Clang 18.1.8 x86_64-w64-windows-gnu
  • GCC 11.4.0 x86_64-linux-gnu

The bug is a known issue and has been fixed in later googlebench versions. Workaround see
google/benchmark@3d1c267

File src/benchmark_register.h: add #include <limits>

Wouldn't it make sense to reload googlebench instead of keeping it in the repository?

Regards Klaus

@MikeLankamp
Copy link
Owner

Wouldn't it make sense to reload googlebench instead of keeping it in the repository?

By "reload" you mean use a Git submodule? I was actually thinking of switching fpm to Conan, would that make sense?

@Klummel69
Copy link
Contributor Author

By "reload" you mean use a Git submodule?

Yes, I meant git submodule

I was actually thinking of switching fpm to Conan, would that make sense?

That would also be a possibility (although I have had little experience as a user with conan so far). Conan probably makes sense if there are many dependencies on large packages.

Addendum: I am currently testing different sin(), cos() variants regarding accuracy and speed. The current builds for accuracy and benchmark use external packages (libfixmath, libcnl), which I don't currently need. It would be practical if the accuracy / benchmark code was not so heavily dependent on the external packages.
Since I want to do the evaluation with Jupyter Notebooks, I will create a test project that uses fpm as a submodule and contains my own test code.

As soon as I'm ready I'll put it on github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@MikeLankamp @Klummel69 and others