-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add -Wold-style-cast
and fix related issues
#682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With my recommendation you'd also need to change fewer files. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better or worse, as long as this hides all the warnings from the TBB code, this is the setup that I prefer. (Since this modification of the tbb
library target per definition doesn't change anything about the compilation commands of the TBB library itself.)
Ok, so this fails in the SYCL build, because in that case we take TBB from the global installation in
Any ideas @krasznaa? |
This is a pretty evil error. 😦 Since we now give the local TBB headers as system headers to the oneAPI compiler, it decides that heck, it has "better system headers" for TBB than what we have. And since oneAPI's headers are now included "implicitly", the whole Let me think a bit. 🤔 I may need to call on some Intel developers about this in the end... |
What I'd try is this (not sure if I can suggest patches for unchanged files). In # Set up the correct environment for the SYCL tests.
if [ "${PLATFORM_NAME}" = "SYCL" ]; then
if [ -f "/opt/intel/oneapi/setvars.sh" ]; then
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
fi
fi to # Set up the correct environment for the SYCL tests.
if [ "${PLATFORM_NAME}" = "SYCL" ]; then
if [ -f "/opt/intel/oneapi/setvars.sh" ]; then
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
export CPATH=$(echo $CPATH | sed -e 's/\(^\|:\)[^:]*oneapi\/tbb[^:]*\($\|:\)/:/')
fi
fi That should prevent Intel's code from explicitly picking up its built-in headers. |
That's a good catch that it's the
|
I thought about this, but I'm not sure how important |
I think we're okay without it.
Also: https://github-wiki-see.page/m/oneapi-src/oneAPI-samples/wiki/dpc_common.hpp |
Right, then I'd do something like this: # Set up the correct environment for the SYCL tests.
if [ "${PLATFORM_NAME}" = "SYCL" ]; then
if [ -f "/opt/intel/oneapi/setvars.sh" ]; then
OLD_CPATH=${CPATH}
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
export CPATH=${OLD_CPATH}
fi
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunate that we had to add this semi-ugly CI fix, but that's Intel's fault not ours.
This PR enables
-Wold-style-cast
. TBB unfortunately has lots of these, and some of the examples binaries include TBB headers. To solve this, the builtin TBB target is modified to include directories with-isystem
.