diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index b03959441ab..f2805ea6ec7 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -4,14 +4,14 @@ project( Polygonal_surface_reconstruction_Examples ) -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.1...3.15) # CGAL and its components find_package( CGAL QUIET COMPONENTS ) if ( NOT CGAL_FOUND ) - message(STATUS "This project requires the CGAL library, and will not be compiled.") + message(STATUS "NOTICE: This project requires the CGAL library, and will not be compiled.") return() endif() @@ -25,7 +25,7 @@ find_package( Boost REQUIRED ) if ( NOT Boost_FOUND ) - message(STATUS "This project requires the Boost library, and will not be compiled.") + message(STATUS "NOTICE: This project requires the Boost library, and will not be compiled.") return() @@ -49,10 +49,10 @@ if ( NOT SCIP_FOUND ) find_package( GLPK ) if ( NOT GLPK_FOUND ) - message(STATUS "This project requires either SCIP or GLPK, and will not be compiled. " + message(STATUS "NOTICE: This project requires either SCIP or GLPK, and will not be compiled. " "Please proivde either 'SCIP_DIR' or 'GLPK_INCLUDE_DIR' and 'GLPK_LIBRARIES'") else() - add_compile_definitions(CGAL_USE_GLPK) + add_definitions(-DCGAL_USE_GLPK) include_directories( BEFORE ${GLPK_INCLUDE_DIR} ) @@ -66,7 +66,7 @@ if ( NOT SCIP_FOUND ) else() - add_compile_definitions(CGAL_USE_SCIP) + add_definitions(-DCGAL_USE_SCIP) include_directories( BEFORE ${SCIP_INCLUDE_DIRS} ) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp index 5ff14cbc0fd..44d0ab7d916 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp @@ -147,7 +147,7 @@ int main() int main(int argc, char* argv[]) { std::cerr << "This test requires either GLPK or SCIP.\n"; - return EXIT_FAILURE; + return EXIT_SUCCESS; } #endif // defined(CGAL_USE_GLPK) || defined(CGAL_USE_SCIP) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp index b6d801bed7d..8e8daded4d9 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp @@ -110,7 +110,7 @@ int main() int main(int argc, char* argv[]) { std::cerr << "This test requires either GLPK or SCIP.\n"; - return EXIT_FAILURE; + return EXIT_SUCCESS; } #endif // defined(CGAL_USE_GLPK) || defined(CGAL_USE_SCIP) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp index e00bc6cf861..2580d606dca 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp @@ -155,7 +155,7 @@ int main() int main(int argc, char* argv[]) { std::cerr << "This test requires either GLPK or SCIP.\n"; - return EXIT_FAILURE; + return EXIT_SUCCESS; } #endif // defined(CGAL_USE_GLPK) || defined(CGAL_USE_SCIP) diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index 8c4d1514c58..1e167802944 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -4,7 +4,7 @@ project( Polygonal_surface_reconstruction_Tests ) -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.1...3.15) # CGAL and its components find_package( CGAL QUIET COMPONENTS ) @@ -53,7 +53,7 @@ if (SCIP_FOUND) target_link_libraries( polygonal_surface_reconstruction_test PRIVATE ${SCIP_LIBRARIES} ) - add_compile_definitions(CGAL_USE_SCIP) + add_definitions(-DCGAL_USE_SCIP) message("SCIP found and used") @@ -68,7 +68,7 @@ find_package( GLPK ) target_link_libraries( polygonal_surface_reconstruction_test PRIVATE ${GLPK_LIBRARIES} ) - add_compile_definitions(CGAL_USE_GLPK) + add_definitions(-DCGAL_USE_GLPK) message("GLPK found and used") diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/polygonal_surface_reconstruction_test.cpp b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/polygonal_surface_reconstruction_test.cpp index 1f32470fcbf..19c209821bb 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/polygonal_surface_reconstruction_test.cpp +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/polygonal_surface_reconstruction_test.cpp @@ -43,7 +43,6 @@ int main(int argc, char* argv[]) //argv[1] = "data/house.ply"; //argv[1] = "data/chair.ply"; //argv[1] = "data/square.ply"; -#endif // usage if (argc - 1 == 0) { @@ -53,8 +52,11 @@ int main(int argc, char* argv[]) std::cerr << "Input file formats are \'pwn\' and \'ply\'. No output.\n"; return EXIT_FAILURE; } +#endif - char* input_file = argv[1]; + const char* input_file = + (argc > 1) ? argv[1] + : "data/icosahedron.pwn"; //--------------------------------------------------------------------- @@ -116,7 +118,7 @@ int main(int argc, char* argv[]) int main(int argc, char* argv[]) { std::cerr << "This test requires either GLPK or SCIP.\n"; - return EXIT_FAILURE; + return EXIT_SUCCESS; } #endif // defined(CGAL_USE_GLPK) || defined(CGAL_USE_SCIP) diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index 7b488ac7a14..bd39ba190d7 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -4,7 +4,7 @@ project( Solver_interface_Examples ) -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...3.15) find_package(CGAL QUIET) @@ -30,7 +30,7 @@ if ( CGAL_FOUND ) target_link_libraries( mixed_integer_program PRIVATE ${SCIP_LIBRARIES} ) - add_compile_definitions(CGAL_USE_SCIP) + add_definitions(-DCGAL_USE_SCIP) message("SCIP found and used") @@ -44,13 +44,13 @@ if ( CGAL_FOUND ) target_link_libraries( mixed_integer_program PRIVATE ${GLPK_LIBRARIES} ) - add_compile_definitions(CGAL_USE_GLPK) + add_definitions(-DCGAL_USE_GLPK) message("GLPK found and used") else() - message(STATUS "This project requires either SCIP or GLPK, and will not be compiled. " + message(STATUS "NOTICE: This project requires either SCIP or GLPK, and will not be compiled. " "Please proivde either 'SCIP_DIR' or 'GLPK_INCLUDE_DIR' and 'GLPK_LIBRARIES'") endif() @@ -59,7 +59,7 @@ if ( CGAL_FOUND ) else() - message(STATUS "This program requires the CGAL library, and will not be compiled.") + message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.") endif() diff --git a/Solver_interface/examples/Solver_interface/mixed_integer_program.cpp b/Solver_interface/examples/Solver_interface/mixed_integer_program.cpp index 4368628cd51..4102e8f999f 100644 --- a/Solver_interface/examples/Solver_interface/mixed_integer_program.cpp +++ b/Solver_interface/examples/Solver_interface/mixed_integer_program.cpp @@ -106,7 +106,7 @@ int main() int main(int argc, char* argv[]) { std::cerr << "This test requires either GLPK or SCIP.\n"; - return EXIT_FAILURE; + return EXIT_SUCCESS; } #endif // defined(CGAL_USE_GLPK) || defined(CGAL_USE_SCIP)