diff --git a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h index 12faf7e2a0c..9a88014752d 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h @@ -72,16 +72,16 @@ struct property_map namespace CGAL { \ template \ typename boost::property_map >::type \ -get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ } \ \ template \ typename boost::property_map >::const_type \ -get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ }\ } //CGAL namespace @@ -131,16 +131,16 @@ struct property_map namespace CGAL { \ template \ typename boost::property_map >::type \ -get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ } \ \ template \ typename boost::property_map >::const_type \ -get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ }\ } //CGAL namespace diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h index ee95f6c0f85..ac3731b8adc 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h @@ -77,13 +77,17 @@ namespace internal { std::vector< Intersection_result > inters; intersection(*c_pq, *c_qr, std::back_inserter(inters)); - CGAL_assertion(assign(pair, inters[0])); + CGAL_assertion_code(bool ok=) + assign(pair, inters[0]); + CGAL_assertion(ok); if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; - CGAL_assertion(assign(pair, inters[1])); + CGAL_assertion_code(bool ok=) + assign(pair, inters[1]); + CGAL_assertion(ok); return pair.first; } return pair.first; @@ -104,13 +108,17 @@ namespace internal { std::vector< Intersection_result > inters; intersection(*l, *c, std::back_inserter(inters)); - CGAL_assertion(assign(pair,inters[0])); + CGAL_assertion_code(bool ok=) + assign(pair,inters[0]); + CGAL_assertion(ok); if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; - CGAL_assertion(assign(pair, inters[1])); + CGAL_assertion_code(bool ok=) + assign(pair, inters[1]); + CGAL_assertion(ok); return pair.first; } return pair.first; @@ -240,12 +248,16 @@ namespace internal { intersection(bis_pq, l_inf, std::back_inserter(inters)); std::pair pair; - CGAL_assertion(assign(pair,inters[0])); + CGAL_assertion_code(bool ok=) + assign(pair,inters[0]); + CGAL_assertion(ok); CGAL_assertion(pair.second == 1); if(_gt.less_y_2_object()(p, q)) return Line_arc_2(bis_pq,a,pair.first); - CGAL_assertion(assign(pair,inters[1])); + CGAL_assertion_code(ok=) + assign(pair,inters[1]); + CGAL_assertion(ok); CGAL_assertion(pair.second == 1); return Line_arc_2(bis_pq,a,pair.first); } @@ -261,7 +273,9 @@ namespace internal { intersection(*c_pq, l_inf, std::back_inserter(inters)); std::pair pair; - CGAL_assertion(assign(pair,inters[0])); + CGAL_assertion_code(bool ok=) + assign(pair,inters[0]); + CGAL_assertion(ok); CGAL_assertion(pair.second == 1); Hyperbolic_point_2 approx_pinf(to_double(pair.first.x()), to_double(pair.first.y())); @@ -275,7 +289,9 @@ namespace internal { return Circular_arc_2(*c_pq, pair.first, a); } - CGAL_assertion(assign(pair,inters[1])); + CGAL_assertion_code(ok=) + assign(pair,inters[1]); + CGAL_assertion(ok); if(_gt.orientation_2_object()(approx_c,approx_a,approx_pinf) == POSITIVE) return Circular_arc_2(*c_pq, pair.first, a); diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 6e6104b6f0c..7ec3a5575ce 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -433,12 +433,12 @@ if("${CMAKE_CXX_COMPILER}" MATCHES "icl" OR "${CMAKE_CXX_COMPILER}" MATCHES ) else() message( - STATUS "Using Intel Compiler version 11 or later. Adding -fp-model strict" + STATUS "Using Intel Compiler version 11 or later. Adding -fp-model=strict" ) if(WIN32) uniquely_add_flags(CGAL_CXX_FLAGS "/fp:strict") else() - uniquely_add_flags(CGAL_CXX_FLAGS "-fp-model strict") + uniquely_add_flags(CGAL_CXX_FLAGS "-fp-model=strict") endif() endif() endif() diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 60e2bd25c4d..e3dadc7b4e4 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -132,11 +132,19 @@ function(CGAL_setup_CGAL_flags target) $<$:/bigobj> # Use /bigobj by default ) elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") - message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) - if(WIN32) - target_compile_options(${target} INTERFACE "/fp:strict") + # cuda knows how to deal with 'fp-model=strict' but not 'fp-model strict' + if(CMAKE_VERSION VERSION_LESS 3.3) + if(WIN32) + target_compile_options(${target} INTERFACE "/fp:strict") + else() + target_compile_options(${target} INTERFACE "-fp-model=strict") + endif() else() - target_compile_options(${target} INTERFACE "-fp-model" "strict") + if(WIN32) + target_compile_options(${target} INTERFACE "$<$:/fp:strict>") + else() + target_compile_options(${target} INTERFACE "$<$:-fp-model=strict>") + endif() endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") message( STATUS "Using SunPro compiler, using STLPort 4." ) diff --git a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h index 2689f86253c..842ff86f7cd 100644 --- a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h +++ b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h @@ -443,11 +443,11 @@ template , \ TAG >::const_type \ -get(TAG, const Linear_cell_complex_for_combinatorial_map&) \ +get(TAG, const Linear_cell_complex_for_combinatorial_map&, const T& default_value = T()) \ { \ typedef Linear_cell_complex_for_combinatorial_map LCC;\ typedef typename boost::graph_traits::DESC DESC; \ - return internal::Dynamic_property_map();\ + return internal::Dynamic_property_map(default_value);\ } \ \ template , \ TAG >::type \ -get(TAG, Linear_cell_complex_for_combinatorial_map&) \ +get(TAG, Linear_cell_complex_for_combinatorial_map&, const T& default_value = T()) \ { \ typedef Linear_cell_complex_for_combinatorial_map LCC;\ typedef typename boost::graph_traits::DESC DESC; \ - return internal::Dynamic_property_map();\ + return internal::Dynamic_property_map(default_value);\ } \ } diff --git a/Number_types/include/CGAL/Interval_nt.h b/Number_types/include/CGAL/Interval_nt.h index 4a03e3ef882..f70312178b7 100644 --- a/Number_types/include/CGAL/Interval_nt.h +++ b/Number_types/include/CGAL/Interval_nt.h @@ -285,9 +285,9 @@ private: // the 2 negations and we get wrong rounding. typename Interval_nt<>::Internal_protector P; CGAL_assertion_msg(-CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1), - "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?"); + "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model=strict for Intel)?"); CGAL_assertion_msg(-CGAL_IA_DIV(-1., 10) != CGAL_IA_DIV(1., 10), - "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?"); + "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model=strict for Intel)?"); } }; diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_io.cpp b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_io.cpp index fa3220b0635..212d72f7112 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_io.cpp +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_io.cpp @@ -21,9 +21,10 @@ typedef Remeshing_triangulation::Cell_handle Cell_handle; int main(int argc, char* argv[]) { + const unsigned int nbv = (argc > 1) ? atoi(argv[1]) : 100; - CGAL::Random rng; + CGAL::Random rng = CGAL::get_default_random(); std::cout << "CGAL Random seed = " << CGAL::get_default_random().get_seed() << std::endl; std::vector points;