diff --git a/Jet_fitting_3/examples/Jet_fitting_3/Mesh_estimation.cpp b/Jet_fitting_3/examples/Jet_fitting_3/Mesh_estimation.cpp index ab5f176c30c..eeab60787fa 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/Mesh_estimation.cpp +++ b/Jet_fitting_3/examples/Jet_fitting_3/Mesh_estimation.cpp @@ -1,4 +1,13 @@ #include +#ifndef CGAL_USE_LAPACK +int main() +{ + std::cerr << "Skip since LAPACK is not installed" << std::endl; + std::cerr << std::endl; + return 0; +} +#else + #include #include @@ -123,7 +132,6 @@ int main(int argc, char *argv[]) int main() #endif { -#ifdef CGAL_USE_LAPACK string if_name_string; const char *if_name = NULL; //input file name char *w_if_name = NULL; //as above, but / replaced by _ @@ -305,12 +313,7 @@ int main() delete verbose_fname; out_verbose->close(); delete out_verbose; - } - -#else - std::cerr << "Skip since LAPACK is not installed" << std::endl; - std::cerr << std::endl; - -#endif // CGAL_USE_LAPACK + } return 0; } +#endif // CGAL_USE_LAPACK diff --git a/Jet_fitting_3/examples/Jet_fitting_3/Single_estimation.cpp b/Jet_fitting_3/examples/Jet_fitting_3/Single_estimation.cpp index f7ae388d32b..3aa1fef136e 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/Single_estimation.cpp +++ b/Jet_fitting_3/examples/Jet_fitting_3/Single_estimation.cpp @@ -1,10 +1,18 @@ #include -#include + +#ifndef CGAL_USE_LAPACK +int main() +{ + std::cerr << "Skip since LAPACK is not installed" << std::endl; + std::cerr << std::endl; + return 0; +} +#else #include -#include #include +#include typedef double DFT; typedef CGAL::Cartesian Data_Kernel; typedef Data_Kernel::Point_3 DPoint; @@ -20,8 +28,7 @@ int main(int argc, char *argv[]) << " " << std::endl; return 0; } -#ifdef CGAL_USE_LAPACK - //open the input file + //open the input file std::ifstream inFile( argv[1]); if ( !inFile ) { @@ -55,11 +62,6 @@ int main(int argc, char *argv[]) for (int i=0; i<3; i++) std::cout << monge_fit.pca_basis(i).first << std::endl << monge_fit.pca_basis(i).second << std::endl; - -#else - std::cerr << "Skip since LAPACK is not installed" << std::endl; - std::cerr << std::endl; - -#endif // CGAL_USE_LAPACK return 0; } +#endif //CGAL_USE_LAPACK diff --git a/Jet_fitting_3/test/Jet_fitting_3/blind_1pt.cpp b/Jet_fitting_3/test/Jet_fitting_3/blind_1pt.cpp index a0ebfe71993..e9fa791010c 100644 --- a/Jet_fitting_3/test/Jet_fitting_3/blind_1pt.cpp +++ b/Jet_fitting_3/test/Jet_fitting_3/blind_1pt.cpp @@ -1,9 +1,16 @@ #include -#include +#ifndef CGAL_USE_LAPACK +int main() +{ + std::cerr << "Skip since LAPACK is not installed" << std::endl; + std::cerr << std::endl; + return 0; +} +#else #include -#include #include +#include typedef double DFT; typedef CGAL::Cartesian Data_Kernel; @@ -20,7 +27,6 @@ int main() std::cerr << "cannot open file for input\n"; exit(-1); } -#ifdef CGAL_USE_LAPACK //initalize the in_points container double x, y, z; std::vector in_points; @@ -66,11 +72,8 @@ int main() assert(monge_form.coefficients()[1] >= -0.4 - precision); assert(monge_form.coefficients()[1] <= -0.4 + precision); std::cout << "success\n"; - -#else - std::cerr << "Skip since LAPACK is not installed" << std::endl; - std::cerr << std::endl; - -#endif // CGAL_USE_LAPACK - return 0; + return 0; } + +#endif // CGAL_USE_LAPACK +