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

Made BOOST_CHARCONV_HAS_QUADMATH a usage requirement in the Jamfile #252

Merged

Conversation

anarthal
Copy link
Contributor

@anarthal anarthal commented Jan 3, 2025

Removed unnecessary BOOST_CHARCONV_NO_QUADMATH macro definition from CMake
Changed all BOOST_CHARCONV_HAS_FLOAT128 usages into BOOST_CHARCONV_HAS_QUADMATH, which is guaranteed to be correctly propagated
Fixed tests that had missing includes, unnoticed due to being ifdef-ed out by BOOST_CHARCONV_HAS_QUADMATH

close #249

@anarthal
Copy link
Contributor Author

anarthal commented Jan 3, 2025

  • Note that the BOOST_CHARCONV_NO_QUADMATH CMake option is still valid and working. I've only removed the C++ macro definition it caused, as it's not used and doesn't have an equivalent in the Jamfile.
  • BOOST_CHARCONV_HAS_FLOAT128 was defined in the sources only if BOOST_CHARCONV_HAS_QUADMATH, but was then used in header files in the public API, where the macro had no chance of being defined. This led to some of the __float128 overloads being incorrecly ifdef-ed out, even when quadmath is available.
  • Since BOOST_CHARCONV_HAS_QUADMATH was not being propagated in the Jamfile, some tests were not being run and had missing includes. I think I got them right, but it'd be nice if you could review them.
  • I've removed the requirement to link to quadmath in the test Jamfile, since this is now handled by the usage requirement. Note that this also causes the tests to run from CMake, since boost_test_jamfile only picks simple test lines.

@mborland
Copy link
Member

mborland commented Jan 3, 2025

  • Note that the BOOST_CHARCONV_NO_QUADMATH CMake option is still valid and working. I've only removed the C++ macro definition it caused, as it's not used and doesn't have an equivalent in the Jamfile.
  • BOOST_CHARCONV_HAS_FLOAT128 was defined in the sources only if BOOST_CHARCONV_HAS_QUADMATH, but was then used in header files in the public API, where the macro had no chance of being defined. This led to some of the __float128 overloads being incorrecly ifdef-ed out, even when quadmath is available.
  • Since BOOST_CHARCONV_HAS_QUADMATH was not being propagated in the Jamfile, some tests were not being run and had missing includes. I think I got them right, but it'd be nice if you could review them.
  • I've removed the requirement to link to quadmath in the test Jamfile, since this is now handled by the usage requirement. Note that this also causes the tests to run from CMake, since boost_test_jamfile only picks simple test lines.

Thanks for the run down. Your part looks good; I'll come behind and clean up newly exposed warnings/errors.

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.85%. Comparing base (ffd3e71) to head (0cd42b7).
Report is 13 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #252   +/-   ##
========================================
  Coverage    94.85%   94.85%           
========================================
  Files           69       69           
  Lines         9085     9085           
========================================
  Hits          8618     8618           
  Misses         467      467           
Files with missing lines Coverage Δ
include/boost/charconv/detail/buffer_sizing.hpp 100.00% <ø> (ø)
include/boost/charconv/detail/issignaling.hpp 100.00% <ø> (ø)
...lude/boost/charconv/detail/ryu/ryu_generic_128.hpp 92.72% <100.00%> (ø)
include/boost/charconv/from_chars.hpp 100.00% <ø> (ø)
src/to_chars_float_impl.hpp 83.39% <ø> (ø)
test/github_issue_110.cpp 100.00% <ø> (ø)
test/github_issue_152_float128.cpp 100.00% <ø> (ø)
test/test_128bit_emulation.cpp 100.00% <ø> (ø)
test/test_float128.cpp 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffd3e71...0cd42b7. Read the comment docs.

@mborland mborland merged commit 3133adc into boostorg:develop Jan 3, 2025
70 checks passed
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.

BOOST_CHARCONV_QUADMATH_FOUND should be a usage-requirement in the Jamfile, too
2 participants