From d2d9a30bded263fb769da25606e8791b979c3a1f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 7 Jun 2024 10:00:54 +0200 Subject: [PATCH 1/4] add one CMakeLists per package for Mesh_3 and Poisson_surface_reconstruction_3 --- Mesh_3/CMakeLists.txt | 16 ++++++++++++++++ Poisson_surface_reconstruction_3/CMakeLists.txt | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 Mesh_3/CMakeLists.txt create mode 100644 Poisson_surface_reconstruction_3/CMakeLists.txt diff --git a/Mesh_3/CMakeLists.txt b/Mesh_3/CMakeLists.txt new file mode 100644 index 000000000000..33b79fa158e4 --- /dev/null +++ b/Mesh_3/CMakeLists.txt @@ -0,0 +1,16 @@ +# This is the CMake script for compiling this folder. + +cmake_minimum_required(VERSION 3.1...3.23) +project(Mesh_3) + +if(CGAL_ENABLE_TESTING) + enable_testing() +endif() + +option(CGAL_MESH_3_BENCHMARK "Add benchmark to project" OFF) +if(CGAL_MESH_3_BENCHMARK) + add_subdirectory("benchmark/Mesh_3") +endif() + +add_subdirectory("examples/Mesh_3") +add_subdirectory("test/Mesh_3") diff --git a/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/CMakeLists.txt new file mode 100644 index 000000000000..3a7f267a2da1 --- /dev/null +++ b/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -0,0 +1,11 @@ +# This is the CMake script for compiling this folder. + +cmake_minimum_required(VERSION 3.1...3.23) +project(Poisson_surface_reconstruction_3) + +if(CGAL_ENABLE_TESTING) + enable_testing() +endif() + +add_subdirectory("examples/Poisson_surface_reconstruction_3") +add_subdirectory("test/Poisson_surface_reconstruction_3") From e31e8af4325e494be042df5716ab00799713770a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 7 Jun 2024 14:12:06 +0200 Subject: [PATCH 2/4] apply Laurent's review and use $PROJECT_NAME as much as possible --- Mesh_3/CMakeLists.txt | 16 +++++----------- Poisson_surface_reconstruction_3/CMakeLists.txt | 10 ++-------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/Mesh_3/CMakeLists.txt b/Mesh_3/CMakeLists.txt index 33b79fa158e4..aa1292312226 100644 --- a/Mesh_3/CMakeLists.txt +++ b/Mesh_3/CMakeLists.txt @@ -1,16 +1,10 @@ -# This is the CMake script for compiling this folder. - cmake_minimum_required(VERSION 3.1...3.23) project(Mesh_3) -if(CGAL_ENABLE_TESTING) - enable_testing() -endif() - -option(CGAL_MESH_3_BENCHMARK "Add benchmark to project" OFF) -if(CGAL_MESH_3_BENCHMARK) - add_subdirectory("benchmark/Mesh_3") +option(CGAL_${PROJECT_NAME}_BENCHMARK "Add benchmark to project" OFF) +if(CGAL_${PROJECT_NAME}_BENCHMARK) + add_subdirectory("benchmark/${PROJECT_NAME}") endif() -add_subdirectory("examples/Mesh_3") -add_subdirectory("test/Mesh_3") +add_subdirectory("examples/${PROJECT_NAME}") +add_subdirectory("test/${PROJECT_NAME}") diff --git a/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/CMakeLists.txt index 3a7f267a2da1..8f0b40830e59 100644 --- a/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -1,11 +1,5 @@ -# This is the CMake script for compiling this folder. - cmake_minimum_required(VERSION 3.1...3.23) project(Poisson_surface_reconstruction_3) -if(CGAL_ENABLE_TESTING) - enable_testing() -endif() - -add_subdirectory("examples/Poisson_surface_reconstruction_3") -add_subdirectory("test/Poisson_surface_reconstruction_3") +add_subdirectory("examples/${PROJECT_NAME}") +add_subdirectory("test/${PROJECT_NAME}") From 808fa60c6c4a841c051cb6cf3893728097c7482f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 7 Jun 2024 14:30:26 +0200 Subject: [PATCH 3/4] suggestion for benchmark this version is copy-pastable --- Mesh_3/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Mesh_3/CMakeLists.txt b/Mesh_3/CMakeLists.txt index aa1292312226..df1b43564ff4 100644 --- a/Mesh_3/CMakeLists.txt +++ b/Mesh_3/CMakeLists.txt @@ -1,9 +1,12 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Mesh_3) -option(CGAL_${PROJECT_NAME}_BENCHMARK "Add benchmark to project" OFF) -if(CGAL_${PROJECT_NAME}_BENCHMARK) - add_subdirectory("benchmark/${PROJECT_NAME}") + +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/benchmark/${PROJECT_NAME}/CMakeLists.txt") + option(CGAL_${PROJECT_NAME}_BENCHMARK "Add benchmark to project" OFF) + if(CGAL_${PROJECT_NAME}_BENCHMARK) + add_subdirectory("benchmark/${PROJECT_NAME}") + endif() endif() add_subdirectory("examples/${PROJECT_NAME}") From 58c27e40553cab65b2cddcfc047f17d66257f27a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 10 Jun 2024 16:17:09 +0200 Subject: [PATCH 4/4] add CMakeLists.txt for PMP --- Polygon_mesh_processing/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Polygon_mesh_processing/CMakeLists.txt diff --git a/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/CMakeLists.txt new file mode 100644 index 000000000000..81f28754a2e9 --- /dev/null +++ b/Polygon_mesh_processing/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.1...3.23) +project(Polygon_mesh_processing) + +option(CGAL_${PROJECT_NAME}_BENCHMARK "Add benchmark to project" OFF) +if(CGAL_${PROJECT_NAME}_BENCHMARK) + add_subdirectory("benchmark/${PROJECT_NAME}") +endif() + +add_subdirectory("examples/${PROJECT_NAME}") +add_subdirectory("test/${PROJECT_NAME}")