Test test_meshing_polyhedron with TBB

One wants to compile and test the TBB and the non-TBB version of Mesh_3
in a single test.
This commit is contained in:
Laurent Rineau 2014-06-25 14:16:18 +02:00
parent 7736059ad1
commit 35165e222d
1 changed files with 14 additions and 9 deletions

View File

@ -26,7 +26,7 @@
#include <CGAL/Polyhedral_mesh_domain_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
template <typename K>
template <typename K, typename Concurrency_tag = CGAL::Sequential_tag>
struct Polyhedron_tester : public Tester<K>
{
void polyhedron() const
@ -35,14 +35,10 @@ struct Polyhedron_tester : public Tester<K>
typedef CGAL::Polyhedron_3<Gt> Polyhedron;
typedef CGAL::Polyhedral_mesh_domain_3<Polyhedron, Gt> Mesh_domain;
#ifdef CGAL_CONCURRENT_MESH_3
typedef CGAL::Mesh_triangulation_3<
typedef typename CGAL::Mesh_triangulation_3<
Mesh_domain,
CGAL::Kernel_traits<Mesh_domain>::Kernel,
CGAL::Parallel_tag>::type Tr;
#else
typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
#endif
typename CGAL::Kernel_traits<Mesh_domain>::Kernel,
Concurrency_tag>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
@ -92,6 +88,15 @@ int main()
Polyhedron_tester<K_e_i> test_epic;
std::cerr << "Mesh generation from a polyhedron:\n";
test_epic.polyhedron();
#ifdef CGAL_LINKED_WITH_TBB
Polyhedron_tester<K_e_i, CGAL::Parallel_tag> test_epic_parallel;
std::cerr << "Mesh generation from a polyhedron using Parallel_tag:\n";
test_epic_parallel.polyhedron();
#else
std::cerr << "TBB is not installed, or not configured."
<< "The parallel version cannot be tested.\n";
#endif
return EXIT_SUCCESS;
}