From cb7fd6125bbb4ae59f36a931bbc288a21c519601 Mon Sep 17 00:00:00 2001 From: Jordan Musser Date: Sun, 16 Nov 2025 11:34:04 -0500 Subject: [PATCH 01/17] Add support for CGAL versions >= v6 --- src/csg/cgal_helper_polyhedron.cpp | 7 ++++++- src/csg_cgal_helper.hpp | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/csg/cgal_helper_polyhedron.cpp b/src/csg/cgal_helper_polyhedron.cpp index 68e7904..bafc688 100644 --- a/src/csg/cgal_helper_polyhedron.cpp +++ b/src/csg/cgal_helper_polyhedron.cpp @@ -2,7 +2,6 @@ #include "csg_exception.hpp" #include -#include #include #include #include @@ -11,6 +10,12 @@ #include #include +#if CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(6,0,0) +#include +#else +#include +#endif + namespace { typedef cgal_helper::Polyhedron::HalfedgeDS HalfedgeDS; diff --git a/src/csg_cgal_helper.hpp b/src/csg_cgal_helper.hpp index 541b41c..e6731db 100644 --- a/src/csg_cgal_helper.hpp +++ b/src/csg_cgal_helper.hpp @@ -1,6 +1,7 @@ #ifndef CGAL_HELPER_H_ #define CGAL_HELPER_H_ +#include #include #include #include @@ -15,9 +16,16 @@ typedef CGAL::Polyhedron_3 Polyhedron; typedef CGAL::Polygon_2 Polygon; typedef CGAL::AABB_face_graph_triangle_primitive Primitive; -typedef CGAL::AABB_traits Traits; + +#if CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(6,0,0) + typedef CGAL::AABB_traits_3 Traits; +#else + typedef CGAL::AABB_traits Traits; +#endif + typedef CGAL::AABB_tree AABBTree; + std::shared_ptr create_polyhedron(const std::vector> &points, const std::vector> &faces); -- GitLab From 812245cceaa67eed5fb034fd42449860775c612c Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:00:01 -0600 Subject: [PATCH 02/17] Disable spack tests --- .gitlab-ci.yml | 59 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4aa8658..b39ba88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,9 +30,17 @@ build-img: image: $CI_REGISTRY_IMAGE:latest needs: ['build-img'] script: + - conan install -if build -g cmake_find_package catch2/2.13.7@ + - | + if [ "$ENABLE_CGAL" == "ON" ]; then + conan install -if build -g cmake_find_package cgal/5.2.1@ + fi + - conan install -if build -g cmake_find_package taocpp-pegtl/3.2.1@ + - cmake -S. -Bbuild -GNinja + -DCMAKE_MODULE_PATH=$PWD/build -DCMAKE_BUILD_TYPE=Debug -DCSG_CGAL_ENABLED=${ENABLE_CGAL} -DCMAKE_CXX_FLAGS="-pedantic-errors" @@ -52,33 +60,44 @@ test:no_cgal: ENABLE_CGAL: "OFF" <<: *cmake_def -.test:spack: &spack_def - stage: test - image: $CI_REGISTRY_IMAGE:latest - needs: ['build-img'] - when: manual - script: - - /usr/local/spack/bin/spack repo add .spack/repo - - /usr/local/spack/bin/spack install csg-eb ${NO_CSG} - tags: - - docker - -spack:cgal: - variables: - NO_CSG: "" - <<: *spack_def - -spack:no_cgal: - variables: - NO_CSG: "~cgal" - <<: *spack_def +#.test:spack: &spack_def +# stage: test +# image: $CI_REGISTRY_IMAGE:latest +# needs: ['build-img'] +# when: manual +# script: +# - /usr/local/spack/bin/spack repo add .spack/repo +# - /usr/local/spack/bin/spack install csg-eb ${NO_CSG} +# tags: +# - docker +# +#spack:cgal: +# variables: +# NO_CSG: "" +# <<: *spack_def +# +#spack:no_cgal: +# variables: +# NO_CSG: "~cgal" +# <<: *spack_def .test:gnumake: &gnumake_def stage: test variables: + BUILD: ${CI_PROJECT_DIR}/build + BOOST_HOME: ${BUILD}/boost + CATCH2_HOME: ${BUILD}/catch2 + CGAL_HOME: ${BUILD}/cgal + PEGTL_HOME: ${BUILD}/taocpp-pegtl image: $CI_REGISTRY_IMAGE:latest needs: ['build-img'] script: + - conan install -if build -g deploy catch2/2.13.7@ + - | + if [ "$ENABLE_CGAL" == "ON" ]; then + conan install -if build -g deploy cgal/5.2.1@ + fi + - conan install -if build -g deploy taocpp-pegtl/3.2.1@ - make install DESTDIR=the_destination tags: - docker -- GitLab From 107194e79d48d39ab06fdeda1a9972e225de9774 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:06:40 -0600 Subject: [PATCH 03/17] disable spack test --- .gitlab-ci.yml | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b39ba88..de62cdb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,8 @@ image: hello-world:latest stages: - - build-img +# - build-img +# - spack-test - test workflow: @@ -21,7 +22,7 @@ build-img: - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"},\"https://index.docker.io/v1/\":{\"auth\":\"$DOCKER_AUTH\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --cache=true --context $CI_PROJECT_DIR --dockerfile ./Dockerfile --destination $CI_REGISTRY_IMAGE:latest tags: - - docker + - docker-build ###### Test jobs ##### @@ -60,26 +61,26 @@ test:no_cgal: ENABLE_CGAL: "OFF" <<: *cmake_def -#.test:spack: &spack_def -# stage: test -# image: $CI_REGISTRY_IMAGE:latest -# needs: ['build-img'] -# when: manual -# script: -# - /usr/local/spack/bin/spack repo add .spack/repo -# - /usr/local/spack/bin/spack install csg-eb ${NO_CSG} -# tags: -# - docker -# -#spack:cgal: -# variables: -# NO_CSG: "" -# <<: *spack_def -# -#spack:no_cgal: -# variables: -# NO_CSG: "~cgal" -# <<: *spack_def +# .spack-test:spack: &spack_def +# stage: test +# image: $CI_REGISTRY_IMAGE:latest +# needs: ['build-img'] +# when: manual +# script: +# - /usr/local/spack/bin/spack repo add .spack/repo +# - /usr/local/spack/bin/spack install csg-eb ${NO_CSG} +# tags: +# - docker + +# spack-test:cgal: +# variables: +# NO_CSG: "" +# <<: *spack_def + +# spack-test:no_cgal: +# variables: +# NO_CSG: "~cgal" +# <<: *spack_def .test:gnumake: &gnumake_def stage: test -- GitLab From 7b2ef1d34e1779b25ba3a0294936d086896caf9f Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:12:33 -0600 Subject: [PATCH 04/17] goodbye conan --- .gitlab-ci.yml | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de62cdb..60adaf7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,33 +11,13 @@ workflow: - if: $CI_COMMIT_BRANCH == 'main' # Execute jobs when a new commit is pushed to main branch -build-img: - stage: build-img - image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] - script: - - mkdir -p /kaniko/.docker - - DOCKER_AUTH=$(echo -n "$DOCKER_HUB_USR:$DOCKER_HUB_PASS" | base64) - - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"},\"https://index.docker.io/v1/\":{\"auth\":\"$DOCKER_AUTH\"}}}" > /kaniko/.docker/config.json - - /kaniko/executor --cache=true --context $CI_PROJECT_DIR --dockerfile ./Dockerfile --destination $CI_REGISTRY_IMAGE:latest - tags: - - docker-build ###### Test jobs ##### .test:cmake: &cmake_def stage: test - image: $CI_REGISTRY_IMAGE:latest - needs: ['build-img'] + image: $CI_REGISTRY_IMAGE/nvcc script: - - conan install -if build -g cmake_find_package catch2/2.13.7@ - - | - if [ "$ENABLE_CGAL" == "ON" ]; then - conan install -if build -g cmake_find_package cgal/5.2.1@ - fi - - conan install -if build -g cmake_find_package taocpp-pegtl/3.2.1@ - - cmake -S. -Bbuild -GNinja @@ -86,12 +66,8 @@ test:no_cgal: stage: test variables: BUILD: ${CI_PROJECT_DIR}/build - BOOST_HOME: ${BUILD}/boost - CATCH2_HOME: ${BUILD}/catch2 - CGAL_HOME: ${BUILD}/cgal - PEGTL_HOME: ${BUILD}/taocpp-pegtl - image: $CI_REGISTRY_IMAGE:latest - needs: ['build-img'] + CI_REGISTRY_IMAGE: ${CI_REGISTRY}/mfix + image: $CI_REGISTRY_IMAGE/nvcc script: - conan install -if build -g deploy catch2/2.13.7@ - | -- GitLab From 3ee25c47a889e9167967ca73d695787d240a66e8 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:14:57 -0600 Subject: [PATCH 05/17] goodbye conan --- .gitlab-ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60adaf7..de30494 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,13 +69,7 @@ test:no_cgal: CI_REGISTRY_IMAGE: ${CI_REGISTRY}/mfix image: $CI_REGISTRY_IMAGE/nvcc script: - - conan install -if build -g deploy catch2/2.13.7@ - - | - if [ "$ENABLE_CGAL" == "ON" ]; then - conan install -if build -g deploy cgal/5.2.1@ - fi - - conan install -if build -g deploy taocpp-pegtl/3.2.1@ - - make install DESTDIR=the_destination + - make tags: - docker -- GitLab From 03ba3d89d3ca8f2a70490a3c779b4d074262966d Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:20:41 -0600 Subject: [PATCH 06/17] use nvcc docker image from exa --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de30494..ce9b15b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,13 +10,14 @@ workflow: - if: $CI_MERGE_REQUEST_ID # Execute jobs in merge request context - if: $CI_COMMIT_BRANCH == 'main' # Execute jobs when a new commit is pushed to main branch - +variables: + CI_REGISTRY_IMAGE: ${CI_REGISTRY}/exa/mfix/nvcc ###### Test jobs ##### .test:cmake: &cmake_def stage: test - image: $CI_REGISTRY_IMAGE/nvcc + image: ${CI_REGISTRY_IMAGE} script: - cmake -S. -Bbuild @@ -66,7 +67,7 @@ test:no_cgal: stage: test variables: BUILD: ${CI_PROJECT_DIR}/build - CI_REGISTRY_IMAGE: ${CI_REGISTRY}/mfix + image: $CI_REGISTRY_IMAGE/nvcc script: - make -- GitLab From b21798660b00a1d391140eade9fb11050e8343bb Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:21:53 -0600 Subject: [PATCH 07/17] use nvcc docker image from exa --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce9b15b..ba8bfa7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ variables: .test:cmake: &cmake_def stage: test - image: ${CI_REGISTRY_IMAGE} + image: $CI_REGISTRY_IMAGE script: - cmake -S. -Bbuild @@ -68,7 +68,7 @@ test:no_cgal: variables: BUILD: ${CI_PROJECT_DIR}/build - image: $CI_REGISTRY_IMAGE/nvcc + image: $CI_REGISTRY_IMAGE script: - make tags: -- GitLab From cb31bb1278d4b9a89583fa7774faaed8bee36ab8 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:24:12 -0600 Subject: [PATCH 08/17] use nvcc docker image from exa --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba8bfa7..c8633b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ variables: -DCMAKE_MODULE_PATH=$PWD/build -DCMAKE_BUILD_TYPE=Debug -DCSG_CGAL_ENABLED=${ENABLE_CGAL} - -DCMAKE_CXX_FLAGS="-pedantic-errors" + -DCMAKE_CXX_FLAGS="-I/usr/local/include -pedantic-errors" - cmake --build build --target unit_tests_csg - cd build - ctest -- GitLab From bf21fcc54cc0a88f103b3c88e118bb301a78c314 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:27:26 -0600 Subject: [PATCH 09/17] update to catch2 3.x --- src/csg/tests/levelset/boolean.t.cpp | 2 +- src/csg/tests/levelset/empty.t.cpp | 2 +- src/csg/tests/levelset/extrude.t.cpp | 2 +- src/csg/tests/levelset/hull.t.cpp | 2 +- src/csg/tests/levelset/internal_flow.t.cpp | 2 +- src/csg/tests/levelset/primitives.t.cpp | 2 +- src/csg/tests/levelset/transform.t.cpp | 2 +- src/csg/tests/parser/boolean.t.cpp | 2 +- src/csg/tests/parser/empty.t.cpp | 2 +- src/csg/tests/parser/extrude.t.cpp | 2 +- src/csg/tests/parser/hull.t.cpp | 2 +- src/csg/tests/parser/nest.cpp | 2 +- src/csg/tests/parser/other.t.cpp | 2 +- src/csg/tests/parser/primitives.t.cpp | 2 +- src/csg/tests/parser/transform.t.cpp | 2 +- src/csg/tests/unit_tests_csg.main.cpp | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/csg/tests/levelset/boolean.t.cpp b/src/csg/tests/levelset/boolean.t.cpp index f39af1d..e50e656 100644 --- a/src/csg/tests/levelset/boolean.t.cpp +++ b/src/csg/tests/levelset/boolean.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/levelset/empty.t.cpp b/src/csg/tests/levelset/empty.t.cpp index e03b8ff..ee13d8c 100644 --- a/src/csg/tests/levelset/empty.t.cpp +++ b/src/csg/tests/levelset/empty.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/levelset/extrude.t.cpp b/src/csg/tests/levelset/extrude.t.cpp index b53656d..e423567 100644 --- a/src/csg/tests/levelset/extrude.t.cpp +++ b/src/csg/tests/levelset/extrude.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/levelset/hull.t.cpp b/src/csg/tests/levelset/hull.t.cpp index da63ffb..0359551 100644 --- a/src/csg/tests/levelset/hull.t.cpp +++ b/src/csg/tests/levelset/hull.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/levelset/internal_flow.t.cpp b/src/csg/tests/levelset/internal_flow.t.cpp index b85efdb..8d8ae82 100644 --- a/src/csg/tests/levelset/internal_flow.t.cpp +++ b/src/csg/tests/levelset/internal_flow.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/levelset/primitives.t.cpp b/src/csg/tests/levelset/primitives.t.cpp index ca409d7..df59754 100644 --- a/src/csg/tests/levelset/primitives.t.cpp +++ b/src/csg/tests/levelset/primitives.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/levelset/transform.t.cpp b/src/csg/tests/levelset/transform.t.cpp index 22d4148..ebb63ab 100644 --- a/src/csg/tests/levelset/transform.t.cpp +++ b/src/csg/tests/levelset/transform.t.cpp @@ -1,6 +1,6 @@ #include -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/parser/boolean.t.cpp b/src/csg/tests/parser/boolean.t.cpp index 8a56351..4fbfab8 100644 --- a/src/csg/tests/parser/boolean.t.cpp +++ b/src/csg/tests/parser/boolean.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/parser/empty.t.cpp b/src/csg/tests/parser/empty.t.cpp index 60a3b60..539b905 100644 --- a/src/csg/tests/parser/empty.t.cpp +++ b/src/csg/tests/parser/empty.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/parser/extrude.t.cpp b/src/csg/tests/parser/extrude.t.cpp index c37fd72..4ef875e 100644 --- a/src/csg/tests/parser/extrude.t.cpp +++ b/src/csg/tests/parser/extrude.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/parser/hull.t.cpp b/src/csg/tests/parser/hull.t.cpp index 615f01b..c1ef70c 100644 --- a/src/csg/tests/parser/hull.t.cpp +++ b/src/csg/tests/parser/hull.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/parser/nest.cpp b/src/csg/tests/parser/nest.cpp index 6c9137d..98594cc 100644 --- a/src/csg/tests/parser/nest.cpp +++ b/src/csg/tests/parser/nest.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/parser/other.t.cpp b/src/csg/tests/parser/other.t.cpp index fee4779..ff72135 100644 --- a/src/csg/tests/parser/other.t.cpp +++ b/src/csg/tests/parser/other.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/parser/primitives.t.cpp b/src/csg/tests/parser/primitives.t.cpp index bc57dd4..849e960 100644 --- a/src/csg/tests/parser/primitives.t.cpp +++ b/src/csg/tests/parser/primitives.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/parser/transform.t.cpp b/src/csg/tests/parser/transform.t.cpp index e7fa6bc..7cad61b 100644 --- a/src/csg/tests/parser/transform.t.cpp +++ b/src/csg/tests/parser/transform.t.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/src/csg/tests/unit_tests_csg.main.cpp b/src/csg/tests/unit_tests_csg.main.cpp index fc72584..fb742a0 100644 --- a/src/csg/tests/unit_tests_csg.main.cpp +++ b/src/csg/tests/unit_tests_csg.main.cpp @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN // Catch main() - only add to one cpp file -#include "catch2/catch.hpp" +#include "catch2/catch_all.hpp" -- GitLab From a068fab9a7ac36e895aed7ef34265600f4cb5982 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:32:17 -0600 Subject: [PATCH 10/17] update to catch2 3.x --- src/csg/tests/levelset/boolean.t.cpp | 2 ++ src/csg/tests/levelset/empty.t.cpp | 2 ++ src/csg/tests/levelset/extrude.t.cpp | 2 ++ src/csg/tests/levelset/hull.t.cpp | 2 ++ src/csg/tests/levelset/internal_flow.t.cpp | 2 ++ src/csg/tests/levelset/primitives.t.cpp | 2 ++ src/csg/tests/levelset/transform.t.cpp | 2 ++ src/csg/tests/parser/boolean.t.cpp | 2 ++ src/csg/tests/parser/empty.t.cpp | 2 ++ src/csg/tests/parser/extrude.t.cpp | 2 ++ src/csg/tests/parser/hull.t.cpp | 2 ++ src/csg/tests/parser/nest.cpp | 2 ++ src/csg/tests/parser/other.t.cpp | 2 ++ src/csg/tests/parser/primitives.t.cpp | 2 ++ src/csg/tests/parser/transform.t.cpp | 2 ++ src/csg/tests/unit_tests_csg.main.cpp | 2 ++ 16 files changed, 32 insertions(+) diff --git a/src/csg/tests/levelset/boolean.t.cpp b/src/csg/tests/levelset/boolean.t.cpp index e50e656..4628200 100644 --- a/src/csg/tests/levelset/boolean.t.cpp +++ b/src/csg/tests/levelset/boolean.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/levelset/empty.t.cpp b/src/csg/tests/levelset/empty.t.cpp index ee13d8c..0a5f097 100644 --- a/src/csg/tests/levelset/empty.t.cpp +++ b/src/csg/tests/levelset/empty.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/levelset/extrude.t.cpp b/src/csg/tests/levelset/extrude.t.cpp index e423567..3c732c9 100644 --- a/src/csg/tests/levelset/extrude.t.cpp +++ b/src/csg/tests/levelset/extrude.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include #include diff --git a/src/csg/tests/levelset/hull.t.cpp b/src/csg/tests/levelset/hull.t.cpp index 0359551..a533062 100644 --- a/src/csg/tests/levelset/hull.t.cpp +++ b/src/csg/tests/levelset/hull.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/levelset/internal_flow.t.cpp b/src/csg/tests/levelset/internal_flow.t.cpp index 8d8ae82..338529e 100644 --- a/src/csg/tests/levelset/internal_flow.t.cpp +++ b/src/csg/tests/levelset/internal_flow.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/levelset/primitives.t.cpp b/src/csg/tests/levelset/primitives.t.cpp index df59754..81e887d 100644 --- a/src/csg/tests/levelset/primitives.t.cpp +++ b/src/csg/tests/levelset/primitives.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/levelset/transform.t.cpp b/src/csg/tests/levelset/transform.t.cpp index ebb63ab..927777d 100644 --- a/src/csg/tests/levelset/transform.t.cpp +++ b/src/csg/tests/levelset/transform.t.cpp @@ -2,6 +2,8 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include #include diff --git a/src/csg/tests/parser/boolean.t.cpp b/src/csg/tests/parser/boolean.t.cpp index 4fbfab8..fcad5f7 100644 --- a/src/csg/tests/parser/boolean.t.cpp +++ b/src/csg/tests/parser/boolean.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/parser/empty.t.cpp b/src/csg/tests/parser/empty.t.cpp index 539b905..1767f8d 100644 --- a/src/csg/tests/parser/empty.t.cpp +++ b/src/csg/tests/parser/empty.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/parser/extrude.t.cpp b/src/csg/tests/parser/extrude.t.cpp index 4ef875e..533f2ec 100644 --- a/src/csg/tests/parser/extrude.t.cpp +++ b/src/csg/tests/parser/extrude.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include #include diff --git a/src/csg/tests/parser/hull.t.cpp b/src/csg/tests/parser/hull.t.cpp index c1ef70c..3ae0b10 100644 --- a/src/csg/tests/parser/hull.t.cpp +++ b/src/csg/tests/parser/hull.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include #include diff --git a/src/csg/tests/parser/nest.cpp b/src/csg/tests/parser/nest.cpp index 98594cc..c882ded 100644 --- a/src/csg/tests/parser/nest.cpp +++ b/src/csg/tests/parser/nest.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/parser/other.t.cpp b/src/csg/tests/parser/other.t.cpp index ff72135..1f40e91 100644 --- a/src/csg/tests/parser/other.t.cpp +++ b/src/csg/tests/parser/other.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/parser/primitives.t.cpp b/src/csg/tests/parser/primitives.t.cpp index 849e960..b4899f2 100644 --- a/src/csg/tests/parser/primitives.t.cpp +++ b/src/csg/tests/parser/primitives.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/parser/transform.t.cpp b/src/csg/tests/parser/transform.t.cpp index 7cad61b..e9957f3 100644 --- a/src/csg/tests/parser/transform.t.cpp +++ b/src/csg/tests/parser/transform.t.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" +using Catch::Approx; + #include #include diff --git a/src/csg/tests/unit_tests_csg.main.cpp b/src/csg/tests/unit_tests_csg.main.cpp index fb742a0..46a83f4 100644 --- a/src/csg/tests/unit_tests_csg.main.cpp +++ b/src/csg/tests/unit_tests_csg.main.cpp @@ -1,2 +1,4 @@ #define CATCH_CONFIG_MAIN // Catch main() - only add to one cpp file #include "catch2/catch_all.hpp" + +using Catch::Approx; -- GitLab From b045c0ba73266ad771f5f9b075d54e5edafd2ffa Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:34:52 -0600 Subject: [PATCH 11/17] update to catch2 3.x --- src/csg/tests/levelset/boolean.t.cpp | 2 +- src/csg/tests/levelset/empty.t.cpp | 2 +- src/csg/tests/levelset/extrude.t.cpp | 2 +- src/csg/tests/levelset/hull.t.cpp | 2 +- src/csg/tests/levelset/internal_flow.t.cpp | 2 +- src/csg/tests/levelset/primitives.t.cpp | 2 +- src/csg/tests/levelset/transform.t.cpp | 2 +- src/csg/tests/parser/boolean.t.cpp | 2 +- src/csg/tests/parser/empty.t.cpp | 2 +- src/csg/tests/parser/extrude.t.cpp | 2 +- src/csg/tests/parser/hull.t.cpp | 2 +- src/csg/tests/parser/nest.cpp | 2 +- src/csg/tests/parser/other.t.cpp | 2 +- src/csg/tests/parser/primitives.t.cpp | 2 +- src/csg/tests/parser/transform.t.cpp | 2 +- src/csg/tests/unit_tests_csg.main.cpp | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/csg/tests/levelset/boolean.t.cpp b/src/csg/tests/levelset/boolean.t.cpp index 4628200..2ae1ed2 100644 --- a/src/csg/tests/levelset/boolean.t.cpp +++ b/src/csg/tests/levelset/boolean.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/levelset/empty.t.cpp b/src/csg/tests/levelset/empty.t.cpp index 0a5f097..b9d4baa 100644 --- a/src/csg/tests/levelset/empty.t.cpp +++ b/src/csg/tests/levelset/empty.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/levelset/extrude.t.cpp b/src/csg/tests/levelset/extrude.t.cpp index 3c732c9..5b8de87 100644 --- a/src/csg/tests/levelset/extrude.t.cpp +++ b/src/csg/tests/levelset/extrude.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/levelset/hull.t.cpp b/src/csg/tests/levelset/hull.t.cpp index a533062..f0a334c 100644 --- a/src/csg/tests/levelset/hull.t.cpp +++ b/src/csg/tests/levelset/hull.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/levelset/internal_flow.t.cpp b/src/csg/tests/levelset/internal_flow.t.cpp index 338529e..4e340b1 100644 --- a/src/csg/tests/levelset/internal_flow.t.cpp +++ b/src/csg/tests/levelset/internal_flow.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/levelset/primitives.t.cpp b/src/csg/tests/levelset/primitives.t.cpp index 81e887d..8e56b98 100644 --- a/src/csg/tests/levelset/primitives.t.cpp +++ b/src/csg/tests/levelset/primitives.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/levelset/transform.t.cpp b/src/csg/tests/levelset/transform.t.cpp index 927777d..8b92931 100644 --- a/src/csg/tests/levelset/transform.t.cpp +++ b/src/csg/tests/levelset/transform.t.cpp @@ -2,7 +2,7 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/parser/boolean.t.cpp b/src/csg/tests/parser/boolean.t.cpp index fcad5f7..c339cc6 100644 --- a/src/csg/tests/parser/boolean.t.cpp +++ b/src/csg/tests/parser/boolean.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/parser/empty.t.cpp b/src/csg/tests/parser/empty.t.cpp index 1767f8d..df18302 100644 --- a/src/csg/tests/parser/empty.t.cpp +++ b/src/csg/tests/parser/empty.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/parser/extrude.t.cpp b/src/csg/tests/parser/extrude.t.cpp index 533f2ec..4cbf99c 100644 --- a/src/csg/tests/parser/extrude.t.cpp +++ b/src/csg/tests/parser/extrude.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/parser/hull.t.cpp b/src/csg/tests/parser/hull.t.cpp index 3ae0b10..f665440 100644 --- a/src/csg/tests/parser/hull.t.cpp +++ b/src/csg/tests/parser/hull.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/parser/nest.cpp b/src/csg/tests/parser/nest.cpp index c882ded..0158c40 100644 --- a/src/csg/tests/parser/nest.cpp +++ b/src/csg/tests/parser/nest.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/parser/other.t.cpp b/src/csg/tests/parser/other.t.cpp index 1f40e91..8673532 100644 --- a/src/csg/tests/parser/other.t.cpp +++ b/src/csg/tests/parser/other.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/parser/primitives.t.cpp b/src/csg/tests/parser/primitives.t.cpp index b4899f2..54950dd 100644 --- a/src/csg/tests/parser/primitives.t.cpp +++ b/src/csg/tests/parser/primitives.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/parser/transform.t.cpp b/src/csg/tests/parser/transform.t.cpp index e9957f3..86c44c0 100644 --- a/src/csg/tests/parser/transform.t.cpp +++ b/src/csg/tests/parser/transform.t.cpp @@ -1,6 +1,6 @@ #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; #include #include diff --git a/src/csg/tests/unit_tests_csg.main.cpp b/src/csg/tests/unit_tests_csg.main.cpp index 46a83f4..f300d0b 100644 --- a/src/csg/tests/unit_tests_csg.main.cpp +++ b/src/csg/tests/unit_tests_csg.main.cpp @@ -1,4 +1,4 @@ #define CATCH_CONFIG_MAIN // Catch main() - only add to one cpp file #include "catch2/catch_all.hpp" -using Catch::Approx; +using namespace Catch; -- GitLab From 135bc8ae5a918c4f97fff1f46153d2930fd583c9 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:39:06 -0600 Subject: [PATCH 12/17] update to catch2 3.x --- src/csg/tests/parser/extrude.t.cpp | 2 +- src/csg/tests/parser/hull.t.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/csg/tests/parser/extrude.t.cpp b/src/csg/tests/parser/extrude.t.cpp index 4cbf99c..c34f802 100644 --- a/src/csg/tests/parser/extrude.t.cpp +++ b/src/csg/tests/parser/extrude.t.cpp @@ -82,7 +82,7 @@ angle = 370 square(size = [2, 3], center = false); } )"), - Catch::Contains("action")); + Matchers::Contains("action")); } TEST_CASE("extrude two shapes", "[csg]") { diff --git a/src/csg/tests/parser/hull.t.cpp b/src/csg/tests/parser/hull.t.cpp index f665440..f030f3b 100644 --- a/src/csg/tests/parser/hull.t.cpp +++ b/src/csg/tests/parser/hull.t.cpp @@ -40,7 +40,7 @@ hull() { sphere($fn = 0, $fa = 12, $fs = 2, r = 4); } )"), - Catch::Contains("action")); + Matchers::Contains("action")); } TEST_CASE("hull with three elements not supported", "[csg]") { @@ -53,7 +53,7 @@ hull() { sphere($fn = 0, $fa = 12, $fs = 2, r = 4); } )"), - Catch::Contains("action")); + Matchers::Contains("action")); } TEST_CASE("hull with other shape combos not supported", "[csg]") { @@ -63,7 +63,7 @@ hull() { sphere($fn = 0, $fa = 12, $fs = 2, r = 4); } )"), - Catch::Contains("action")); + Matchers::Contains("action")); } } // namespace -- GitLab From 125ab12c3011f5914657fe074ecf174b3045cf6a Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:41:49 -0600 Subject: [PATCH 13/17] update to catch2 3.x --- src/csg/tests/parser/extrude.t.cpp | 2 +- src/csg/tests/parser/hull.t.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/csg/tests/parser/extrude.t.cpp b/src/csg/tests/parser/extrude.t.cpp index c34f802..c1a1a46 100644 --- a/src/csg/tests/parser/extrude.t.cpp +++ b/src/csg/tests/parser/extrude.t.cpp @@ -82,7 +82,7 @@ angle = 370 square(size = [2, 3], center = false); } )"), - Matchers::Contains("action")); + Matchers::ContainsSubstring("action")); } TEST_CASE("extrude two shapes", "[csg]") { diff --git a/src/csg/tests/parser/hull.t.cpp b/src/csg/tests/parser/hull.t.cpp index f030f3b..629108b 100644 --- a/src/csg/tests/parser/hull.t.cpp +++ b/src/csg/tests/parser/hull.t.cpp @@ -40,7 +40,7 @@ hull() { sphere($fn = 0, $fa = 12, $fs = 2, r = 4); } )"), - Matchers::Contains("action")); + Matchers::ContainsSubstring("action")); } TEST_CASE("hull with three elements not supported", "[csg]") { @@ -53,7 +53,7 @@ hull() { sphere($fn = 0, $fa = 12, $fs = 2, r = 4); } )"), - Matchers::Contains("action")); + Matchers::ContainsSubstring("action")); } TEST_CASE("hull with other shape combos not supported", "[csg]") { @@ -63,7 +63,7 @@ hull() { sphere($fn = 0, $fa = 12, $fs = 2, r = 4); } )"), - Matchers::Contains("action")); + Matchers::ContainsSubstring("action")); } } // namespace -- GitLab From 1f734e844f2a3a00a5fbdc18481925e12fe75011 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 08:46:08 -0600 Subject: [PATCH 14/17] update to catch2 3.x --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c8633b9..c7bc341 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ variables: -DCMAKE_MODULE_PATH=$PWD/build -DCMAKE_BUILD_TYPE=Debug -DCSG_CGAL_ENABLED=${ENABLE_CGAL} - -DCMAKE_CXX_FLAGS="-I/usr/local/include -pedantic-errors" + -DCMAKE_CXX_FLAGS="-I/usr/local/include -L/usr/local/lib -lCatch2 -lCatch2Main -pedantic-errors" - cmake --build build --target unit_tests_csg - cd build - ctest -- GitLab From f72df95f0e2097783aecbe66e913e5be2e862af3 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 10:04:10 -0600 Subject: [PATCH 15/17] update to catch2 3.x --- src/csg/tests/CMakeLists.txt | 6 +++--- src/csg/tests/unit_tests_csg.main.cpp | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 src/csg/tests/unit_tests_csg.main.cpp diff --git a/src/csg/tests/CMakeLists.txt b/src/csg/tests/CMakeLists.txt index 3f4d075..bff6ab2 100644 --- a/src/csg/tests/CMakeLists.txt +++ b/src/csg/tests/CMakeLists.txt @@ -28,17 +28,17 @@ if (CSG_CGAL_ENABLED) endif() add_executable(unit_tests_csg EXCLUDE_FROM_ALL - ${unit_tests_csg_SOURCES} + ${unit_tests_csg_SOURCES} ) target_include_directories(unit_tests_csg PRIVATE ${CMAKE_SOURCE_DIR}/src ) -find_package(Catch2 REQUIRED) +find_package(Catch2 3 REQUIRED) include(Catch) target_link_libraries(unit_tests_csg - Catch2::Catch2 + Catch2::Catch2WithMain csg-eb ) diff --git a/src/csg/tests/unit_tests_csg.main.cpp b/src/csg/tests/unit_tests_csg.main.cpp deleted file mode 100644 index f300d0b..0000000 --- a/src/csg/tests/unit_tests_csg.main.cpp +++ /dev/null @@ -1,4 +0,0 @@ -#define CATCH_CONFIG_MAIN // Catch main() - only add to one cpp file -#include "catch2/catch_all.hpp" - -using namespace Catch; -- GitLab From d0f710984433cdc24db35f53a0146b2e92509c66 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 10:07:46 -0600 Subject: [PATCH 16/17] update to catch2 3.x --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7bc341..ba8bfa7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ variables: -DCMAKE_MODULE_PATH=$PWD/build -DCMAKE_BUILD_TYPE=Debug -DCSG_CGAL_ENABLED=${ENABLE_CGAL} - -DCMAKE_CXX_FLAGS="-I/usr/local/include -L/usr/local/lib -lCatch2 -lCatch2Main -pedantic-errors" + -DCMAKE_CXX_FLAGS="-pedantic-errors" - cmake --build build --target unit_tests_csg - cd build - ctest -- GitLab From 2014ce106d3191d36db16f76742c55084140ad16 Mon Sep 17 00:00:00 2001 From: Charles G Waldman Date: Mon, 17 Nov 2025 10:09:02 -0600 Subject: [PATCH 17/17] update to catch2 3.x --- src/csg/tests/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/csg/tests/CMakeLists.txt b/src/csg/tests/CMakeLists.txt index bff6ab2..3a708e7 100644 --- a/src/csg/tests/CMakeLists.txt +++ b/src/csg/tests/CMakeLists.txt @@ -17,7 +17,6 @@ list(APPEND unit_tests_csg_SOURCES parser/other.t.cpp parser/primitives.t.cpp parser/transform.t.cpp - unit_tests_csg.main.cpp ) if (CSG_CGAL_ENABLED) -- GitLab