oneTBB: TBBConfig.cmake should not add '-isystem /usr/local' to gcc's CXX_INCLUDES flag
TBBConfig.cmake:
https://github.com/intel/tbb/blob/tbb_2019/cmake/templates/TBBConfig.cmake.in#L57
sets the property INTERFACE_INCLUDE_DIRECTORIES to ${CMAKE_CURRENT_LIST_DIR}/../../../include (which equals /usr/include).
It causes that
-isystem /usr/lib64/cmake/TBB/../../../include
(equal -isystem /usr/include)
is being added to gcc’s CXX_INCLUDES flag, what is wrong and causes a compilation error - see https://github.com/pmem/libpmemobj-cpp/issues/508
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (5 by maintainers)
Commits related to this issue
- Do not add '-isystem /usr/local' to gcc's CXX_INCLUDES flag Fixes: #195 Refs: pmem/libpmemobj-cpp#508 — committed to ldorau/oneTBB by ldorau 5 years ago
- threadingbuildingblocks: Update to 2020.3 Changelog: Intel TBB 2020 Update 3 TBB_INTERFACE_VERSION == 11103 Changes (w.r.t. Intel TBB 2020 Update 2): Changes affecting backward compatibility: - Ch... — committed to NetBSD/pkgsrc by ryoon 4 years ago
The fix was implemented in v2020.2: https://github.com/oneapi-src/oneTBB/blob/v2020.2/cmake/templates/TBBConfig.cmake.in#L60
@alalek, @RuRo, thank you for so detailed investigation! I checked it on my side too. The fix is planned to be implemented in one of future TBB releases.
This one works:
Just changing
ABSOLUTEtoREALPATHdoesn’t seem to work.Okay, resolving symlinks in
TBBConfig.cmakelike you suggested worked for me.