commit e71faac430c1b5244ebfb5b4dd2910a7d723da12
parent d441cf29264ed042e7f47f7ba2b6b60dd7d9c27f
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 19 Oct 2021 15:04:43 +0200
Merge branch 'release_0.1.3'
Diffstat:
8 files changed, 33 insertions(+), 28 deletions(-)
diff --git a/README.md b/README.md
@@ -22,20 +22,25 @@ project from the `cmake/CMakeLists.txt` file by appending to the
## Release notes
+### Version 0.1.3
+
+- Sets the CMake minimum version to 3.1: since CMake 3.20, version 2.8 has
+ become obsolete.
+- Fix compilation warnings detected by gcc 11.
+
### Version 0.1.2
-- Update CMake module of the Clipper library: on GNU/Linux, make optional the
- debug version of the library.
+Update CMake module of the Clipper library: on GNU/Linux, make optional the
+debug version of the library.
### Version 0.1.1
-- Update the version of the RSys dependency to 0.6: replace the deprecated
- `[N]CHECK` macros by the new macro `CHK`.
+Update the version of the RSys dependency to 0.6: replace the deprecated
+`[N]CHECK` macros by the new macro `CHK`.
## License
-Star-Clipper is Copyright (C) |Meso|Star> 2016 (<contact@meso-star.com>). It is
-a free software released under the [OSI](http://opensource.org)-approved GPL
-v3+ license. You are welcome to redistribute it under certain conditions; refer
-to the COPYING file for details.
-
+Copyright (C) 2016-2018, 2021 |Meso|Star> (<contact@meso-star.com>).
+Star-CliPpeR is free software released under the GPL v3+ license: GNU GPL
+version 3 or later. You are welcome to redistribute it under certain
+conditions; refer to the COPYING file for details.
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 |Meso|Star> (contact@meso-star.com)
+# Copyright (C) 2016-2018, 2021 |Meso|Star> (contact@meso-star.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.1)
project(scpr C CXX)
enable_testing()
@@ -48,7 +48,7 @@ rcmake_append_runtime_dirs(_runtime_dirs RSys Polygon)
################################################################################
set(VERSION_MAJOR 0)
set(VERSION_MINOR 1)
-set(VERSION_PATCH 2)
+set(VERSION_PATCH 3)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
set(SCPR_FILES_SRC scpr_mesh.c)
diff --git a/cmake/ClipperConfig.cmake b/cmake/ClipperConfig.cmake
@@ -1,4 +1,4 @@
-# Copyright (C) |Meso|Star> 2016-2018 (contact@meso-star.com)
+# Copyright (C) 2016-2018, 2021 |Meso|Star> (contact@meso-star.com)
#
# This software is a computer program whose purpose is to generate files
# used to build the Star-3D library.
@@ -29,7 +29,7 @@
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL license and that you accept its terms.
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 3.1)
# Try to find the Clipper devel. Once done this will define:
# - Clipper_FOUND: system has Clipper
@@ -56,8 +56,8 @@ else(CMAKE_HOST_WIN32)
if(NOT Clipper_LIBRARY_DEBUG) # Fallback lib
get_property(_doc CACHE Clipper_LIBRARY_DEBUG PROPERTY HELPSTRING)
set(Clipper_LIBRARY_DEBUG ${Clipper_LIBRARY} CACHE PATH ${_doc} FORCE)
- endif(NOT Clipper_LIBRARY_DEBUG)
-endif(CMAKE_HOST_WIN32)
+ endif()
+endif()
add_library(Clipper SHARED IMPORTED)
set_target_properties(Clipper PROPERTIES
diff --git a/src/scpr.h b/src/scpr.h
@@ -1,4 +1,4 @@
-/* Copyright (C) |Meso|Star> 2016 (contact@meso-star.com)
+/* Copyright (C) 2016-2018, 2021 |Meso|Star> (contact@meso-star.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/scpr_mesh.c b/src/scpr_mesh.c
@@ -1,4 +1,4 @@
-/* Copyright (C) |Meso|Star> 2016 (contact@meso-star.com)
+/* Copyright (C) 2016-2018, 2021 |Meso|Star> (contact@meso-star.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/test_scpr_clip.c b/src/test_scpr_clip.c
@@ -1,4 +1,4 @@
-/* Copyright (C) |Meso|Star> 2016 (contact@meso-star.com)
+/* Copyright (C) 2016-2018, 2021 |Meso|Star> (contact@meso-star.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -73,7 +73,7 @@ test_triangle(struct scpr_mesh* mesh)
(mesh, ctx.ntris, get_ids, 3, get_pos, &ctx) == RES_OK);
poly.get_position = get_clip_pos;
- poly.nvertices = sizeof(clip_pos)/sizeof(double[2]);
+ poly.nvertices = sizeof(clip_pos)/(2*sizeof(double));
poly.context = (void*)clip_pos;
CHK(scpr_mesh_clip(NULL, SCPR_OPERATIONS_COUNT__, NULL) == RES_BAD_ARG);
CHK(scpr_mesh_clip(mesh, SCPR_OPERATIONS_COUNT__, NULL) == RES_BAD_ARG);
@@ -100,14 +100,14 @@ test_quad(struct scpr_mesh* mesh)
struct mesh_context ctx;
ctx.coords = quad_pos;
- ctx.nverts = sizeof(quad_pos)/sizeof(double[2]);
+ ctx.nverts = sizeof(quad_pos)/(2*sizeof(double));
ctx.indices = quad_ids;
- ctx.ntris = sizeof(quad_ids)/sizeof(size_t[3]);
+ ctx.ntris = sizeof(quad_ids)/(3*sizeof(size_t));
CHK(scpr_mesh_setup_indexed_vertices
(mesh, ctx.ntris, get_ids, ctx.nverts, get_pos, &ctx) == RES_OK);
poly.get_position = get_clip_pos;
- poly.nvertices = sizeof(clip_pos)/sizeof(double[2]);
+ poly.nvertices = sizeof(clip_pos)/(2*sizeof(double));
poly.context = (void*)clip_pos;
CHK(scpr_mesh_clip(mesh, SCPR_AND, &poly) == RES_OK);
@@ -180,7 +180,7 @@ test_disk(struct scpr_mesh* mesh)
(mesh, ctx.ntris, get_ids, ctx.nverts, get_pos, &ctx) == RES_OK);
poly.get_position = get_clip_pos;
- poly.nvertices = sizeof(clip)/sizeof(double[2]);
+ poly.nvertices = sizeof(clip)/(2*sizeof(double));
poly.context = (void*)clip;
CHK(scpr_mesh_clip(mesh, SCPR_SUB, &poly) == RES_OK);
diff --git a/src/test_scpr_mesh.c b/src/test_scpr_mesh.c
@@ -1,4 +1,4 @@
-/* Copyright (C) |Meso|Star> 2016 (contact@meso-star.com)
+/* Copyright (C) 2016-2018, 2021 |Meso|Star> (contact@meso-star.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ main(int argc, char** argv)
1.0, 0.5,
1.0, 1.0
};
- const size_t nverts = sizeof(coords)/sizeof(double[2]);
+ const size_t nverts = sizeof(coords)/(2*sizeof(double));
const size_t indices[] = {
0, 1, 3,
3, 1, 4,
@@ -41,7 +41,7 @@ main(int argc, char** argv)
4, 5, 7,
7, 5, 8
};
- const size_t ntris = sizeof(indices)/sizeof(size_t[3]);
+ const size_t ntris = sizeof(indices)/(3*sizeof(size_t));
const size_t indices_bad[] = { 7, 5, 9 };
size_t ids[3];
double pos[2];
diff --git a/src/test_scpr_utils.h b/src/test_scpr_utils.h
@@ -1,4 +1,4 @@
-/* Copyright (C) |Meso|Star> 2016 (contact@meso-star.com)
+/* Copyright (C) 2016-2018, 2021 |Meso|Star> (contact@meso-star.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by