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

Fix: ***WARNING*** Library was built as DEBUG. Timings may be affected. #127

Merged

Conversation

MarkReedZ
Copy link
Contributor

When google benchmark is built with cmake you must define NDEBUG when doing a release build or it will build in asserts and complain with

***WARNING*** Library was built as DEBUG. Timings may be affected.

@MarkReedZ
Copy link
Contributor Author

Do we need to add a CI to test against various platforms?

@ashvardanian
Copy link
Owner

No need for CI, but would be great to use target-specific definitions.

@MarkReedZ
Copy link
Contributor Author

Done.

  # Remove the google benchmark built in debug warning
  if (CMAKE_BUILD_TYPE STREQUAL "Release")
    target_compile_definitions( benchmark PRIVATE NDEBUG ) 
  endif()

@ashvardanian ashvardanian merged commit 2c5cd1e into ashvardanian:main-dev Jun 2, 2024
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

Successfully merging this pull request may close these issues.

2 participants