-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
FindTBB.cmake: only search TBB in Config mode if version >= 2019 update 5 #5732
FindTBB.cmake: only search TBB in Config mode if version >= 2019 update 5 #5732
Conversation
I think we should fix #5687, instead. That is a bug from TBB before version 2019 update 5, and we have an easy workaround: #5693 (comment). |
Laurent said : "That is a bug in earlier versions of TBB. It was fixed in TBB 2019 update 5. That is a bad interaction with CGAL#5687, that made the module FindTBB.cmake from CGAL search for TBB in Config mode, first."
335449d
to
8d4f147
Compare
Be careful : CMake is fixed but the demo does not compile yet with this fix |
The compilation error is:
That is because we have typedef tbb::concurrent_hash_map<Pair_of_vertices, int> Edge_facet_counter; where
But oneAPI-TBB has switched to the use of In think we should pass explicitly a In TBB, the default argument for template<typename Key>
struct tbb_hash_compare {
static size_t hash( const Key& a ) { return tbb_hasher(a); }
static bool equal( const Key& a, const Key& b ) { return a == b; }
}; (see the ADL call to In oneAPI-TBB, that is: template <typename Key>
class tbb_hash_compare {
public:
std::size_t hash( const Key& a ) const { return my_hash_func(a); }
bool equal( const Key& a, const Key& b ) const { return my_key_equal(a, b); }
private:
std::hash<Key> my_hash_func;
std::equal_to<Key> my_key_equal;
}; (see the use of |
…ake variable) and fix 2019 Update 5 version number
Co-authored-by: Laurent Rineau <Laurent.Rineau@cgal.org>
Successfully tested in https://cgal.geometryfactory.com/CGAL/testsuite/results-5.3-Ic-138.shtml |
…ists_find_tbb-jtournois FindTBB.cmake: only search TBB in Config mode if version >= 2019 update 5
Summary of Changes
Avoid the following error when TBB was already found a few lines earlier, by adding a condition
NOT TBB_FOUND
beforefind_package(TBB)
:Release Management