diff --git a/Optimal_bounding_box/benchmarks/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmarks/Optimal_bounding_box/CMakeLists.txt index 6405145d309..84cb0ab7dfc 100644 --- a/Optimal_bounding_box/benchmarks/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmarks/Optimal_bounding_box/CMakeLists.txt @@ -19,10 +19,7 @@ find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) if (NOT EIGEN3_FOUND) message(STATUS "This project requires the Eigen library, and will not be compiled.") return() -else() - include(${EIGEN3_USE_FILE}) endif() create_single_source_cgal_program("bench_obb.cpp") -create_single_source_cgal_program("bench_perfomance.cpp") -create_single_source_cgal_program("bench_fitness_function.cpp") +CGAL_target_use_Eigen(bench_obb) diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index 050b338544a..9a67221542e 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -17,11 +17,15 @@ find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) if (NOT EIGEN3_FOUND) message(STATUS "This project requires the Eigen library, and will not be compiled.") return() -else() - include(${EIGEN3_USE_FILE}) endif() create_single_source_cgal_program("obb_example.cpp") create_single_source_cgal_program("obb_with_point_maps_example.cpp") create_single_source_cgal_program("rotated_aabb_tree_example.cpp") +foreach(target + obb_example + obb_with_point_maps_example + rotated_aabb_tree_example) + CGAL_target_use_Eigen(${target}) +endforeach() diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt index 79faf94bfad..c0ce4c74b4a 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt @@ -17,12 +17,15 @@ find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) if (NOT EIGEN3_FOUND) message(STATUS "This project requires the Eigen library, and will not be compiled.") return() -else() - include(${EIGEN3_USE_FILE}) endif() -create_single_source_cgal_program("test_nelder_mead.cpp") create_single_source_cgal_program("test_OBB_traits.cpp") +create_single_source_cgal_program("test_nelder_mead.cpp") create_single_source_cgal_program("test_optimization_algorithms.cpp") - +foreach(target + test_OBB_traits + test_nelder_mead + test_optimization_algorithms) + CGAL_target_use_Eigen(${target}) +endforeach()