From edd46b9e29706c0b1cf9c0ad7e9cab9b5ab8182b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 21 Jul 2025 12:16:48 +0200 Subject: [PATCH 1/4] fix build of tests/examples/demos for a release it will not work in branch build mode but I'm not sure this is something we want to support. --- Installation/cmake/modules/CGALHelpers.cmake | 2 +- Installation/demo/CMakeLists.txt | 19 ++++++++++++++----- Installation/examples/CMakeLists.txt | 20 +++++++++++++++----- Installation/test/CMakeLists.txt | 18 +++++++++++++----- 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/Installation/cmake/modules/CGALHelpers.cmake b/Installation/cmake/modules/CGALHelpers.cmake index de42f8cf269..f29fd11111b 100644 --- a/Installation/cmake/modules/CGALHelpers.cmake +++ b/Installation/cmake/modules/CGALHelpers.cmake @@ -9,7 +9,7 @@ function(process_CGAL_subdirectory entry subdir type_name) make_directory("${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") endif() - message("\n-- Configuring ${subdir} in ${subdir}/${ENTRY_DIR_NAME}") + message("-- Configuring ${subdir} in ${subdir}/${ENTRY_DIR_NAME}") set(source_dir "") if(EXISTS ${entry}/CMakeLists.txt) diff --git a/Installation/demo/CMakeLists.txt b/Installation/demo/CMakeLists.txt index 92606a5b9d2..011b436cc53 100644 --- a/Installation/demo/CMakeLists.txt +++ b/Installation/demo/CMakeLists.txt @@ -1,7 +1,16 @@ +project(CGAL_Demos) + cmake_minimum_required(VERSION 3.12...3.31) -if(NOT CGAL_MODULES_DIR) - find_package(CGAL REQUIRED) -endif() -include(${CGAL_MODULES_DIR}/CGALHelpers.cmake) -CGAL_handle_subdirectories(demo demos) +file(GLOB pkgs RELATIVE ${CMAKE_SOURCE_DIR} "*") +list(SORT pkgs) + +message("== Generating build files for demos ==") +foreach(pkg ${pkgs}) + set(pkg_dir ${CMAKE_SOURCE_DIR}/${pkg}) + if(IS_DIRECTORY "${pkg_dir}" AND EXISTS "${pkg_dir}/CMakeLists.txt") + message("\n-- Configuring ${pkg}") + add_subdirectory(${pkg_dir} "${CMAKE_BINARY_DIR}/${pkg}") + endif() +endforeach() +message("== Generating build files for done (DONE) ==") diff --git a/Installation/examples/CMakeLists.txt b/Installation/examples/CMakeLists.txt index e0034b4727f..9fc6ac0858b 100644 --- a/Installation/examples/CMakeLists.txt +++ b/Installation/examples/CMakeLists.txt @@ -1,6 +1,16 @@ +project(CGAL_Examples) + cmake_minimum_required(VERSION 3.12...3.31) -if(NOT CGAL_MODULES_DIR) - find_package(CGAL REQUIRED) -endif() -include(${CGAL_MODULES_DIR}/CGALHelpers.cmake) -CGAL_handle_subdirectories(examples examples) + +file(GLOB pkgs RELATIVE ${CMAKE_SOURCE_DIR} "*") +list(SORT pkgs) + +message("== Generating build files for examples ==") +foreach(pkg ${pkgs}) + set(pkg_dir ${CMAKE_SOURCE_DIR}/${pkg}) + if(IS_DIRECTORY "${pkg_dir}" AND EXISTS "${pkg_dir}/CMakeLists.txt") + message("\n-- Configuring ${pkg}") + add_subdirectory(${pkg_dir} "${CMAKE_BINARY_DIR}/${pkg}") + endif() +endforeach() +message("== Generating build files for done (DONE) ==") diff --git a/Installation/test/CMakeLists.txt b/Installation/test/CMakeLists.txt index 64d616edd57..e8e81f0c032 100644 --- a/Installation/test/CMakeLists.txt +++ b/Installation/test/CMakeLists.txt @@ -1,8 +1,16 @@ +project(CGAL_Tests) + cmake_minimum_required(VERSION 3.12...3.31) +file(GLOB pkgs RELATIVE ${CMAKE_SOURCE_DIR} "*") +list(SORT pkgs) -if(NOT CGAL_MODULES_DIR) - find_package(CGAL REQUIRED) -endif() -include(${CGAL_MODULES_DIR}/CGALHelpers.cmake) -CGAL_handle_subdirectories(test tests) +message("== Generating build files for tests ==") +foreach(pkg ${pkgs}) + set(pkg_dir ${CMAKE_SOURCE_DIR}/${pkg}) + if(IS_DIRECTORY "${pkg_dir}" AND EXISTS "${pkg_dir}/CMakeLists.txt") + message("\n-- Configuring ${pkg}") + add_subdirectory(${pkg_dir} "${CMAKE_BINARY_DIR}/${pkg}") + endif() +endforeach() +message("== Generating build files for done (DONE) ==") From 80fd398478c3066a202ae184b4fff1d8302338a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 3 Sep 2025 16:03:11 +0200 Subject: [PATCH 2/4] hide warning messages that are too verbose --- CGAL_Core/include/CGAL/CORE/Config.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/Config.h b/CGAL_Core/include/CGAL/CORE/Config.h index 9f49a7f5986..36a342a5f73 100644 --- a/CGAL_Core/include/CGAL/CORE/Config.h +++ b/CGAL_Core/include/CGAL/CORE/Config.h @@ -29,12 +29,10 @@ #include -#ifdef CGAL_TEST_SUITE -// disabled for the testsuite to avoid `w` -#define CGAL_CORE_warning_msg(X ,Y) -// if (!(X)) CGAL_error_msg(Y) -#else +#ifdef CGAL_CORE_DEBUG #define CGAL_CORE_warning_msg(X ,Y) CGAL_warning_msg(X ,Y) +#else +#define CGAL_CORE_warning_msg(X ,Y) #endif From a816c119bbfc3c7be192df084055f3dfb484cdb6 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 4 Sep 2025 12:06:19 +0200 Subject: [PATCH 3/4] Spelling correction Spelling correction --- .../test/Surface_mesh_approximation/vsa_metric_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp index 74e63634183..94f8dfcfd3f 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp @@ -102,7 +102,7 @@ int main() } // create compact metric approximation algorithm instance - std::cout << "create compact vas instance" << std::endl; + std::cout << "create compact vsa instance" << std::endl; Compact_metric_point_proxy error_metric(center_pmap, area_pmap); Compact_approx approx(mesh, vpmap, error_metric); From 5cb75b0aa5684bd23bb631bc11e324e888179fc7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Sep 2025 20:51:16 +0200 Subject: [PATCH 4/4] fix a CMake warning --- Installation/demo/CMakeLists.txt | 3 +-- Installation/examples/CMakeLists.txt | 3 +-- Installation/test/CMakeLists.txt | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Installation/demo/CMakeLists.txt b/Installation/demo/CMakeLists.txt index 011b436cc53..9bf4e2e9e0e 100644 --- a/Installation/demo/CMakeLists.txt +++ b/Installation/demo/CMakeLists.txt @@ -1,6 +1,5 @@ -project(CGAL_Demos) - cmake_minimum_required(VERSION 3.12...3.31) +project(CGAL_Demos) file(GLOB pkgs RELATIVE ${CMAKE_SOURCE_DIR} "*") list(SORT pkgs) diff --git a/Installation/examples/CMakeLists.txt b/Installation/examples/CMakeLists.txt index 9fc6ac0858b..f96a030628d 100644 --- a/Installation/examples/CMakeLists.txt +++ b/Installation/examples/CMakeLists.txt @@ -1,6 +1,5 @@ -project(CGAL_Examples) - cmake_minimum_required(VERSION 3.12...3.31) +project(CGAL_Examples) file(GLOB pkgs RELATIVE ${CMAKE_SOURCE_DIR} "*") list(SORT pkgs) diff --git a/Installation/test/CMakeLists.txt b/Installation/test/CMakeLists.txt index e8e81f0c032..183796527e1 100644 --- a/Installation/test/CMakeLists.txt +++ b/Installation/test/CMakeLists.txt @@ -1,6 +1,5 @@ -project(CGAL_Tests) - cmake_minimum_required(VERSION 3.12...3.31) +project(CGAL_Tests) file(GLOB pkgs RELATIVE ${CMAKE_SOURCE_DIR} "*") list(SORT pkgs)