celeritas
celeritas copied to clipboard
Fix macOS builds with non-apple compilers
I've had reports from one user building on a macOS machine with Homebrew-installed Clang, and another using a Conda-provided clang, of failures to build Algorithms.hh:
celeritas/src/corecel/math/Algorithms.hh:515:1: error: no member named '__sincospi' in the global namespace
CELER_WRAP_MATH_FLOAT_DBL_PTR_2(__, sincospi)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
celeritas/src/corecel/math/Algorithms.hh:399:18: note: expanded from macro 'CELER_WRAP_MATH_FLOAT_DBL_PTR_2'
return ::PREFIX##FUNC(value, a, b); \
~~^
<scratch space>:100:1: note: expanded from here
__sincospi
^
The __sincospi is an apple extension provided in their SDK, which isn't included by other compilers.