celeritas icon indicating copy to clipboard operation
celeritas copied to clipboard

Fix macOS builds with non-apple compilers

Open sethrj opened this issue 1 year ago • 0 comments

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.

sethrj avatar Aug 13 '24 19:08 sethrj