-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[tbb] compile error(s) if TBB_USE_DEBUG is defined #13846
Comments
I don't see any reproducer! |
...updated... |
TBB were not built with |
I expect to be able to build an application in debug mode via cmake. As gcc implements the standard parallel C++ features via tbb, there is no other option. The issue has nothing to do with TBB beeing or not beeing build with DEBUG Type. The compilation fails in the headers, long before any debug-type lib would be linked. They issue can be easily avoided, if the TBB_USE_DEBUG defines is omitted. However, this define is set by TBBTargets.cmake for any project build in debug mode. For me the solution is simple. As I don't need the TBB_USE_DEBUG functionality at all, I have edited TBBTargets.cmake accordingly. I hope the issue becomes clearer now. |
Just to be clear: the issue is related to building in debug mode, not release mode. To my humble opinion the setting of TBB_USE_DEBUG in TBBTargets.cmake for a debug target is something which should be avoided. |
@OliverSCE I have opened a PR to fix the issue in #13906 |
Description
(TBB_USE_DEBUG is defined automatically if using cmake via TBBTargets.cmake)
Verification
Windows Version
Microsoft Windows Version = "10.0.19041.1806"
MINGW environments affected
Expected behavior
should compile
Actual behavior
1.)
C:/msys64/mingw64/include/oneapi/tbb/profiling.h:148:36: error: cannot convert 'const char*' to 'const tbb::detail::d0::tchar*' {aka 'const wchar_t*'}
148 | r1::itt_set_sync_name(obj, name);
2.) (only in Qt-Projects)
C:/msys64/mingw64/include/oneapi/tbb/profiling.h:229:15: error: expected unqualified-id before ')' token
229 | void emit() { }
(name clash with Qt's emit)
Repro steps
Are you willing to submit a PR?
No response
The text was updated successfully, but these errors were encountered: