From 69e5072cc1dcfc4e2458a662b7651da26087c398 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 29 Jul 2019 11:46:26 +0200 Subject: [PATCH 1/2] Get rid of the two fake lines in ctest_testsuite --- Installation/cmake/modules/CGAL_add_test.cmake | 2 ++ Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index 20e19256c74..c25390304d7 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -104,6 +104,8 @@ function(cgal_add_compilation_test exe_name) if(NOT TEST check_build_system) add_test(NAME "check_build_system" COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system") + set_property(TEST "check_build_system" + APPEND PROPERTY LABELS "Installation") if(POLICY CMP0066) # cmake 3.7 or later set_property(TEST "check_build_system" PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture") diff --git a/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt b/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt index 6d3fcbd6a36..cf4af000cd5 100644 --- a/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt @@ -1,7 +1,5 @@ # This is the CMake script for compiling the CGAL Mesh_3 demo implicit functions. -project( Mesh_3_implicit_functions ) - include( polyhedron_demo_macros ) cmake_minimum_required(VERSION 3.1) From 49d526c1cf43bc6e9a6603c0b682864dd019dbc0 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 29 Jul 2019 14:30:03 +0200 Subject: [PATCH 2/2] add missing () around min and max for windows --- .../CGAL/Mesh_3/Mesh_global_optimizer.h | 4 ++-- .../CGAL/Mesh_3/Worksharing_data_structures.h | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h index 69183b48057..dd46350f90d 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h @@ -138,7 +138,7 @@ protected: , m_lock_ds(bbox, num_grid_cells_per_axis) { big_moves_current_size_ = 0; - big_moves_smallest_ = std::numeric_limits::max(); + big_moves_smallest_ = (std::numeric_limits::max)(); } void update_big_moves(const FT& new_sq_move) @@ -177,7 +177,7 @@ protected: void clear_big_moves() { big_moves_current_size_ = 0; - big_moves_smallest_ = std::numeric_limits::max(); + big_moves_smallest_ = (std::numeric_limits::max)(); big_moves_.clear(); } diff --git a/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h b/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h index a4d41ad7440..9eebf41beb2 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h +++ b/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h @@ -160,11 +160,11 @@ public: { // Compute indices on grid int index_x = static_cast( (to_double(point.x()) - m_xmin) * m_resolution_x); - index_x = std::max( 0, std::min(index_x, m_num_grid_cells_per_axis - 1) ); + index_x = (std::max)( 0, (std::min)(index_x, m_num_grid_cells_per_axis - 1) ); int index_y = static_cast( (to_double(point.y()) - m_ymin) * m_resolution_y); - index_y = std::max( 0, std::min(index_y, m_num_grid_cells_per_axis - 1) ); + index_y = (std::max)( 0, (std::min)(index_y, m_num_grid_cells_per_axis - 1) ); int index_z = static_cast( (to_double(point.z()) - m_zmin) * m_resolution_z); - index_z = std::max( 0, std::min(index_z, m_num_grid_cells_per_axis - 1) ); + index_z = (std::max)( 0, (std::min)(index_z, m_num_grid_cells_per_axis - 1) ); int index = index_z*m_num_grid_cells_per_axis*m_num_grid_cells_per_axis @@ -646,16 +646,16 @@ protected: int index_x = cell_index; // For each cell inside the square - for (int i = std::max(0, index_x-occupation_radius) ; - i <= std::min(m_num_cells_per_axis - 1, index_x+occupation_radius) ; + for (int i = (std::max)(0, index_x-occupation_radius) ; + i <= (std::min)(m_num_cells_per_axis - 1, index_x+occupation_radius) ; ++i) { - for (int j = std::max(0, index_y-occupation_radius) ; - j <= std::min(m_num_cells_per_axis - 1, index_y+occupation_radius) ; + for (int j = (std::max)(0, index_y-occupation_radius) ; + j <= (std::min)(m_num_cells_per_axis - 1, index_y+occupation_radius) ; ++j) { - for (int k = std::max(0, index_z-occupation_radius) ; - k <= std::min(m_num_cells_per_axis - 1, index_z+occupation_radius) ; + for (int k = (std::max)(0, index_z-occupation_radius) ; + k <= (std::min)(m_num_cells_per_axis - 1, index_z+occupation_radius) ; ++k) { int index =