RenderKit / rkcommon

Intel RenderKit common C++/CMake infrastructure
Apache License 2.0
17 stars 10 forks source link

False compiler warning when building with Apple Clang #12

Closed stukowski closed 2 months ago

stukowski commented 3 months ago

Since v1.14.0 I am getting this warning when building rkcomming on the macOS/arm64 platform with the current Clang compiler:

...
[10/15] Building CXX object rkcommon/CMakeFiles/rkcommon.dir/tasking/detail/tasking_system_init.cpp.o
In file included from /Users/stuko/progs/rkcommon/rkcommon/tasking/detail/tasking_system_init.cpp:26:
In file included from /Users/stuko/progs/rkcommon/rkcommon/math/arm/emulation.h:6:
/Users/stuko/progs/rkcommon/rkcommon/math/arm/sse2neon.h:108:2: warning: "GCC versions earlier than 10 are not supported." [-W#warnings]
#warning "GCC versions earlier than 10 are not supported."
 ^
1 warning generated.

This warning causes problems when building downstream projects such as OSPRay, which treat warnings as errors.

The issue appears to be fixed in upstream sse2neon: https://github.com/DLTcollab/sse2neon/blob/master/sse2neon.h#L120-L122

miroslawpawlowski commented 2 months ago

Thank you for pointing that out. I have prepared 1.14.1 bugfix release to address this. In order to use it in OSPRay superbuild you will need to override both RKCOMMON_VERSION and RKCOMMON_VERSION_REQUIRED CMake variables. e,g. cmake -DRKCOMMON_VERSION=1.14.1 -DRKCOMMON_VERSION_REQUIRED=1.14.1 ../scripts/superbuild

Nevertheless the issue should not prevent OSPRay from building. OSPRay indeed defines a OSPRAY_WARN_AS_ERRORS CMake variable but it is OFF by default.