diff --git a/.gitignore b/.gitignore index cf6ea13ac18..7aa0d0711d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1094,6 +1094,9 @@ cgal_test_with_cmake.log # File created by the Semantic Bovinator (an Emacs package) semantic.cache +# Python cache files +*.pyc + # Files produced by a Qt compilation/execution .qglviewer.xml *.moc diff --git a/.travis.yml b/.travis.yml index 7b3d75ae95a..3e699701ce9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,9 +42,9 @@ env: - PACKAGE='Snap_rounding_2 Solver_interface Spatial_searching ' - PACKAGE='Spatial_sorting STL_Extension Straight_skeleton_2 ' - PACKAGE='Stream_lines_2 Stream_support Subdivision_method_3 ' - - PACKAGE='Surface_mesh Surface_mesh_deformation Surface_mesh_parameterization ' - - PACKAGE='Surface_mesh_segmentation Surface_mesh_shortest_path Surface_mesh_simplification ' - - PACKAGE='Surface_mesh_skeletonization Surface_mesher Sweep_line_2 ' + - PACKAGE='Surface_mesh Surface_mesh_deformation Surface_mesher ' + - PACKAGE='Surface_mesh_parameterization Surface_mesh_segmentation Surface_mesh_shortest_path ' + - PACKAGE='Surface_mesh_simplification Surface_mesh_skeletonization Sweep_line_2 ' - PACKAGE='TDS_2 TDS_3 Testsuite ' - PACKAGE='Three Triangulation Triangulation_2 ' - PACKAGE='Triangulation_3 Union_find Visibility_2 ' @@ -58,8 +58,9 @@ install: before_script: - mkdir -p build - cd build -- cmake -DCGAL_HEADER_ONLY=ON -DQt5_DIR="/opt/qt55/lib/cmake/Qt5" -DQt5Svg_DIR="/opt/qt55/lib/cmake/Qt5Svg" -DQt5OpenGL_DIR="/opt/qt55/lib/cmake/Qt5OpenGL" -DWITH_demos:BOOL=TRUE -DWITH_examples:BOOL=true -DWITH_tests:BOOL=TRUE -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG .. +- cmake -DCGAL_HEADER_ONLY=ON -DQt5_DIR="/opt/qt55/lib/cmake/Qt5" -DQt5Svg_DIR="/opt/qt55/lib/cmake/Qt5Svg" -DQt5OpenGL_DIR="/opt/qt55/lib/cmake/Qt5OpenGL" -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG .. - make +- sudo make install - cd .. script: - cd ./.travis @@ -79,6 +80,7 @@ addons: - libboost-thread1.55-dev - libgmp-dev - libmpfr-dev + - libmpfi-dev - zlib1g-dev - libeigen3-dev # too old - qt55base @@ -93,7 +95,6 @@ addons: # - geomview # - libglew1.5-dev # - libipe-dev - # - libmpfi-dev notifications: email: on_success: change # default: always diff --git a/.travis/build_package.sh b/.travis/build_package.sh index 680264ce10d..6e4ad1bb619 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -6,7 +6,7 @@ CXX_FLAGS="-DCGAL_NDEBUG" function build_examples { mkdir -p build-travis cd build-travis - cmake -DCGAL_DIR="$ROOT/build" -DCMAKE_CXX_FLAGS_RELEASE="${CXX_FLAGS}" .. + cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS_RELEASE="${CXX_FLAGS}" .. make -j2 } @@ -44,7 +44,7 @@ function build_demo { QGLVIEWERROOT=$PWD/qglviewer export QGLVIEWERROOT fi - cmake -DCGAL_DIR="$ROOT/build" -DQt5_DIR="/opt/qt55/lib/cmake/Qt5" -DQt5Svg_DIR="/opt/qt55/lib/cmake/Qt5Svg" -DQt5OpenGL_DIR="/opt/qt55/lib/cmake/Qt5OpenGL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS_RELEASE="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" .. + cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DQt5_DIR="/opt/qt55/lib/cmake/Qt5" -DQt5Svg_DIR="/opt/qt55/lib/cmake/Qt5Svg" -DQt5OpenGL_DIR="/opt/qt55/lib/cmake/Qt5OpenGL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS_RELEASE="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" .. make -j2 } diff --git a/.travis/packages.txt b/.travis/packages.txt index 938e6693a65..8faca28a4dd 100644 --- a/.travis/packages.txt +++ b/.travis/packages.txt @@ -114,12 +114,12 @@ Stream_support Subdivision_method_3 Surface_mesh Surface_mesh_deformation +Surface_mesher Surface_mesh_parameterization Surface_mesh_segmentation Surface_mesh_shortest_path Surface_mesh_simplification Surface_mesh_skeletonization -Surface_mesher Sweep_line_2 TDS_2 TDS_3 diff --git a/.travis/template.txt b/.travis/template.txt index 588579f5391..efa31ef37b2 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -13,8 +13,9 @@ install: before_script: - mkdir -p build - cd build -- cmake -DCGAL_HEADER_ONLY=ON -DQt5_DIR="/opt/qt55/lib/cmake/Qt5" -DQt5Svg_DIR="/opt/qt55/lib/cmake/Qt5Svg" -DQt5OpenGL_DIR="/opt/qt55/lib/cmake/Qt5OpenGL" -DWITH_demos:BOOL=TRUE -DWITH_examples:BOOL=true -DWITH_tests:BOOL=TRUE -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG .. +- cmake -DCGAL_HEADER_ONLY=ON -DQt5_DIR="/opt/qt55/lib/cmake/Qt5" -DQt5Svg_DIR="/opt/qt55/lib/cmake/Qt5Svg" -DQt5OpenGL_DIR="/opt/qt55/lib/cmake/Qt5OpenGL" -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG .. - make +- sudo make install - cd .. script: - cd ./.travis @@ -34,6 +35,7 @@ addons: - libboost-thread1.55-dev - libgmp-dev - libmpfr-dev + - libmpfi-dev - zlib1g-dev - libeigen3-dev # too old - qt55base @@ -48,7 +50,6 @@ addons: # - geomview # - libglew1.5-dev # - libipe-dev - # - libmpfi-dev notifications: email: on_success: change # default: always diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index d17a40894f3..77b7c395440 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -27,15 +27,12 @@ find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Gui Svg) include( ${CGAL_USE_FILE} ) -# Find OpenGL -find_package(OpenGL) - # Find QGLViewer if(Qt5_FOUND) find_package(QGLViewer) endif(Qt5_FOUND) -if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) +if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND QGLVIEWER_FOUND) include_directories ( ${QGLVIEWER_INCLUDE_DIR} ) @@ -59,20 +56,19 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FO "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp" ) add_executable ( AABB_demo AABB_demo.cpp ${UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) - qt5_use_modules(AABB_demo Gui OpenGL Xml Script Svg ) # Link with Qt libraries - target_link_libraries( AABB_demo ${QT_LIBRARIES} ) - - # Link with CGAL - target_link_libraries( AABB_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) - - # Link with libQGLViewer, OpenGL - target_link_libraries( AABB_demo ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + target_link_libraries( AABB_demo PRIVATE + Qt5::OpenGL Qt5::Gui + CGAL::CGAL + CGAL::CGAL_Qt5 + ${QGLVIEWER_LIBRARIES}) add_to_cached_list( CGAL_EXECUTABLE_TARGETS AABB_demo ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(AABB_demo) -else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) +else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND QGLVIEWER_FOUND) set(AABB_MISSING_DEPS "") @@ -88,14 +84,10 @@ else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}") endif() - if(NOT OPENGL_FOUND) - set(AABB_MISSING_DEPS "OpenGL, ${AABB_MISSING_DEPS}") - endif() - if(NOT QGLVIEWER_FOUND) set(AABB_MISSING_DEPS "QGLViewer, ${AABB_MISSING_DEPS}") endif() message(STATUS "NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled.") -endif (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) +endif (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND QGLVIEWER_FOUND) diff --git a/AABB_tree/demo/AABB_tree/Scene.cpp b/AABB_tree/demo/AABB_tree/Scene.cpp index 19b07ee9b6f..09277853f80 100644 --- a/AABB_tree/demo/AABB_tree/Scene.cpp +++ b/AABB_tree/demo/AABB_tree/Scene.cpp @@ -595,6 +595,7 @@ void Scene::draw(QGLViewer* viewer) initGL(); if(!are_buffers_initialized) initialize_buffers(); + gl->glEnable(GL_DEPTH_TEST); QColor color; QMatrix4x4 fMatrix; fMatrix.setToIdentity(); @@ -663,7 +664,7 @@ void Scene::draw(QGLViewer* viewer) //cutting_segments fMatrix.setToIdentity(); - ::glLineWidth(2.0f); + gl->glLineWidth(2.0f); vao[3].bind(); attrib_buffers(viewer); rendering_program.bind(); @@ -671,7 +672,7 @@ void Scene::draw(QGLViewer* viewer) rendering_program.setUniformValue(colorLocation, color); rendering_program.setUniformValue(fLocation, fMatrix); gl->glDrawArrays(GL_LINES, 0, static_cast(pos_cut_segments.size()/3)); - ::glLineWidth(1.0f); + gl->glLineWidth(1.0f); rendering_program.release(); vao[3].release(); //grid @@ -690,8 +691,8 @@ void Scene::draw(QGLViewer* viewer) //cutting_plane // for(int i=0; i< 16 ; i++) // fMatrix.data()[i] = m_frame->matrix()[i]; - ::glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); - ::glEnable(GL_BLEND); + gl->glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + gl->glEnable(GL_BLEND); vao[4].bind(); attrib_buffers(viewer); rendering_program.bind(); @@ -699,7 +700,7 @@ void Scene::draw(QGLViewer* viewer) rendering_program.setUniformValue(colorLocation, color); rendering_program.setUniformValue(fLocation, fMatrix); gl->glDrawArrays(GL_TRIANGLES, 0, static_cast(pos_plane.size()/3)); - ::glDisable(GL_BLEND); + gl->glDisable(GL_BLEND); rendering_program.release(); vao[4].release(); diff --git a/AABB_tree/demo/AABB_tree/Viewer.cpp b/AABB_tree/demo/AABB_tree/Viewer.cpp index 2f411def1df..56de4c959eb 100644 --- a/AABB_tree/demo/AABB_tree/Viewer.cpp +++ b/AABB_tree/demo/AABB_tree/Viewer.cpp @@ -18,7 +18,6 @@ void Viewer::setScene(Scene* pScene) void Viewer::draw() { - glEnable(GL_DEPTH_TEST); QGLViewer::draw(); if(m_pScene != NULL) { diff --git a/Algebraic_foundations/doc/Algebraic_foundations/CGAL/Algebraic_structure_traits.h b/Algebraic_foundations/doc/Algebraic_foundations/CGAL/Algebraic_structure_traits.h index 6824ffab95b..38d35c6cf27 100644 --- a/Algebraic_foundations/doc/Algebraic_foundations/CGAL/Algebraic_structure_traits.h +++ b/Algebraic_foundations/doc/Algebraic_foundations/CGAL/Algebraic_structure_traits.h @@ -29,7 +29,7 @@ Tag indicating that a type is a model of the */ -class Euclidean_ring_tag : public Unique_factorization_domain_tag { +struct Euclidean_ring_tag : public Unique_factorization_domain_tag { }; /* end Euclidean_ring_tag */ @@ -45,7 +45,7 @@ Tag indicating that a type is a model of the `Field` concept. */ -class Field_tag : public Integral_domain_tag { +struct Field_tag : public Integral_domain_tag { }; /* end Field_tag */ @@ -61,7 +61,7 @@ Tag indicating that a type is a model of the `FieldWithKthRoot` concept. */ -class Field_with_kth_root_tag : public Field_with_sqrt_tag { +struct Field_with_kth_root_tag : public Field_with_sqrt_tag { }; /* end Field_with_kth_root_tag */ @@ -77,7 +77,7 @@ Tag indicating that a type is a model of the `FieldWithRootOf` concept. */ -class Field_with_root_of_tag : public Field_with_kth_root_tag { +struct Field_with_root_of_tag : public Field_with_kth_root_tag { }; /* end Field_with_root_of_tag */ @@ -93,7 +93,7 @@ Tag indicating that a type is a model of the `FieldWithSqrt` concept. */ -class Field_with_sqrt_tag : public Field_tag { +struct Field_with_sqrt_tag : public Field_tag { }; /* end Field_with_sqrt_tag */ @@ -109,7 +109,7 @@ Tag indicating that a type is a model of the `IntegralDomain` concept. */ -class Integral_domain_tag : public Integral_domain_without_division_tag { +struct Integral_domain_tag : public Integral_domain_without_division_tag { }; /* end Integral_domain_tag */ @@ -124,7 +124,7 @@ Tag indicating that a type is a model of the `IntegralDomainWithoutDivision` con */ -class Integral_domain_without_division_tag { +struct Integral_domain_without_division_tag { }; /* end Integral_domain_without_division_tag */ @@ -140,7 +140,7 @@ Tag indicating that a type is a model of the `UniqueFactorizationDomain` concept */ -class Unique_factorization_domain_tag : public Integral_domain_tag { +struct Unique_factorization_domain_tag : public Integral_domain_tag { }; /* end Unique_factorization_domain_tag */ } /* end namespace CGAL */ diff --git a/Algebraic_foundations/doc/Algebraic_foundations/CGAL/Coercion_traits.h b/Algebraic_foundations/doc/Algebraic_foundations/CGAL/Coercion_traits.h index 074344d1a84..7c1bbf3fbcb 100644 --- a/Algebraic_foundations/doc/Algebraic_foundations/CGAL/Coercion_traits.h +++ b/Algebraic_foundations/doc/Algebraic_foundations/CGAL/Coercion_traits.h @@ -12,8 +12,7 @@ An instance of `Coercion_traits` reflects the type coercion of the types */ template< typename A, typename B > -class Coercion_traits { -public: +struct Coercion_traits { /// \name Types /// @{ diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index abab6b42775..366cc0cb9c2 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -1,22 +1,21 @@ -# Created by the script cgal_create_cmake_script -# This is the CMake script for compiling a CGAL application. - - project( Algebraic_kernel_d_Examples ) -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.1) -find_package(CGAL QUIET COMPONENTS Core MPFI) +find_package(CGAL QUIET COMPONENTS Core) if ( CGAL_FOUND ) - include( ${CGAL_USE_FILE} ) + find_package(MPFI QUIET) +endif() + +if( CGAL_FOUND AND MPFI_FOUND) + + include( ${MPFI_USE_FILE} ) include( CGAL_CreateSingleSourceCGALProgram ) include( CGAL_VersionUtils ) - include_directories (BEFORE ../../include) - create_single_source_cgal_program( "Compare_1.cpp" ) create_single_source_cgal_program( "Construct_algebraic_real_1.cpp" ) create_single_source_cgal_program( "Isolate_1.cpp" ) @@ -25,7 +24,6 @@ if ( CGAL_FOUND ) else() - message(STATUS "This program requires the CGAL library, and will not be compiled.") + message(STATUS "This program requires the CGAL library and MPFI, and will not be compiled.") endif() - diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 4c1f780b71e..5d1ddbaa0e5 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -1,13 +1,10 @@ -# Created by the script cgal_create_CMakeLists -# This is the CMake script for compiling a set of CGAL applications. - project( Algebraic_kernel_d_Tests ) -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.1) # CGAL and its components -find_package( CGAL QUIET COMPONENTS Core RS3) +find_package( CGAL QUIET COMPONENTS Core) if ( NOT CGAL_FOUND ) @@ -19,6 +16,15 @@ endif() # include helper file include( ${CGAL_USE_FILE} ) +find_package(RS3 QUIET) + +if(MPFI_FOUND) + include( ${MPFI_USE_FILE} ) +endif() +if(RS3_FOUND) + include( ${RS3_USE_FILE} ) +endif() + include( CGAL_CreateSingleSourceCGALProgram ) # Boost and its components diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index b15bdba99c7..3e4a711fc77 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -21,10 +21,9 @@ include(${CGAL_USE_FILE}) find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) -find_package(OpenGL) find_package(QGLViewer) -if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND QGLVIEWER_FOUND ) add_definitions(-DQT_NO_KEYWORDS) @@ -40,15 +39,18 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_ qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Alpha_shape_3.qrc ) add_executable ( Alpha_shape_3 Alpha_shape_3.cpp MainWindow.cpp Viewer.cpp ${uis} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) - qt5_use_modules(Alpha_shape_3 Xml Script OpenGL Svg) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shape_3 ) - target_link_libraries( Alpha_shape_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) - target_link_libraries( Alpha_shape_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ) - target_link_libraries( Alpha_shape_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + target_link_libraries( Alpha_shape_3 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 + Qt5::OpenGL Qt5::Gui + ${QGLVIEWER_LIBRARIES} ) + + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Alpha_shape_3) else() - message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt5, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, and Qt5, and will not be compiled.") endif() diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp index a5a0dd2f222..69d8df641a2 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp @@ -335,7 +335,7 @@ Viewer::draw() rendering_program_points.bind(); color.setRgbF(1.0f, 0.0f, 0.0f); glPointSize(5); - ::glEnable(GL_POINT_SMOOTH); + glEnable(GL_POINT_SMOOTH); rendering_program_points.setUniformValue(colorLocation_points, color); glDrawArrays(GL_POINTS, 0, static_cast(pos_points.size()/3)); rendering_program_points.release(); diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt index 2991c82c7c3..8542a68811b 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt +++ b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt @@ -8,12 +8,14 @@ cmake_minimum_required(VERSION 2.8.11) -find_package(CGAL QUIET COMPONENTS Core GMP MPFR) +find_package(CGAL QUIET COMPONENTS Core) if ( CGAL_FOUND) include( ${CGAL_USE_FILE} ) endif() +find_package(GMP QUIET) + if ( CGAL_FOUND AND GMP_FOUND ) include( CGAL_VersionUtils ) @@ -30,6 +32,8 @@ if ( CGAL_FOUND AND GMP_FOUND ) find_package( MPFI ) if( MPFI_FOUND ) + include( ${MPFI_USE_FILE} ) + # for the testsuite, the version of MPFI shipped with RS is used; this # version needs GMP>=4.2, so we require this dependency only here and # not in FindMPFI.cmake diff --git a/Arrangement_on_surface_2/Arrangement_on_surface_2.dxy b/Arrangement_on_surface_2/Arrangement_on_surface_2.dxy deleted file mode 100644 index d4578f75263..00000000000 --- a/Arrangement_on_surface_2/Arrangement_on_surface_2.dxy +++ /dev/null @@ -1,1218 +0,0 @@ -# Doxyfile 1.4.2 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Arrangement_on_surface_2 - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. - -SHOW_DIRECTORIES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the progam writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = include/CGAL - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = examples/Arrangement_on_surface_2 - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = YES - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/Arrangement_on_surface_2/todo b/Arrangement_on_surface_2/TODO similarity index 100% rename from Arrangement_on_surface_2/todo rename to Arrangement_on_surface_2/TODO diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index fc73f917578..e74250bee26 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -11,7 +11,7 @@ endif() find_package(CGAL COMPONENTS Core Qt5 ) include( ${CGAL_USE_FILE} ) -find_package( Qt5 QUIET COMPONENTS Script Widgets ) +find_package( Qt5 QUIET COMPONENTS Gui ) if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND CGAL_Core_FOUND) include_directories( ./ ) @@ -68,15 +68,15 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND CGAL_Core_FOUND) ${arrangement_2_uis} ${CGAL_Qt5_RESOURCE_FILES} ) - qt5_use_modules(arrangement_2 Widgets Script) - target_link_libraries( arrangement_2 - ${CGAL_LIBRARIES} - ${CGAL_3RD_PARTY_LIBRARIES} - ${QT_LIBRARIES} + target_link_libraries( arrangement_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core + Qt5::Gui ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS arrangement_2 ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(arrangement_2) else() message(STATUS "NOTICE: This demo requires CGAL, CGAL-Core and Qt5, and will not be compiled.") diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h index 3599a9bf987..4990a399fa3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h @@ -40,9 +40,8 @@ or vertical ray-shoot query. \sa `CGAL_ARR_POINT_LOCATION_VERSION` */ template -class Arr_point_location_result +struct Arr_point_location_result { -public: /*! The type of the arrangement feature that is the result of a * point-location query or a vertical ray-shoot query, namely, * `boost::variant` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h index 9afabeab34a..a70bc00be76 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h @@ -16,8 +16,7 @@ arrangement. */ -class Arr_oblivious_side_tag { -public: +struct Arr_oblivious_side_tag { /// @} @@ -44,8 +43,7 @@ functions based on type of curves that induce the arrangement. */ -class Arr_open_side_tag { -public: +struct Arr_open_side_tag { /// @} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h index 1374fad7133..b8b5ab5c530 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h @@ -16,25 +16,26 @@ // $Id$ // SPDX-License-Identifier: GPL-3.0+ // -// // Author(s) : Ron Wein -// Efi Fogel +// Efi Fogel #ifndef CGAL_ARR_CURVE_DATA_TRAITS_2_H #define CGAL_ARR_CURVE_DATA_TRAITS_2_H #include - /*! \file * Definition of the Arr_curve_data_traits_2<> class template. */ -#include -#include -#include -#include -#include +#include +#include +#include + +#include +#include +#include +#include namespace CGAL { @@ -50,183 +51,148 @@ namespace CGAL { * the overlapping subcurve is obtained from the merge functor. * All other functors are inherited from the base ordinary traits class. */ -template , - class CurveData_ = XMonotoneCurveData_, - class Convert_ = _Default_convert_func > -class Arr_curve_data_traits_2 : public Traits_ -{ +template , + typename CurveData_ = XMonotoneCurveData_, + typename Convert_ = + _Default_convert_func > +class Arr_curve_data_traits_2 : public Traits_ { public: + typedef Traits_ Base_traits_2; + typedef XMonotoneCurveData_ X_monotone_curve_data; + typedef Merge_ Merge; + typedef CurveData_ Curve_data; + typedef Convert_ Convert; - typedef Traits_ Base_traits_2; - typedef XMonotoneCurveData_ X_monotone_curve_data; - typedef Merge_ Merge; - typedef CurveData_ Curve_data; - typedef Convert_ Convert; - - typedef typename Base_traits_2::Curve_2 Base_curve_2; - typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2; - typedef typename Base_traits_2::Point_2 Point_2; + typedef typename Base_traits_2::Curve_2 Base_curve_2; + typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2; + typedef typename Base_traits_2::Point_2 Point_2; - typedef typename Base_traits_2::Has_left_category Has_left_category; - typedef typename Base_traits_2::Has_merge_category Base_has_merge_category; - typedef Tag_true Has_merge_category; + typedef typename Base_traits_2::Has_left_category Has_left_category; + typedef typename Base_traits_2::Has_merge_category Base_has_merge_category; + typedef Tag_true Has_merge_category; typedef typename Base_traits_2::Has_do_intersect_category - Has_do_intersect_category; + Has_do_intersect_category; - typedef typename internal::Arr_complete_left_side_category< Base_traits_2 >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Base_traits_2 >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Base_traits_2 >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Base_traits_2 >::Category - Right_side_category; + typedef typename internal::Arr_complete_left_side_category:: + Category Left_side_category; + typedef typename internal::Arr_complete_bottom_side_category:: + Category Bottom_side_category; + typedef typename internal::Arr_complete_top_side_category:: + Category Top_side_category; + typedef typename internal::Arr_complete_right_side_category:: + Category Right_side_category; // Representation of a curve with an addtional data field: - typedef _Curve_data_ex Curve_2; - - // Representation of an x-monotone curve with an addtional data field: - typedef _Curve_data_ex X_monotone_curve_2; + typedef _Curve_data_ex Curve_2; + + // Representation of an x-monotone curve with an addtional data field: + typedef _Curve_data_ex + X_monotone_curve_2; + + typedef typename Base_traits_2::Multiplicity Multiplicity; - typedef typename Base_traits_2::Multiplicity Multiplicity; - public: - /// \name Construction. //@{ - /*! Default constructor. */ - Arr_curve_data_traits_2 () - {} - - /*! Constructor from a base-traits class. */ - Arr_curve_data_traits_2 (const Base_traits_2 & traits) : - Base_traits_2 (traits) - {} + /*! Construct default. */ + Arr_curve_data_traits_2() {} + + /*! Construct from a base-traits class. */ + Arr_curve_data_traits_2(const Base_traits_2& traits) : Base_traits_2(traits) {} //@} /// \name Overriden functors. //@{ - class Make_x_monotone_2 - { + class Make_x_monotone_2 { private: - const Base_traits_2 * base; + const Base_traits_2& m_base; public: - /*! Constructor. */ - Make_x_monotone_2 (const Base_traits_2 * _base) : - base (_base) - {} - - /*! - * Cut the given curve into x-monotone subcurves and insert them to the + Make_x_monotone_2(const Base_traits_2& base) : m_base(base) {} + + /*! Cut the given curve into x-monotone subcurves and insert them to the * given output iterator. As segments are always x_monotone, only one * x-monotone curve will be contained in the iterator. * \param cv The curve. * \param oi The output iterator, whose value-type is X_monotone_curve_2. * \return The past-the-end iterator. */ - template - OutputIterator operator() (const Curve_2& cv, OutputIterator oi) const + template + OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { // Make the original curve x-monotone. - std::list base_objects; - - base->make_x_monotone_2_object() (cv, - std::back_inserter (base_objects)); + std::list base_objects; + m_base.make_x_monotone_2_object()(cv, std::back_inserter(base_objects)); // Attach the data to each of the resulting x-monotone curves. - typename std::list::const_iterator it; - const Base_x_monotone_curve_2 *base_x_curve; - X_monotone_curve_data xdata = Convert()(cv.data()); - - for (it = base_objects.begin(); it != base_objects.end(); ++it) + const Base_x_monotone_curve_2* base_x_curve; + X_monotone_curve_data xdata = Convert()(cv.data()); + for (typename std::list::const_iterator it = + base_objects.begin(); it != base_objects.end(); ++it) { - base_x_curve = object_cast (&(*it)); - if (base_x_curve != NULL) - { + base_x_curve = object_cast(&(*it)); + if (base_x_curve != NULL) { // Current object is an x-monotone curve: Attach data to it. - *oi = make_object (X_monotone_curve_2 (*base_x_curve, - xdata)); + *oi++ = make_object(X_monotone_curve_2(*base_x_curve, xdata)); } - else - { + else { // Current object is an isolated point: Leave it as is. - CGAL_assertion (object_cast (&(*it)) != NULL); - *oi = *it; + CGAL_assertion(object_cast(&(*it)) != NULL); + *oi++ = *it; } - ++oi; } - return (oi); + return oi; } }; - /*! Get a Make_x_monotone_2 functor object. */ - Make_x_monotone_2 make_x_monotone_2_object () const - { - return Make_x_monotone_2 (this); - } + /*! Obtain a Make_x_monotone_2 functor object. */ + Make_x_monotone_2 make_x_monotone_2_object() const + { return Make_x_monotone_2(*this); } - class Split_2 - { + class Split_2 { private: - const Base_traits_2 * base; + const Base_traits_2& m_base; public: - /*! Constructor. */ - Split_2 (const Base_traits_2 * _base) : - base (_base) - {} + Split_2(const Base_traits_2& base) : m_base(base) {} - /*! - * Split a given x-monotone curve at a given point into two sub-curves. - * \param cv The curve to split - * \param p The split point. - * \param c1 Output: The left resulting subcurve (p is its right endpoint). - * \param c2 Output: The right resulting subcurve (p is its left endpoint). + /*! Split a given x-monotone curve at a given point into two sub-curves. + * \param cv[in] The curve to split + * \param p[in] The split point. + * \param c1[out] The left resulting subcurve (p is its right endpoint). + * \param c2[out] The right resulting subcurve (p is its left endpoint). * \pre p lies on cv but is not one of its end-points. */ - void operator() (const X_monotone_curve_2& cv, const Point_2 & p, - X_monotone_curve_2& c1, X_monotone_curve_2& c2) const + void operator()(const X_monotone_curve_2& cv, const Point_2& p, + X_monotone_curve_2& c1, X_monotone_curve_2& c2) const { // Split the original curve. - base->split_2_object() (cv, p, c1, c2); + m_base.split_2_object()(cv, p, c1, c2); // Attach data to the split curves. - c1.set_data (cv.data()); - c2.set_data (cv.data()); - - return; + c1.set_data(cv.data()); + c2.set_data(cv.data()); } }; - /*! Get a Split_2 functor object. */ - Split_2 split_2_object () const - { - return Split_2 (this); - } + /*! Obtain a Split_2 functor object. */ + Split_2 split_2_object() const { return Split_2(*this); } - class Intersect_2 - { + class Intersect_2 { private: - const Base_traits_2 * base; + const Base_traits_2& m_base; public: - /*! Constructor. */ - Intersect_2 (const Base_traits_2 * _base) : - base (_base) - {} + Intersect_2(const Base_traits_2& base) : m_base(base) {} - /*! - * Find the intersections of the two given curves and insert them to the + /*! Find the intersections of the two given curves and insert them to the * given output iterator. As two segments may itersect only once, only a * single will be contained in the iterator. * \param cv1 The first curve. @@ -234,223 +200,243 @@ public: * \param oi The output iterator. * \return The past-the-end iterator. */ - template - OutputIterator operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - OutputIterator oi) const + template + OutputIterator operator()(const X_monotone_curve_2& cv1, + const X_monotone_curve_2& cv2, + OutputIterator oi) const { // Use the base functor to obtain all intersection objects. - std::list base_objects; - - base->intersect_2_object() (cv1, cv2, - std::back_inserter (base_objects)); + std::list base_objects; + m_base.intersect_2_object()(cv1, cv2, std::back_inserter(base_objects)); // Stop if the list is empty: - if (base_objects.empty()) - return (oi); + if (base_objects.empty()) return oi; // Go over all intersection objects and prepare the output. - typename std::list::const_iterator it; - const Base_x_monotone_curve_2 *base_cv; - - for (it = base_objects.begin(); it != base_objects.end(); ++it) + const Base_x_monotone_curve_2* base_cv; + for (typename std::list::const_iterator it = + base_objects.begin(); it != base_objects.end(); ++it) { - if ((base_cv = object_cast (&(*it))) != NULL) - { + if ((base_cv = object_cast(&(*it))) != NULL) { // The current intersection object is an overlapping x-monotone // curve: Merge the data fields of both intersecting curves and // associate the result with the overlapping curve. - X_monotone_curve_2 cv (*base_cv, - Merge() (cv1.data(), cv2.data())); - - *oi = make_object (cv); + X_monotone_curve_2 cv(*base_cv, Merge() (cv1.data(), cv2.data())); + *oi++ = make_object(cv); } - else - { + else { // The current intersection object is an intersection point: // Copy it as is. - *oi = *it; + *oi++ = *it; } - ++oi; } - return (oi); + return oi; } }; - /*! Get an Intersect_2 functor object. */ - Intersect_2 intersect_2_object () const - { - return Intersect_2 (this); - } + /*! Obtain an Intersect_2 functor object. */ + Intersect_2 intersect_2_object() const { return Intersect_2(*this); } - class Are_mergeable_2 - { + class Are_mergeable_2 { private: - const Base_traits_2 * base; + const Base_traits_2& m_base; - public: - - /*! Constructor. */ - Are_mergeable_2 (const Base_traits_2 * _base) : - base (_base) - {} - - /*! - * Check whether it is possible to merge two given x-monotone curves. - * \param cv1 The first curve. - * \param cv2 The second curve. - * \return (true) if the two curves are mergeable; (false) otherwise. + /*! Generate a helper class template to find out whether the base geometry + * traits has a nested type named Are_mergeable_2. */ - bool operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2) const - { - return (_are_mergeable_base_imp (cv1, cv2, Base_has_merge_category())); - } + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_are_mergeable_2, + Are_mergeable_2, false) - private: - - /*! - * Implementation of the base predicate in case the HasMerge tag is true. + /*! Implementation of the predicate in case the base geometry traits class + * has a nested type named Are_mergeable_2. */ - bool _are_mergeable_base_imp (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - Tag_true) const + template + typename boost::enable_if_c::value, + bool>::type + are_mergeable(const X_monotone_curve_2& cv1, + const X_monotone_curve_2& cv2) const { // In case the two base curves are not mergeable, the extended curves // are not mergeable as well. - if (! (base->are_mergeable_2_object() (cv1, cv2))) - return (false); + if (! (m_base.are_mergeable_2_object()(cv1, cv2))) return false; // In case the two base curves are mergeable, check that they have the // same data fields. return (cv1.data() == cv2.data()); } - /*! - * Implementation of the base predicate in case the HasMerge tag is false. + /*! Implementation of the predicate in case the base geometry traits class + * does not have a nested type named Are_mergeable_2. + * This function should never be called! */ - bool _are_mergeable_base_imp (const X_monotone_curve_2& , - const X_monotone_curve_2& , - Tag_false) const + template + typename boost::enable_if_c::value, + bool>::type + are_mergeable(const X_monotone_curve_2& /* cv1 */, + const X_monotone_curve_2& /* cv2 */) const { - // Curve merging is not supported: - return (false); + CGAL_error_msg("Are mergeable is not supported."); + return false; } + + public: + /*! Constructor. */ + Are_mergeable_2(const Base_traits_2& base) : m_base(base) {} + + /*! Check whether it is possible to merge two given x-monotone curves. + * \param cv1[in] The first curve. + * \param cv2[in] The second curve. + * \return (true) if the two curves are mergeable; (false) otherwise. + */ + bool operator()(const X_monotone_curve_2& cv1, + const X_monotone_curve_2& cv2) const + { return are_mergeable(cv1, cv2); } }; - - /*! Get an Are_mergeable_2 functor object. */ - Are_mergeable_2 are_mergeable_2_object () const - { - return Are_mergeable_2 (this); - } + + /*! Obtain an Are_mergeable_2 functor object. */ + Are_mergeable_2 are_mergeable_2_object() const + { return Are_mergeable_2(*this); } /*! \class Merge_2 * A functor that merges two x-monotone arcs into one. */ - class Merge_2 - { + class Merge_2 { private: - const Base_traits_2 * base; + const Base_traits_2& m_base; - public: - - /*! Constructor. */ - Merge_2 (const Base_traits_2 * _base) : - base (_base) - {} - - /*! - * Merge two given x-monotone curves into a single curve (segment). - * \param cv1 The first curve. - * \param cv2 The second curve. - * \param c Output: The merged curve. - * \pre The two curves are mergeable. + /*! Generate a helper class template to find out whether the base geometry + * traits has a nested type named Merge_2. */ - void operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - X_monotone_curve_2& c) const + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_merge_2, Are_mergeable_2, false) + + /*! Implementation of the predicate in case the base geometry traits class + * has a nested type named Merge_2. + */ + template + typename boost::enable_if_c::value, void>::type + merge(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, + X_monotone_curve_2& c) const { - // The function is implemented based on the base Has_merge category. - _merge_imp (cv1, cv2, c, Base_has_merge_category()); - } - - private: - - /*! - * Implementation of the operator() in case the HasMerge tag is true. - */ - void _merge_imp (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - X_monotone_curve_2& c, - Tag_true) const - { // Merge the two base curve. - Base_x_monotone_curve_2 base_cv; + Base_x_monotone_curve_2 base_cv; - base->merge_2_object() (cv1, cv2, base_cv); + m_base.merge_2_object()(cv1, cv2, base_cv); // Attach data from one of the curves. - CGAL_precondition (cv1.data() == cv2.data()); + CGAL_precondition(cv1.data() == cv2.data()); - c = X_monotone_curve_2 (base_cv, cv1.data()); - return; + c = X_monotone_curve_2(base_cv, cv1.data()); } - /*! - * Implementation of the operator() in case the HasMerge tag is false. + /*! Implementation of the predicate in case the base geometry traits class + * does not have a nested type named Merge_2. + * This function should never be called! */ - void _merge_imp (const X_monotone_curve_2& , - const X_monotone_curve_2& , - X_monotone_curve_2& , - Tag_false) const - { - // This function should never be called! - CGAL_error_msg("Merging curves is not supported."); - } - }; - - /*! Get a Merge_2 functor object. */ - Merge_2 merge_2_object () const - { - return Merge_2 (this); - } - - class Construct_x_monotone_curve_2 - { - private: - const Base_traits_2 * base; + template + typename boost::enable_if_c::value, void>::type + merge(const X_monotone_curve_2& /* cv1 */, + const X_monotone_curve_2& /* cv2 */, + X_monotone_curve_2& /* c */) const + { CGAL_error_msg("Merging curves is not supported."); } public: - /*! Constructor. */ - Construct_x_monotone_curve_2 (const Base_traits_2 * _base) : - base (_base) - {} + Merge_2(const Base_traits_2& base) : m_base(base) {} - /*! - * Return an x-monotone curve connecting the two given endpoints. + /*! Merge two given x-monotone curves into a single curve (segment). + * \param[in] cv1 The first curve. + * \param[in] cv2 The second curve. + * \param[out] c The merged curve. + * \pre The two curves are mergeable. + */ + void operator()(const X_monotone_curve_2& cv1, + const X_monotone_curve_2& cv2, + X_monotone_curve_2& c) const + { merge(cv1, cv2, c); } + }; + + /*! Obtain a Merge_2 functor object. */ + Merge_2 merge_2_object() const { return Merge_2(*this); } + + class Construct_x_monotone_curve_2 { + private: + const Base_traits_2& m_base; + + public: + /*! Constructor. */ + Construct_x_monotone_curve_2(const Base_traits_2& base) : m_base(base) {} + + /*! Obtain an x-monotone curve connecting the two given endpoints. * \param p The first point. * \param q The second point. * \pre p and q must not be the same. * \return An x-monotone curve connecting p and q. */ - X_monotone_curve_2 operator() (const Point_2& p, const Point_2& q) const + X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const { Base_x_monotone_curve_2 base_cv = - base->construct_x_monotone_curve_2_object() (p, q); - - return (X_monotone_curve_2 (base_cv, X_monotone_curve_data())); + m_base.construct_x_monotone_curve_2_object()(p, q); + return (X_monotone_curve_2(base_cv, X_monotone_curve_data())); } }; - /*! Get a Construct_x_monotone_curve_2 functor object. */ - Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const - { - return Construct_x_monotone_curve_2 (this); - } - //@} + /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const + { return Construct_x_monotone_curve_2(*this); } + class Construct_opposite_2 { + private: + const Base_traits_2& m_base; + + /*! Generate a helper class template to find out whether the base geometry + * traits has a nested type named Construct_opposite_2. + */ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_construct_opposite_2, + Construct_opposite_2, false) + + /*! Implementation of the predicate in case the base geometry traits class + * has a nested type named Construct_opposite_2. + */ + template + typename boost::enable_if_c::value, + X_monotone_curve_2>::type + construct_opposite(const X_monotone_curve_2& cv) const + { + X_monotone_curve_2 new_cv(m_base.construct_opposite_2_object()(cv), + cv.data()); + return new_cv; + } + + /*! Implementation of the predicate in case the base geometry traits class + * does not have a nested type named Construct_opposite_2. + * This function should never be called! + */ + template + typename boost::enable_if_c::value, + X_monotone_curve_2>::type + construct_opposite(const X_monotone_curve_2& cv) const + { + CGAL_error_msg("Construct opposite curve is not supported!"); + return X_monotone_curve_2(); + } + + public: + /*! Constructor. */ + Construct_opposite_2(const Base_traits_2& base) : m_base(base) {} + + /*! Construct an opposite x-monotone (with swapped source and target). + * \param cv The curve. + * \return The opposite curve. + */ + X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) const + { return construct_opposite(cv); } + }; + + /*! Obtain a Construct_opposite_2 functor object. */ + Construct_opposite_2 construct_opposite_2_object() const + { return Construct_opposite_2(*this); } + //@} }; } //namespace CGAL diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h index 3a863de2b8a..82b40648ecb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h @@ -2441,7 +2441,7 @@ protected: { x = x_left + x_jump*i; disc = app_sqr_rad - CGAL::square(x - app_xcenter); - CGAL_precondition(disc >= 0); + if (disc < 0) disc = 0; if(is_up) y = app_ycenter + std::sqrt(disc); else diff --git a/Arrangement_on_surface_2/include/CGAL/Basic_sweep_line_2.h b/Arrangement_on_surface_2/include/CGAL/Basic_sweep_line_2.h index 113fc21c018..78ba4448ca3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Basic_sweep_line_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Basic_sweep_line_2.h @@ -450,8 +450,7 @@ protected: * \param curve The subcurve to add. * \return (true) if an overlap occured; (false) otherwise. */ - virtual bool _add_curve_to_right(Event* event, Subcurve* curve, - bool overlap_exist = false); + virtual bool _add_curve_to_right(Event* event, Subcurve* curve); /*! Remove a curve from the status line. */ void _remove_curve_from_status_line(Subcurve *leftCurve); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Construction_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Construction_test.h index b3334e9f8f2..b6958af15fa 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Construction_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Construction_test.h @@ -225,9 +225,19 @@ bool Construction_test::are_same_results() << m_num_faces << ")" << std::endl; } - if (m_arr->number_of_vertices() != m_num_vertices) return false; - if (m_arr->number_of_edges() != m_num_edges) return false; - if (m_arr->number_of_faces() != m_num_faces) return false; + if ((m_arr->number_of_vertices() != m_num_vertices) || + (m_arr->number_of_edges() != m_num_edges) || + (m_arr->number_of_faces() != m_num_faces)) { + std::cout << "# vertices, edge, faces obtained: (" + << m_arr->number_of_vertices() << "," + << m_arr->number_of_edges() << "," + << m_arr->number_of_faces() << ")" + << ", expected: (" + << m_num_vertices << "," + << m_num_edges << "," + << m_num_faces << ")" << std::endl; + return false; + } Point_container points_res(m_num_vertices); typename Point_container::iterator pit = points_res.begin(); @@ -239,13 +249,20 @@ bool Construction_test::are_same_results() std::sort(points_res.begin(), pit, pt_compare); if (m_verbose_level > 2) { - std::copy(points_res.begin(), pit, + std::copy(points_res.begin(), points_res.end(), std::ostream_iterator(std::cout, "\n")); } Point_equal point_eq(m_geom_traits); - if (! std::equal(points_res.begin(), pit, m_points.begin(), point_eq)) + if (! std::equal(points_res.begin(), pit, m_points.begin(), point_eq)) { + std::cout << "Expected: " << std::endl; + std::copy(m_points.begin(), m_points.end(), + std::ostream_iterator(std::cout, "\n")); + std::cout << "Obtained: " << std::endl; + std::copy(points_res.begin(), points_res.end(), + std::ostream_iterator(std::cout, "\n")); return false; + } std::vector curves_res(m_arr->number_of_edges()); typename Xcurve_container::iterator xcit = curves_res.begin(); @@ -259,13 +276,23 @@ bool Construction_test::are_same_results() std::sort(curves_res.begin(), xcit, curve_compare); if (m_verbose_level > 2) { - std::copy(curves_res.begin(), xcit, - std::ostream_iterator(std::cout, "\n")); + for (typename Xcurve_container::iterator it = curves_res.begin(); + it != curves_res.end(); ++it) + std::cout << *it << " " << it->data() << std::endl; } Curve_equal curve_eq(m_geom_traits); - if (! std::equal(curves_res.begin(), xcit, m_xcurves.begin(), curve_eq)) + if (! std::equal(curves_res.begin(), xcit, m_xcurves.begin(), curve_eq)) { + std::cout << "Expected: " << std::endl; + for (typename Xcurve_container::iterator it = m_xcurves.begin(); + it != m_xcurves.end(); ++it) + std::cout << *it << " " << it->data() << std::endl; + std::cout << "Obtained: " << std::endl; + for (typename Xcurve_container::iterator it = curves_res.begin(); + it != curves_res.end(); ++it) + std::cout << *it << " " << it->data() << std::endl; return false; + } if (m_arr->number_of_faces() == 1) { Face_const_iterator fit = m_arr->faces_begin(); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/todo b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/TODO similarity index 100% rename from Arrangement_on_surface_2/test/Arrangement_on_surface_2/todo rename to Arrangement_on_surface_2/test/Arrangement_on_surface_2/TODO diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake index a4e1696e28c..3d1c81422e4 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake @@ -686,6 +686,18 @@ function(test_construction_spherical_arcs) compile_and_run_with_flags( test_construction geodesic_arcs_on_sphere "${flags}") endfunction() +#---------------------------------------------------------------------# +# construction with polylines +#---------------------------------------------------------------------# +function(test_construction_polylines) + set(nt ${CGAL_GMPQ_NT}) + set(kernel ${CARTESIAN_KERNEL}) + set(geom_traits ${POLYLINE_GEOM_TRAITS}) + set(flags "-DTEST_NT=${nt} -DTEST_KERNEL=${kernel} -DTEST_GEOM_TRAITS=${geom_traits}") + compile_and_run_with_flags( test_construction polylines "${flags}") +endfunction() + + #---------------------------------------------------------------------# # overlay with segments #---------------------------------------------------------------------# @@ -1358,6 +1370,8 @@ test_algebraic_traits_core() test_algebraic_traits_gmp() test_algebraic_traits_leda() +compile_and_run(test_data_traits) + compile_and_run(test_insertion) compile_and_run(test_unbounded_rational_insertion) compile_and_run(test_unbounded_rational_direct_insertion) @@ -1369,6 +1383,7 @@ compile_and_run(test_vert_ray_shoot_vert_segments) test_construction_segments() test_construction_linear_curves() test_construction_spherical_arcs() +test_construction_polylines() test_overlay_segments() test_overlay_spherical_arcs() diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base index 65b8e559807..bab62c14217 100755 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base @@ -873,6 +873,18 @@ test_construction_spherical_arcs() compile_and_run_with_flags test_construction geodesic_arcs_on_sphere "$flags" } +#---------------------------------------------------------------------# +# construction with polylines +#---------------------------------------------------------------------# +test_construction_polylines() +{ + local nt=$CGAL_GMPQ_NT; + local kernel=$CARTESIAN_KERNEL; + local geom_traits=$POLYLINE_GEOM_TRAITS; + local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; + compile_and_run_with_flags test_construction polylines "$flags" +} + #---------------------------------------------------------------------# # overlay with segments #---------------------------------------------------------------------# @@ -1686,6 +1698,8 @@ test_algebraic_traits_core test_algebraic_traits_gmp test_algebraic_traits_leda +compile_and_run test_data_traits + compile_and_run test_insertion compile_and_run test_unbounded_rational_insertion compile_and_run test_unbounded_rational_direct_insertion @@ -1697,6 +1711,7 @@ compile_and_run test_vert_ray_shoot_vert_segments test_construction_segments test_construction_linear test_construction_spherical_arcs +test_construction_polylines test_overlay_segments test_overlay_spherical_arcs diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/spec.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/spec.txt new file mode 100644 index 00000000000..aff1ae02e48 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/spec.txt @@ -0,0 +1 @@ +test06 covers the case "Overlap with common ancestors" diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test01.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test01.txt new file mode 100644 index 00000000000..1ec5ed13060 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test01.txt @@ -0,0 +1,25 @@ +3 +2 0 0 7 0 +3 3 1 4 0 6 0 +3 1 0 3 2 5 0 +0 + +7 +7 +2 + +0 0 +1 0 +3 1 +4 0 +5 0 +6 0 +7 0 + +2 0 0 1 0 1 +2 1 0 4 0 1 +3 1 0 3 2 5 0 1 +2 3 1 4 0 1 +2 4 0 5 0 2 +2 5 0 6 0 2 +2 6 0 7 0 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test02.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test02.txt new file mode 100644 index 00000000000..da8479558dd --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test02.txt @@ -0,0 +1,27 @@ +3 +2 0 0 7 0 +4 1 0 3 1 4 0 6 0 +3 0 -1 3 2 5 0 + +0 + +7 +8 +3 + +0 -1 +0 0 +1 0 +4 0 +5 0 +6 0 +7 0 + +2 0 -1 1 0 1 +2 0 0 1 0 1 +2 1 0 4 0 1 +3 1 0 3 1 4 0 1 +3 1 0 3 2 5 0 1 +2 4 0 5 0 2 +2 5 0 6 0 2 +2 6 0 7 0 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test03.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test03.txt new file mode 100644 index 00000000000..de59d514e0e --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test03.txt @@ -0,0 +1,19 @@ +3 +4 5 0 4 1 3 1 2 1 +5 5 0 4 1 3 1 2 1 0 0 +3 1 2 3 1 4 1 +0 +6 +5 +1 +0 0 +1 2 +2 1 +3 1 +4 1 +5 0 +2 2 1 0 0 1 +2 1 2 3 1 1 +2 2 1 3 1 2 +2 3 1 4 1 3 +2 4 1 5 0 2 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test04.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test04.txt new file mode 100644 index 00000000000..dc0c3039d79 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test04.txt @@ -0,0 +1,17 @@ +3 +4 1 2 2 1 3 1 4 0 +4 0 0 2 1 3 1 4 0 +2 2 1 3 1 +0 +5 +4 +1 +0 0 +1 2 +2 1 +3 1 +4 0 +2 0 0 2 1 1 +2 1 2 2 1 1 +2 2 1 3 1 3 +2 3 1 4 0 2 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test05.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test05.txt new file mode 100644 index 00000000000..79061951b3e --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test05.txt @@ -0,0 +1,25 @@ +3 +3 0 3 1 2 2 0 +3 0 1 1 2 2 0 +2 0 2 3 0 +0 +8 +8 +2 +0 1 +0 2 +0 3 +3/5 8/5 +1 2 +3/2 1 +2 0 +3 0 + +2 0 1 3/5 8/5 1 +2 0 2 3/5 8/5 1 +2 0 3 1 2 1 +2 3/5 8/5 3/2 1 1 +2 3/5 8/5 1 2 1 +2 1 2 3/2 1 2 +2 3/2 1 2 0 2 +2 3/2 1 3 0 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test06.pdf b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test06.pdf new file mode 100644 index 00000000000..3489398982b Binary files /dev/null and b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test06.pdf differ diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test06.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test06.txt new file mode 100644 index 00000000000..0a74c2b93bb --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test06.txt @@ -0,0 +1,35 @@ +4 +3 0 0 2 3 3 0 +2 0 3 4 0 +3 0 2 2 3 3 0 +3 0 1 2 3 3 0 +0 +11 +13 +4 + +0 0 +0 1 +0 2 +0 3 +4/5 12/5 +8/7 15/7 +4/3 2 +2 3 +8/3 1 +3 0 +4 0 + +2 0 0 4/3 2 1 +2 0 1 8/7 15/7 1 +2 0 2 4/5 12/5 1 +2 0 3 4/5 12/5 1 +2 4/5 12/5 8/7 15/7 1 +2 4/5 12/5 2 3 1 +2 8/7 15/7 4/3 2 1 +2 8/7 15/7 2 3 1 +2 4/3 2 8/3 1 1 +2 4/3 2 2 3 1 +2 2 3 8/3 1 3 +2 8/3 1 3 0 3 +2 8/3 1 4 0 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test07.pdf b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test07.pdf new file mode 100644 index 00000000000..44b03fdbd18 Binary files /dev/null and b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test07.pdf differ diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test07.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test07.txt new file mode 100644 index 00000000000..c0018179a55 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test07.txt @@ -0,0 +1,54 @@ +3 +11 0 1 2 1 3 0 5 0 6 1 8 1 9 0 11 0 12 1 14 1 15 0 +11 0 0 1 1 3 1 4 0 6 0 7 1 9 1 10 0 12 0 13 1 15 1 +12 0 0 1 0 2 1 4 1 5 0 7 0 8 1 10 1 11 0 13 0 14 1 15 1 +0 +18 +26 +10 + +0 0 +0 1 +1 1 +2 1 +3 1 +4 0 +5 0 +6 0 +7 1 +8 1 +9 1 +10 0 +11 0 +12 0 +13 1 +14 1 +15 0 +15 1 + +3 0 0 1 0 2 1 1 +2 0 0 1 1 1 +2 0 1 1 1 1 +2 1 1 2 1 2 +3 2 1 3 0 4 0 1 +2 2 1 3 1 2 +2 3 1 4 0 1 +3 3 1 4 1 5 0 1 +2 4 0 5 0 2 +2 5 0 6 0 2 +3 5 0 6 1 7 1 1 +3 6 0 7 0 8 1 1 +2 6 0 7 1 1 +2 7 1 8 1 2 +3 8 1 9 0 10 0 1 +2 8 1 9 1 2 +2 9 1 10 0 1 +3 9 1 10 1 11 0 1 +2 10 0 11 0 2 +2 11 0 12 0 2 +3 11 0 12 1 13 1 1 +3 12 0 13 0 14 1 1 +2 12 0 13 1 1 +2 13 1 14 1 2 +2 14 1 15 0 1 +2 14 1 15 1 2 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test08.pdf b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test08.pdf new file mode 100644 index 00000000000..422d6ebf9bf Binary files /dev/null and b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test08.pdf differ diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test08.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test08.txt new file mode 100644 index 00000000000..6d7152dc0d4 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test08.txt @@ -0,0 +1,41 @@ +4 +4 0 0 4 1 11 1 15 0 +6 0 0 1 0 5 1 10 1 14 0 15 0 +6 0 0 2 0 6 1 9 1 13 0 15 0 +6 0 0 3 0 7 1 8 1 12 0 15 0 +0 + +12 +17 +7 + +0 0 +1 0 +2 0 +5 1 +6 1 +7 1 +8 1 +9 1 +10 1 +13 0 +14 0 +15 0 + +2 0 0 1 0 3 +3 0 0 4 1 5 1 1 +2 1 0 2 0 2 +2 1 0 5 1 1 +3 2 0 3 0 7 1 1 +2 2 0 6 1 1 +2 5 1 6 1 2 +2 6 1 7 1 3 +2 7 1 8 1 4 +3 8 1 12 0 13 0 1 +2 8 1 9 1 3 +2 9 1 13 0 1 +2 9 1 10 1 2 +2 10 1 14 0 1 +3 10 1 11 1 15 0 1 +2 13 0 14 0 2 +2 14 0 15 0 3 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test09.pdf b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test09.pdf new file mode 100644 index 00000000000..61d89b83b6f Binary files /dev/null and b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test09.pdf differ diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test09.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test09.txt new file mode 100644 index 00000000000..115af13d4e3 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test09.txt @@ -0,0 +1,75 @@ +4 +4 0 4 4 0 13 0 17 4 +4 0 3 5 0 12 0 17 3 +4 0 2 6 0 11 0 17 2 +4 0 1 7 0 10 0 17 1 +0 + +26 +37 +13 + +0 1 +0 2 +0 3 +0 4 +5/2 3/2 +3 1 +7/2 1/2 +15/4 3/4 +35/8 3/8 +5 0 +21/4 1/4 +6 0 +7 0 +10 0 +11 0 +47/4 1/4 +12 0 +101/8 3/8 +53/4 3/4 +27/2 1/2 +14 1 +29/2 3/2 +17 1 +17 2 +17 3 +17 4 + +2 0 1 7/2 1/2 1 +2 0 2 3 1 1 +2 0 3 5/2 3/2 1 +2 0 4 5/2 3/2 1 +2 5/2 3/2 3 1 1 +2 5/2 3/2 15/4 3/4 1 +2 3 1 7/2 1/2 1 +2 3 1 15/4 3/4 1 +3 7/2 1/2 4 0 5 0 1 +2 7/2 1/2 35/8 3/8 1 +2 15/4 3/4 35/8 3/8 1 +2 15/4 3/4 21/4 1/4 1 +2 35/8 3/8 5 0 1 +2 35/8 3/8 21/4 1/4 1 +2 5 0 6 0 2 +2 21/4 1/4 6 0 1 +2 21/4 1/4 7 0 1 +2 6 0 7 0 3 +2 7 0 10 0 4 +2 10 0 11 0 3 +2 10 0 47/4 1/4 1 +2 11 0 12 0 2 +2 11 0 47/4 1/4 1 +2 47/4 1/4 101/8 3/8 1 +2 47/4 1/4 53/4 3/4 1 +3 12 0 13 0 27/2 1/2 1 +2 12 0 101/8 3/8 1 +2 101/8 3/8 27/2 1/2 1 +2 101/8 3/8 53/4 3/4 1 +2 53/4 3/4 14 1 1 +2 53/4 3/4 29/2 3/2 1 +2 27/2 1/2 17 1 1 +2 27/2 1/2 14 1 1 +2 14 1 17 2 1 +2 14 1 29/2 3/2 1 +2 29/2 3/2 17 3 1 +2 29/2 3/2 17 4 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test10.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test10.txt new file mode 100644 index 00000000000..50a3a1aa0dc --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/polylines/test10.txt @@ -0,0 +1,48 @@ +3 +4 0 4 4 0 13 0 17 4 +4 0 3 5 0 12 0 17 3 +4 0 2 6 0 11 0 17 2 +0 + +16 +21 +7 + +0 2 +0 3 +0 4 +5/2 3/2 +3 1 +15/4 3/4 +5 0 +6 0 +11 0 +12 0 +53/4 3/4 +14 1 +29/2 3/2 +17 2 +17 3 +17 4 + +2 0 2 3 1 1 +2 0 3 5/2 3/2 1 +2 0 4 5/2 3/2 1 +2 5/2 3/2 3 1 1 +2 5/2 3/2 15/4 3/4 1 +3 3 1 4 0 5 0 1 +2 3 1 15/4 3/4 1 +2 15/4 3/4 5 0 1 +2 15/4 3/4 6 0 1 +2 5 0 6 0 2 +2 6 0 11 0 3 +2 11 0 12 0 2 +2 11 0 53/4 3/4 1 +3 12 0 13 0 14 1 1 +2 12 0 53/4 3/4 1 +2 53/4 3/4 14 1 1 +2 53/4 3/4 29/2 3/2 1 +2 14 1 17 2 1 +2 14 1 29/2 3/2 1 +2 29/2 3/2 17 3 1 +2 29/2 3/2 17 4 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test48.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test48.txt new file mode 100644 index 00000000000..52ad6c8979a --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test48.txt @@ -0,0 +1,34 @@ +6 +1 3 4 0 +4 0 5 0 +5 0 7 2 +0 0 9 0 +3 0 6 0 +2 0 8 0 + +0 + +10 +9 +1 + +0 0 +1 3 +2 0 +3 0 +4 0 +5 0 +6 0 +7 2 +8 0 +9 0 + +0 0 2 0 1 +1 3 4 0 1 +2 0 3 0 2 +3 0 4 0 3 +4 0 5 0 4 +5 0 6 0 3 +5 0 7 2 1 +6 0 8 0 2 +8 0 9 0 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test49.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test49.txt new file mode 100644 index 00000000000..fcfa42b50b5 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test49.txt @@ -0,0 +1,31 @@ +5 +1 3 4 0 +4 0 5 0 +0 0 9 0 +3 0 6 0 +2 0 8 0 + +0 + +9 +8 +1 + +0 0 +1 3 +2 0 +3 0 +4 0 +5 0 +6 0 +8 0 +9 0 + +0 0 2 0 1 +1 3 4 0 1 +2 0 3 0 2 +3 0 4 0 3 +4 0 5 0 4 +5 0 6 0 3 +6 0 8 0 2 +8 0 9 0 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test50.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test50.txt new file mode 100644 index 00000000000..1114ce12da1 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test50.txt @@ -0,0 +1,34 @@ +6 +1 3 4 0 +4 0 5 0 +0 0 9 0 +3 0 6 0 +7 1 8 0 +2 0 8 0 + +0 + +10 +9 +1 + +0 0 +1 3 +2 0 +3 0 +4 0 +5 0 +6 0 +7 1 +8 0 +9 0 + +0 0 2 0 1 +1 3 4 0 1 +2 0 3 0 2 +3 0 4 0 3 +4 0 5 0 4 +5 0 6 0 3 +6 0 8 0 2 +7 1 8 0 1 +8 0 9 0 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test51.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test51.txt new file mode 100644 index 00000000000..d05b8f0fe0e --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/test_construction/segments/test51.txt @@ -0,0 +1,24 @@ +4 +0 0 4 0 +1 0 3 0 +2 0 5 0 +2 0 3 0 + +0 + +6 +5 +1 + +0 0 +1 0 +2 0 +3 0 +4 0 +5 0 + +0 0 1 0 1 +1 0 2 0 2 +2 0 3 0 4 +3 0 4 0 2 +4 0 5 0 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_construction.polylines.cmd b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_construction.polylines.cmd new file mode 100644 index 00000000000..91908142c6d --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_construction.polylines.cmd @@ -0,0 +1,9 @@ +./data/test_construction/polylines/test01.txt +./data/test_construction/polylines/test02.txt +./data/test_construction/polylines/test03.txt +./data/test_construction/polylines/test04.txt +./data/test_construction/polylines/test05.txt +./data/test_construction/polylines/test06.txt +./data/test_construction/polylines/test07.txt +./data/test_construction/polylines/test08.txt +./data/test_construction/polylines/test09.txt diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_construction.segments.cmd b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_construction.segments.cmd index 4e20bb65871..30d9155bc40 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_construction.segments.cmd +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_construction.segments.cmd @@ -45,3 +45,6 @@ ./data/test_construction/segments/test45.txt ./data/test_construction/segments/test46.txt ./data/test_construction/segments/test47.txt +./data/test_construction/segments/test48.txt +./data/test_construction/segments/test49.txt +./data/test_construction/segments/test50.txt diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_data_traits.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_data_traits.cpp new file mode 100644 index 00000000000..68749b53009 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_data_traits.cpp @@ -0,0 +1,57 @@ +#include +#include +#include + +typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; +typedef Kernel::Point_2 Point_2; +typedef Kernel::Segment_2 Segment_2; +typedef CGAL::Arr_segment_traits_2 Segment_traits_2; +typedef CGAL::Arr_curve_data_traits_2 Traits_2; +typedef Traits_2::X_monotone_curve_2 X_monotone_curve_2; + +int main() +{ + Point_2 p1 = Point_2(0.0, 0.0); + Point_2 p2 = Point_2(1.0, 0.0); + Point_2 p3 = Point_2(2.0, 0.0); + Segment_2 s1 = Segment_2(p1, p2); + Segment_2 s2 = Segment_2(p2, p3); + + Traits_2 traits; + X_monotone_curve_2 c1 = X_monotone_curve_2(s1, 1234); + X_monotone_curve_2 fc1 = traits.construct_opposite_2_object()(c1); + + if (c1.data() != fc1.data()) { + std::cerr << "Construct opposite failed: " + << c1.data() << " != " << fc1.data() << std::endl; + return 1; + } + std::cout << "Construct opposite data: " << c1.data() << std::endl; + + X_monotone_curve_2 c2 = X_monotone_curve_2(s2, 1234); + X_monotone_curve_2 mc; + if (!traits.are_mergeable_2_object()(c1, c2)) return 1; + traits.merge_2_object()(c1, c2, mc); + if (c1.data() != mc.data()) { + std::cerr << "Merge failed: " + << c1.data() << " != " << mc.data() << std::endl; + return 1; + } + std::cout << "Merge data: " << c1.data() << std::endl; + + X_monotone_curve_2 sc1, sc2; + traits.split_2_object()(mc, p2, sc1, sc2); + if (mc.data() != sc1.data()) { + std::cerr << "Split failed (original curve and split curve data differ): " + << mc.data() << " != " << sc1.data() << std::endl; + return 1; + } + if (sc1.data() != sc2.data()) { + std::cerr << "Split failed (data of split curves differ): " + << sc1.data() << " != " << sc2.data() << std::endl; + return 1; + } + std::cout << "Split data: " << sc1.data() << std::endl; + + return 0; +} diff --git a/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h b/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h index 14c605f3e89..2d4f9c7d7f1 100644 --- a/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h +++ b/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h @@ -31,8 +31,7 @@ struct Linear_cell_complex_bgl_min_items \sa `CGAL::Linear_cell_complex_min_item` */ -class Linear_cell_complex_bgl_min_items { -public: +struct Linear_cell_complex_bgl_min_items { /// @} diff --git a/BGL/doc/BGL/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h b/BGL/doc/BGL/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h index 4dc11f0168a..72ba704077c 100644 --- a/BGL/doc/BGL/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h +++ b/BGL/doc/BGL/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h @@ -16,8 +16,7 @@ The class `Linear_cell_complex_for_bgl_combinatorial_map_helper` defines a `CGAL */ template< typename d, typename d2, typename LCCTraits, typename Alloc > -class Linear_cell_complex_for_bgl_combinatorial_map_helper { -public: +struct Linear_cell_complex_for_bgl_combinatorial_map_helper { /// Type of the Linear_cell_complex_for_combinatorial_map. typedef CGAL::Linear_cell_complex_for_combinatorial_map ::%face_descriptor} A face descriptor corresponds to a unique face in an abstract graph instance. +A face descriptor must be `DefaultConstructible`, `Assignable`, `EqualityComparable`, and `Hashable`. +\cgalAssociatedTypeEnd + +\cgalAssociatedTypesEnd + \cgalRefines `HalfedgeGraph` \cgalHasModel `CGAL::Polyhedron_3` \cgalHasModel `CGAL::Surface_mesh` \cgalHasModel `CGAL::Linear_cell_complex_for_combinatorial_map` */ -class FaceGraph {}; +class FaceGraph { + /// Returns a special `boost::graph_traits::face_descriptor` object which + /// does not refer to any face of graph object which type is `FaceGraph`. + static boost::graph_traits::halfedge_descriptor null_face(); +}; /*! \relates FaceGraph returns the face incident to halfedge `h`. @@ -37,9 +49,3 @@ template boost::graph_traits::degree_size_type degree(boost::graph_traits::face_descriptor f, const FaceGraph& g); -/*! \relates FaceGraph -returns a special face that is not equal to any other face. - */ -template -boost::graph_traits::face_descriptor -null_face(const FaceGraph& g); diff --git a/BGL/doc/BGL/Concepts/FaceListGraph.h b/BGL/doc/BGL/Concepts/FaceListGraph.h index 29d2a71f806..d1faca07928 100644 --- a/BGL/doc/BGL/Concepts/FaceListGraph.h +++ b/BGL/doc/BGL/Concepts/FaceListGraph.h @@ -5,6 +5,16 @@ The concept `FaceListGraph` refines the concept `FaceGraph` and adds the requirement for traversal of all faces in a graph. + +\cgalAssociatedTypesBegin + +\cgalAssociatedTypeBegin{boost::graph_traits::%face_iterator} A face iterator (obtained via `faces(g)`) provides access to all of the faces in a graph. +A face iterator type must meet the requirements of `MultiPassInputIterator`. The value type of the +face iterator must be the same as the face descriptor of the graph. +\cgalAssociatedTypeEnd + +\cgalAssociatedTypesEnd + \cgalRefines `FaceGraph` \cgalHasModel `CGAL::Polyhedron_3` \cgalHasModel `CGAL::Surface_mesh` diff --git a/BGL/doc/BGL/Concepts/HalfedgeGraph.h b/BGL/doc/BGL/Concepts/HalfedgeGraph.h index 2bfb1136b88..5a5fdfa2dfe 100644 --- a/BGL/doc/BGL/Concepts/HalfedgeGraph.h +++ b/BGL/doc/BGL/Concepts/HalfedgeGraph.h @@ -16,6 +16,24 @@ the same vertex. We refer to \ref PkgBGLIterators for a description of iterators and circulators for these halfedge cycles. + +\cgalAssociatedTypesBegin + +\cgalAssociatedTypeBegin{boost::graph_traits::%vertex_descriptor} A vertex descriptor corresponds to a unique vertex in an abstract graph instance. +A vertex descriptor must be `DefaultConstructible`, `Assignable`, `EqualityComparable`, and `Hashable`. +\cgalAssociatedTypeEnd + +\cgalAssociatedTypeBegin{boost::graph_traits::%halfedge_descriptor} A halfedge descriptor corresponds to a unique halfedge in an abstract graph instance. +A halfedge descriptor must be `DefaultConstructible`, `Assignable`, `EqualityComparable`, and `Hashable`. +\cgalAssociatedTypeEnd + +\cgalAssociatedTypeBegin{boost::graph_traits::%edge_descriptor} An edge descriptor corresponds to a unique edge in an abstract graph instance. +An edge descriptor must be `DefaultConstructible`, `Assignable`, `EqualityComparable`, and `Hashable`. +\cgalAssociatedTypeEnd + +\cgalAssociatedTypesEnd + + \cgalRefines `IncidenceGraph` \cgalRefines `PropertyGraph` @@ -24,7 +42,11 @@ A model of `HalfedgeGraph` must have the interior property `vertex_point` attach \cgalHasModel `CGAL::Polyhedron_3` \cgalHasModel `CGAL::Surface_mesh` */ -class HalfedgeGraph {}; +class HalfedgeGraph { + /// Returns a special `boost::graph_traits::halfedge_descriptor` object which + /// does not refer to any halfedge of graph object which type is `HalfedgeGraph`. + static boost::graph_traits::halfedge_descriptor null_halfedge(); +}; /*! \relates HalfedgeGraph returns the edge corresponding to halfedges `h` and `opposite(h,g)`. @@ -92,9 +114,3 @@ template boost::graph_traits::halfedge_descriptor prev(boost::graph_traits::halfedge_descriptor h, const HalfedgeGraph& g); -/*! \relates HalfedgeGraph -returns a special halfedge that is not equal to any other halfedge. - */ -template -boost::graph_traits::halfedge_descriptor -null_halfedge(); diff --git a/BGL/doc/BGL/Concepts/HalfedgeListGraph.h b/BGL/doc/BGL/Concepts/HalfedgeListGraph.h index b7e61b02207..3f497093c1d 100644 --- a/BGL/doc/BGL/Concepts/HalfedgeListGraph.h +++ b/BGL/doc/BGL/Concepts/HalfedgeListGraph.h @@ -5,6 +5,17 @@ The concept `HalfedgeListGraph` refines the concept `HalfedgeGraph` and adds the requirements for traversal of all halfedges in the graph. + +\cgalAssociatedTypesBegin + +\cgalAssociatedTypeBegin{boost::graph_traits::%halfedge_iterator} A halfedge iterator (obtained via `halfedges(g)`) provides access to all of the halfedges in a graph. +A halfedge iterator type must meet the requirements of `MultiPassInputIterator`. The value type of the +halfedge iterator must be the same as the halfedge descriptor of the graph. +\cgalAssociatedTypeEnd + +\cgalAssociatedTypesEnd + + \cgalRefines `HalfedgeGraph` \cgalHasModel `CGAL::Polyhedron_3` \cgalHasModel `CGAL::Surface_mesh` diff --git a/BGL/doc/BGL/Doxyfile.in b/BGL/doc/BGL/Doxyfile.in index 55054ac2947..17eea82d118 100644 --- a/BGL/doc/BGL/Doxyfile.in +++ b/BGL/doc/BGL/Doxyfile.in @@ -20,7 +20,7 @@ EXAMPLE_PATH = ${CGAL_Surface_mesh_skeletonization_EXAMPLE_DIR} \ ${CGAL_BGL_EXAMPLE_DIR} ALIASES += "bgllink{1}=\1" -ALIASES += "cgalNamedParamsBegin=
Named Parameters
" + # macros to be used inside the code ALIASES += "cgalNamedParamsBegin=
Named Parameters
" ALIASES += "cgalNamedParamsEnd=
" @@ -36,3 +36,10 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES EXPAND_AS_DEFINED = CGAL_BGL_NP_TEMPLATE_PARAMETERS \ CGAL_BGL_NP_CLASS + + +# macros to be used inside the code +ALIASES += "cgalAssociatedTypesBegin=
Associated Types
" +ALIASES += "cgalAssociatedTypesEnd=
" +ALIASES += "cgalAssociatedTypeBegin{1}=\1" +ALIASES += "cgalAssociatedTypeEnd=" diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index b30cfbffd2c..97f02a51da8 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -54,7 +54,7 @@ include_directories( BEFORE ../../include ) include( CGAL_CreateSingleSourceCGALProgram ) if(OpenMesh_FOUND) -create_single_source_cgal_program( "TriMesh.cpp" ) - target_link_libraries( TriMesh ${OPENMESH_LIBRARIES} ) + create_single_source_cgal_program( "TriMesh.cpp" ) + target_link_libraries( TriMesh PRIVATE ${OPENMESH_LIBRARIES} ) endif() diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 5fab077f346..5c73daedb41 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -69,6 +69,6 @@ create_single_source_cgal_program( "copy_polyhedron.cpp" ) if(OpenMesh_FOUND) - target_link_libraries( copy_polyhedron ${OPENMESH_LIBRARIES} ) + target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} ) endif() diff --git a/BGL/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h b/BGL/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h index f4b995bab29..73c5c3e5d49 100644 --- a/BGL/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h +++ b/BGL/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h @@ -28,6 +28,11 @@ #include #include #include +#include +#include +#include +#include + namespace CGAL{ @@ -65,6 +70,12 @@ struct Shell_vertex_index_visitor {} }; +struct FaceInfo2 +{ + FaceInfo2() : visited(false) {} + bool visited; +}; + //Visitor used to collect polygons template struct Shell_polygons_visitor @@ -90,21 +101,113 @@ struct Shell_polygons_visitor typename Nef_polyhedron::Halffacet_const_handle f = opposite_facet->twin(); - typename Nef_polyhedron::SHalfedge_around_facet_const_circulator - sfc1(f->facet_cycles_begin()); + if (cpp11::next(f->facet_cycles_begin())==f->facet_cycles_end()) + { + // create a new polygon + polygons.push_back( std::vector() ); + fc = f->facet_cycles_begin(); + se = typename Nef_polyhedron::SHalfedge_const_handle(fc); + CGAL_assertion(se!=0); + typename Nef_polyhedron::SHalfedge_around_facet_const_circulator + hc_start(se), hc_end(hc_start); + // insert the vertex indices of the new polygon + CGAL_For_all(hc_start,hc_end) + polygons.back().push_back(vertex_indices[hc_start->source()->center_vertex()]); + if (!is_marked) + std::reverse(polygons.back().begin(), polygons.back().end()); + } + else{ + typedef typename Nef_polyhedron::Kernel Kernel; + typedef Triangulation_2_projection_traits_3 P_traits; + typedef Triangulation_vertex_base_with_info_2 Vb; + typedef Triangulation_face_base_with_info_2 Fbb; + typedef Constrained_triangulation_face_base_2 Fb; + typedef Triangulation_data_structure_2 TDS; + typedef Exact_predicates_tag Itag; + typedef Constrained_Delaunay_triangulation_2 CDT; - // create a new polygon - polygons.push_back( std::vector() ); - fc = f->facet_cycles_begin(); - se = typename Nef_polyhedron::SHalfedge_const_handle(fc); - CGAL_assertion(se!=0); - typename Nef_polyhedron::SHalfedge_around_facet_const_circulator - hc_start(se), hc_end(hc_start); - // insert the vertex indices of the new polygon - CGAL_For_all(hc_start,hc_end) - polygons.back().push_back(vertex_indices[hc_start->source()->center_vertex()]); - if (!is_marked) - std::reverse(polygons.back().begin(), polygons.back().end()); + P_traits p_traits(opposite_facet->plane().orthogonal_vector()); + CDT cdt(p_traits); + + // insert each connected component of the boundary of the face as + // a polygonal constraints + typename Nef_polyhedron::Halffacet_cycle_const_iterator + hfc_start=f->facet_cycles_begin(), hfc_end=f->facet_cycles_end(); + CGAL_For_all(hfc_start, hfc_end) + { + fc=hfc_start; + se = typename Nef_polyhedron::SHalfedge_const_handle(fc); + CGAL_assertion(se!=0); + typename Nef_polyhedron::SHalfedge_around_facet_const_circulator + hc_start(se), hc_end(hc_start); + // collect contour vertices + std::vector< typename CDT::Vertex_handle > polygon; + CGAL_For_all(hc_start,hc_end) + { + typename CDT::Vertex_handle vh=cdt.insert(hc_start->source()->center_vertex()->point()); + vh->info() = vertex_indices[hc_start->source()->center_vertex()]; + polygon.push_back(vh); + } + std::size_t nb_constraints = polygon.size(); + polygon.push_back(polygon.front()); + for(std::size_t i=0; iinfo().visited=true; + std::vector queue; + for (int i=0; i<3; ++i) + queue.push_back(typename CDT::Edge(fh, i) ); + while(true) + { + typename CDT::Edge e = queue.back(); + queue.pop_back(); + e=cdt.mirror_edge(e); + if (e.first->info().visited) continue; + if (cdt.is_constrained(e)) + { + queue.clear(); + queue.push_back(e); + break; + } + else + { + for(int i=1; i<3; ++i) + { + typename CDT::Edge candidate(e.first, (e.second+i)%3); + if (!candidate.first->neighbor(candidate.second)->info().visited) + queue.push_back( candidate ); + } + e.first->info().visited=true; + } + } + // now extract triangles inside the face + while(!queue.empty()) + { + typename CDT::Edge e = queue.back(); + queue.pop_back(); + if (e.first->info().visited) continue; + e.first->info().visited=true; + polygons.resize(polygons.size()+1); + if (is_marked) + for (int i=2; i>=0; --i) + polygons.back().push_back(e.first->vertex(i)->info()); + else + for (int i=0; i<3; ++i) + polygons.back().push_back(e.first->vertex(i)->info()); + + for(int i=1; i<3; ++i) + { + typename CDT::Edge candidate(e.first, (e.second+i)%3); + if (!cdt.is_constrained(candidate) && + !candidate.first->neighbor(candidate.second)->info().visited) + { + queue.push_back( cdt.mirror_edge(candidate) ); + } + } + } + } } void visit(typename Nef_polyhedron::SFace_const_handle) @@ -142,7 +245,8 @@ void collect_polygon_mesh_info( /// \ingroup PkgBGL /// Converts an objet of type `Nef_polyhedron_3` into a polygon mesh model of `MutableFaceGraph`. -/// Note that contrary to `Nef_polyhedron_3::convert_to_polyhedron()`, the output is not triangulated. +/// Note that contrary to `Nef_polyhedron_3::convert_to_polyhedron()`, the output is not triangulated +/// (but faces with more than one connected component of the boundary). /// The polygon mesh can be triangulated using the function `triangulate_faces()`. /// \pre `Polygon_mesh` must have an internal point property map with value type being `Nef_polyhedron_3::Point_3`. /// \pre `nef.simple()` diff --git a/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h b/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h index 7ff616a2f48..4d9386b8fe7 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h @@ -660,7 +660,8 @@ void clear(OpenMesh::PolyMesh_ArrayKernelT& sm) template bool read_off(std::istream& is, OpenMesh::PolyMesh_ArrayKernelT& sm) { - return OpenMesh::IO::read_mesh(sm, is, ".OFF"); + OpenMesh::IO::Options ropt; + return OpenMesh::IO::read_mesh(sm, is, ".OFF", ropt, false); } diff --git a/BGL/include/CGAL/boost/graph/io.h b/BGL/include/CGAL/boost/graph/io.h index 5e6f12fca40..52f2c046a3e 100644 --- a/BGL/include/CGAL/boost/graph/io.h +++ b/BGL/include/CGAL/boost/graph/io.h @@ -89,6 +89,10 @@ bool write_off(const char* fname, return false; } +template +bool write_off(const std::string& fname, + const FaceGraph& g) +{ return write_off(fname.c_str(), g); } namespace internal { namespace read_off_tools { @@ -198,7 +202,11 @@ bool read_off(const char* fname, return false; } - +template +bool read_off(const std::string& fname, + FaceGraph& g) +{ return read_off(fname.c_str(), g); } + template bool write_inp(std::ostream& os, const FaceGraph& g, diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index bb99beeddef..9479d6a3f57 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -51,7 +51,7 @@ include( CGAL_CreateSingleSourceCGALProgram ) if(OpenMesh_FOUND) create_single_source_cgal_program( "graph_concept_OpenMesh.cpp" ) - target_link_libraries( graph_concept_OpenMesh ${OPENMESH_LIBRARIES} ) + target_link_libraries( graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} ) endif() create_single_source_cgal_program( "next.cpp" ) @@ -101,10 +101,10 @@ create_single_source_cgal_program( "test_graph_traits.cpp" ) create_single_source_cgal_program( "test_Properties.cpp" ) if(OpenMesh_FOUND) - target_link_libraries( test_clear ${OPENMESH_LIBRARIES}) - target_link_libraries( test_Euler_operations ${OPENMESH_LIBRARIES}) - target_link_libraries( test_Face_filtered_graph ${OPENMESH_LIBRARIES}) - target_link_libraries( test_graph_traits ${OPENMESH_LIBRARIES} ) - target_link_libraries( test_Properties ${OPENMESH_LIBRARIES}) + target_link_libraries( test_clear PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries( test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries( test_Face_filtered_graph PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries( test_graph_traits PRIVATE ${OPENMESH_LIBRARIES} ) + target_link_libraries( test_Properties PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries( test_bgl_read_write PRIVATE ${OPENMESH_LIBRARIES}) endif() - diff --git a/BGL/test/BGL/test_Prefix.h b/BGL/test/BGL/test_Prefix.h index 444eb1c8c21..3eafc956cd8 100644 --- a/BGL/test/BGL/test_Prefix.h +++ b/BGL/test/BGL/test_Prefix.h @@ -27,6 +27,8 @@ #include #endif +#include + // ATTN: If you change this kernel remember to also hack // properties_PolyMesh_ArrayKernelT.h accordingly typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; @@ -106,18 +108,17 @@ static const char* data[] = "data/rombus.off", "data/tetrahedron.off", "data/triangle.off", "data/triangular_hole.off", "data/cube.off" }; +/* #if defined(CGAL_USE_OPENMESH) bool read_a_mesh(OMesh& s, const std::string& str) { return OpenMesh::IO::read_mesh(s, str); } #endif +*/ -#if defined(CGAL_USE_SURFACE_MESH) -// quick hack to generically read a file -bool read_a_mesh(SM& s, const std::string& str) { - return CGAL::read_off(s, str); -} -#endif +template +bool read_a_mesh(T& m, const std::string& str) +{ return CGAL::read_off(str, m); } bool read_a_mesh(Polyhedron& p, const std::string& str) { std::ifstream in(str.c_str()); @@ -128,17 +129,6 @@ bool read_a_mesh(Polyhedron& p, const std::string& str) { return success; } -bool read_a_mesh(LCC& lcc, const std::string& str) { - std::ifstream in(str.c_str()); - bool success = in.good(); - if(success) - { - CGAL::read_off(in, lcc); - assert(lcc.is_valid()); - } - return success; -} - template std::vector t_data() { diff --git a/BGL/test/BGL/test_bgl_read_write.cpp b/BGL/test/BGL/test_bgl_read_write.cpp index dcf1c257e4b..bbbb1c4dbb7 100644 --- a/BGL/test/BGL/test_bgl_read_write.cpp +++ b/BGL/test/BGL/test_bgl_read_write.cpp @@ -1,5 +1,22 @@ #include + #include +#include + +#include +#include + +#include +#include + +#if defined(CGAL_USE_OPENMESH) + +#include +#include +#include + +#endif + #include #include @@ -7,17 +24,41 @@ typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point; -typedef CGAL::Surface_mesh Mesh; +typedef CGAL::Polyhedron_3 Polyhedron; -int main(int argc, char* argv[]) +typedef CGAL::Surface_mesh SM; + +typedef CGAL::Linear_cell_complex_traits<3, Kernel> MyTraits; +typedef CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper + <2, 3, MyTraits>::type LCC; + +#if defined(CGAL_USE_OPENMESH) + +typedef OpenMesh::PolyMesh_ArrayKernelT OMesh; + +#endif + +template +void test_bgl_read_write(const char* filename) { Mesh sm; - std::ifstream in((argc>1)?argv[1]:"data/prim.off"); - + std::ifstream in(filename); CGAL::read_off(in,sm); - CGAL::write_off(std::cout, sm); - - return 0; +} + +int main(int argc, char** argv) +{ + const char* filename=(argc>1)?argv[1]:"data/prim.off"; + + test_bgl_read_write(filename); + test_bgl_read_write(filename); + test_bgl_read_write(filename); + +#ifdef CGAL_USE_OPENMESH + test_bgl_read_write(filename); +#endif + + return EXIT_SUCCESS; } diff --git a/BGL/test/BGL/test_clear.cpp b/BGL/test/BGL/test_clear.cpp index bf0840c5da7..eb733d748d4 100644 --- a/BGL/test/BGL/test_clear.cpp +++ b/BGL/test/BGL/test_clear.cpp @@ -6,7 +6,7 @@ template void test() { const std::string fname = "data/7_faces_triangle.off"; Mesh m; - if(!read_a_mesh(m, fname)) { + if(!CGAL::read_off(fname, m)) { std::cout << "Error reading file: " << fname << std::endl; } diff --git a/Boolean_set_operations_2/Boolean_set_operations.dxy b/Boolean_set_operations_2/Boolean_set_operations.dxy deleted file mode 100644 index 705df357d38..00000000000 --- a/Boolean_set_operations_2/Boolean_set_operations.dxy +++ /dev/null @@ -1,1218 +0,0 @@ -# Doxyfile 1.4.2 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Boolean_set_operations_2 - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. - -SHOW_DIRECTORIES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the progam writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = include/CGAL examples/Boolean_set_operations_2 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = examples/Boolean_set_operations_2 - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = YES - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_2.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_2.h index f378d22d560..edd58cacab9 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_2.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_2.h @@ -26,8 +26,7 @@ number-type are `MP_Float`, `CORE::Expr`, and `Gmpq`.) */ template< typename K, typename ET > -class Approximate_min_ellipsoid_d_traits_2 { -public: +struct Approximate_min_ellipsoid_d_traits_2 { /// \name Types /// @{ diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_3.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_3.h index dde7b827bb8..dd398e46456 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_3.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_3.h @@ -27,8 +27,7 @@ number-type are `MP_Float`, `CORE::Expr`, and `Gmpq`.) */ template< typename K, typename ET > -class Approximate_min_ellipsoid_d_traits_3 { -public: +struct Approximate_min_ellipsoid_d_traits_3 { /// \name Types /// @{ diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_d.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_d.h index 44ceb5ce083..b7bdcbe586e 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_d.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d_traits_d.h @@ -26,8 +26,7 @@ number-type are `MP_Float`, `CORE::Expr`, and `Gmpq`.) */ template< typename K, typename ET > -class Approximate_min_ellipsoid_d_traits_d { -public: +struct Approximate_min_ellipsoid_d_traits_d { /// \name Types /// @{ diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_quadrilateral_traits_2.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_quadrilateral_traits_2.h index 5aba7ca0424..6562281723e 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_quadrilateral_traits_2.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_quadrilateral_traits_2.h @@ -18,8 +18,7 @@ functions `min_rectangle_2`, `min_parallelogram_2` and */ template< typename K > -class Min_quadrilateral_default_traits_2 { -public: +struct Min_quadrilateral_default_traits_2 { /// \name Types /// @{ diff --git a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_traits_d.h b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_traits_d.h index 309fcc24d36..54f79ee07fe 100644 --- a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_traits_d.h +++ b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_traits_d.h @@ -33,8 +33,7 @@ const-pointer `const B*`, where `B` is a model of the */ template< typename BoxHandle > -class Box_traits_d { -public: +struct Box_traits_d { /// \name Creation /// @{ diff --git a/CGALConfig.cmake b/CGALConfig.cmake new file mode 100644 index 00000000000..819331d263c --- /dev/null +++ b/CGALConfig.cmake @@ -0,0 +1,6 @@ +# +# This file points to the CGALConfig.cmake for a pure header-only +# CGAL installation. +# + +include(${CMAKE_CURRENT_LIST_DIR}/Installation/lib/cmake/CGAL/CGALConfig.cmake) diff --git a/CGAL_Core/include/CGAL/CORE/ExprRep.h b/CGAL_Core/include/CGAL/CORE/ExprRep.h index 3517709f5d0..c74c4fd7374 100644 --- a/CGAL_Core/include/CGAL/CORE/ExprRep.h +++ b/CGAL_Core/include/CGAL/CORE/ExprRep.h @@ -160,12 +160,12 @@ struct NodeInfo { // Members: private: int refCount, // public: NodeInfo* nodeInfo, // filteredFp ffVal. -class ExprRep { +class CGAL_CORE_EXPORT ExprRep { public: /// \name Constructor and Destructor //@{ /// default constructor - CGAL_CORE_EXPORT ExprRep(); + ExprRep(); /// virtual destructor for this base class virtual ~ExprRep() { if (nodeInfo != NULL) // This check is only for optimization. @@ -197,8 +197,8 @@ public: /// \name Helper Functions //@{ /// Get the approximate value - CGAL_CORE_EXPORT const Real & getAppValue(const extLong& relPrec = get_static_defRelPrec(), - const extLong& absPrec = get_static_defAbsPrec()); + const Real & getAppValue(const extLong& relPrec = get_static_defRelPrec(), + const extLong& absPrec = get_static_defAbsPrec()); /// Get the sign. int getSign(); int getExactSign(); @@ -433,23 +433,23 @@ public: /// compute the sign, uMSB, lMSB, etc. virtual void computeExactFlags() = 0; /// compute the minimal root bound - CGAL_CORE_EXPORT extLong computeBound(); + extLong computeBound(); /// driver function to approximate - CGAL_CORE_EXPORT void approx(const extLong& relPrec, const extLong& absPrec); + void approx(const extLong& relPrec, const extLong& absPrec); /// compute an approximate value satifying the specified precisions virtual void computeApproxValue(const extLong&, const extLong&) = 0; /// Test whether the current approx. value satisfies [relPrec, absPrec] - CGAL_CORE_EXPORT bool withinKnownPrecision(const extLong&, const extLong&); + bool withinKnownPrecision(const extLong&, const extLong&); //@} /// \name Misc Functions //@{ /// reduce current node - CGAL_CORE_EXPORT void reduceToBigRat(const BigRat&); + void reduceToBigRat(const BigRat&); /// reduce current node - CGAL_CORE_EXPORT void reduceTo(const ExprRep*); + void reduceTo(const ExprRep*); /// reduce current node to zero - CGAL_CORE_EXPORT void reduceToZero(); + void reduceToZero(); /// return operator string virtual const std::string op() const { return "UNKNOWN"; @@ -459,7 +459,7 @@ public: /// \name Degree Bound Functions //@{ /// compute "d_e" based on # of sqrts - CGAL_CORE_EXPORT extLong degreeBound(); + extLong degreeBound(); /// count actually computes the degree bound of current node. virtual extLong count() = 0; /// reset the flag "visited" @@ -473,7 +473,7 @@ public: /// \class ConstRep /// \brief constant node -class ConstRep : public ExprRep { +class CGAL_CORE_EXPORT ConstRep : public ExprRep { public: /// \name Constructors and Destructor //@{ @@ -486,20 +486,20 @@ public: /// \name Debug Functions //@{ /// print debug information in list mode - CGAL_CORE_EXPORT void debugList(int level, int depthLimit) const; + void debugList(int level, int depthLimit) const; /// print debug information in tree mode - CGAL_CORE_EXPORT void debugTree(int level, int indent, int depthLimit) const; + void debugTree(int level, int indent, int depthLimit) const; //@} protected: /// initialize nodeInfo - CGAL_CORE_EXPORT virtual void initNodeInfo(); + virtual void initNodeInfo(); /// return operator in string const std::string op() const { return "C"; } /// count returns the degree of current node //extLong count() { return d_e(); } - CGAL_CORE_EXPORT extLong count(); + extLong count(); /// clear visited flag void clearFlag() { visited() = false; diff --git a/CGAL_Core/src/CGAL_Core/CMakeLists.txt b/CGAL_Core/src/CGAL_Core/CMakeLists.txt index 3f4adc37b31..0ce25c586ca 100644 --- a/CGAL_Core/src/CGAL_Core/CMakeLists.txt +++ b/CGAL_Core/src/CGAL_Core/CMakeLists.txt @@ -1,33 +1,18 @@ +include(CGAL_SetupCGAL_CoreDependencies) + message("Configuring libCGAL_Core") +if(CGAL_Core_FOUND) -use_essential_libs() + collect_cgal_library(CGAL_Core "") -if (NOT MSVC) - # See the release notes of CGAL-4.10: CGAL_Core now requires - # Boost.Thread, with all compilers but MSVC. - find_package( Boost 1.48 REQUIRED thread system ) - cache_set(CGAL_Core_3RD_PARTY_LIBRARIES ${CGAL_Core_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES} ) -endif(NOT MSVC) + if(CGAL_HEADER_ONLY) + set(keyword INTERFACE) + else() + set(keyword PUBLIC) + endif() -include_directories (SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS}) + CGAL_setup_CGAL_Core_dependencies(CGAL_Core ${keyword}) -add_definitions(${CGAL_3RD_PARTY_DEFINITIONS}) - -link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) - -collect_cgal_library(CGAL_Core "") - -if(NOT CGAL_HEADER_ONLY) - # CGAL_Core does not depend on CGAL in either DEBUG or RELEASE, but we - # still link it. - target_link_libraries( CGAL_Core CGAL ${CGAL_3RD_PARTY_LIBRARIES} ) - target_link_libraries( CGAL_Core ${CGAL_Core_3RD_PARTY_LIBRARIES} ) - - add_dependencies( CGAL_Core CGAL ) -else() - target_link_libraries( CGAL_Core INTERFACE ${CGAL_3RD_PARTY_LIBRARIES} ) - target_link_libraries( CGAL_Core INTERFACE ${CGAL_Core_3RD_PARTY_LIBRARIES} ) + message("libCGAL_Core is configured") endif() -message("libCGAL_Core is configured") - diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt b/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt index 87ec974ca81..f9c2a7eeac9 100644 --- a/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt +++ b/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt @@ -1,52 +1,22 @@ message("Configuring libCGAL_ImageIO") -find_package( ZLIB ) - -if(ZLIB_FOUND) - get_dependency_version(ZLIB) - cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} ) - cache_set(CGAL_ImageIO_3RD_PARTY_LIBRARIES ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} ${ZLIB_LIBRARY} ) - cache_set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS "-DCGAL_USE_ZLIB") - cache_set(CGAL_ImageIO_USE_ZLIB "ON") -endif(ZLIB_FOUND) - -set( CGAL_ImageIO_BASENAME CGAL_ImageIO) - -if(COMMAND add_config_flag) - set( CGAL_HAS_IMAGEIO TRUE ) - add_config_flag( CGAL_HAS_IMAGEIO ) -endif() - -use_essential_libs() - -if (CGAL_HEADER_ONLY) - cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}) -else() - include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ) - link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) - add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} ) -endif() - collect_cgal_library( CGAL_ImageIO "") -if (NOT CGAL_HEADER_ONLY) +include(CGAL_SetupCGAL_ImageIODependencies) - add_dependencies( CGAL_ImageIO CGAL ) +if(CGAL_HEADER_ONLY) + set(keyword "INTERFACE") +endif() - # CGAL_ImageIO only depends on CGAL in DEBUG, but we still link it - # in both build types. - target_link_libraries( CGAL_ImageIO CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} ) +CGAL_setup_CGAL_ImageIO_dependencies(CGAL_ImageIO ${keyword}) -else() - - target_link_libraries( CGAL_ImageIO INTERFACE ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} ) - target_include_directories( CGAL_ImageIO INTERFACE ${CGAL_3RD_PARTY_LIBRARIES_DIRS}) +if(COMMAND add_config_flag) + set( CGAL_HAS_IMAGEIO TRUE ) + add_config_flag( CGAL_HAS_IMAGEIO ) +endif() +if(ZLIB_FOUND) + get_dependency_version(ZLIB) endif() message("libCGAL_ImageIO is configured") - -if(NOT ZLIB_FOUND) - message( STATUS "NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.") -endif() - diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index d737ffa2aff..26a9442a90e 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -125,22 +125,28 @@ if ( CGAL_FOUND ) message(STATUS "Set Ipelets install dir: ${IPELET_INSTALL_DIR}") endif() + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + foreach(IPELET ${CGAL_IPELETS}) add_library(CGAL_${IPELET} MODULE ${IPELET}.cpp) add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_${IPELET}) - target_link_libraries(CGAL_${IPELET} ${IPE_LIBRARIES}) + target_link_libraries(CGAL_${IPELET} PRIVATE CGAL::CGAL ${IPE_LIBRARIES}) if ( IPELET_INSTALL_DIR ) install(TARGETS CGAL_${IPELET} DESTINATION ${IPELET_INSTALL_DIR}) if (WITH_IPE_7) install(FILES ./lua/libCGAL_${IPELET}.lua DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7 endif() endif () + cgal_add_compilation_test(CGAL_${IPELET}) endforeach(IPELET) + target_link_libraries(CGAL_cone_spanners PRIVATE CGAL::CGAL_Core) #example in doc not installed add_library(simple_triangulation MODULE simple_triangulation.cpp) add_to_cached_list(CGAL_EXECUTABLE_TARGETS simple_triangulation) target_link_libraries(simple_triangulation ${IPE_LIBRARIES}) + cgal_add_compilation_test(simple_triangulation) + else() message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.") endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c702f30227..88cfc9acacc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ cmake_minimum_required(VERSION 2.8.11) set( CGAL_BRANCH_BUILD ON CACHE INTERNAL "Create CGAL from a Git branch" FORCE) include(${CMAKE_SOURCE_DIR}/Installation/cmake/modules/CGAL_SCM.cmake) +CGAL_detect_git(${CMAKE_SOURCE_DIR}) # add option for duplicate file detection option( CGAL_REPORT_DUPLICATE_FILES "Switch on to start (naive) detection of duplicate source- and headerfiles in packages" OFF) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 5745cfe943e..ca50ab26f86 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -1803,10 +1803,21 @@ namespace CartesianKernelFunctors { result_type operator()(const Triangle_2& t) const { + Bbox_2 bb = this->operator()(t.vertex(0)); + bb += this->operator()(t.vertex(1)); + bb += this->operator()(t.vertex(2)); + return bb; + /* + Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629.0 for x64 + produces a segfault of this functor for Simple_cartesian> + with the original version of the code below + Note that it also worked for 18.00.21005.1 + typename K::Construct_bbox_2 construct_bbox_2; return construct_bbox_2(t.vertex(0)) + construct_bbox_2(t.vertex(1)) + construct_bbox_2(t.vertex(2)); + */ } result_type diff --git a/Circular_kernel_2/doc/Circular_kernel_2/CGAL/Algebraic_kernel_for_circles_2_2.h b/Circular_kernel_2/doc/Circular_kernel_2/CGAL/Algebraic_kernel_for_circles_2_2.h index fb8e4849343..7ec35c6d4ac 100644 --- a/Circular_kernel_2/doc/Circular_kernel_2/CGAL/Algebraic_kernel_for_circles_2_2.h +++ b/Circular_kernel_2/doc/Circular_kernel_2/CGAL/Algebraic_kernel_for_circles_2_2.h @@ -8,8 +8,7 @@ namespace CGAL { */ template< typename RT > -class Algebraic_kernel_for_circles_2_2 { -public: +struct Algebraic_kernel_for_circles_2_2 { /// @} diff --git a/Circular_kernel_2/doc/Circular_kernel_2/CGAL/Circular_kernel_2.h b/Circular_kernel_2/doc/Circular_kernel_2/CGAL/Circular_kernel_2.h index 7346da54455..a1947f123dc 100644 --- a/Circular_kernel_2/doc/Circular_kernel_2/CGAL/Circular_kernel_2.h +++ b/Circular_kernel_2/doc/Circular_kernel_2/CGAL/Circular_kernel_2.h @@ -24,8 +24,7 @@ manipulation of algebraic curves. */ template< typename Kernel, typename AlgebraicKernelForCircles > -class Circular_kernel_2 : public Kernel { -public: +struct Circular_kernel_2 : public Kernel { /// \name Types /// The circular kernel uses basic number types of the algebraic diff --git a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt index 6614a2fe820..1e974c06be3 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt @@ -11,10 +11,9 @@ include(${CGAL_USE_FILE}) find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL) -find_package(OpenGL) find_package(QGLViewer) -if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND ) +if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND QGLVIEWER_FOUND ) include_directories (${QGLVIEWER_INCLUDE_DIR}) @@ -22,16 +21,20 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_ add_executable (Circular_kernel_3 Circular_kernel_3.cpp Viewer.cpp ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) - qt5_use_modules( Circular_kernel_3 Xml Script OpenGL) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Circular_kernel_3 ) - target_link_libraries( Circular_kernel_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) - target_link_libraries( Circular_kernel_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ) - target_link_libraries( Circular_kernel_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + target_link_libraries( Circular_kernel_3 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 + Qt5::OpenGL Qt5::Gui ${QGLVIEWER_LIBRARIES} ) + + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Circular_kernel_3) + + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Circular_kernel_3) else() - message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt5, and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, and Qt5, and will not be compiled.") endif() diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp index 0036038b6de..1b252a05eb1 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp +++ b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp @@ -860,10 +860,10 @@ void Viewer::init() compile_shaders(); compute_elements(); initialize_buffers(); - ::glEnable(GL_BLEND); + glEnable(GL_BLEND); - ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); - ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_POINT_SMOOTH); glEnable(GL_LINE_SMOOTH); diff --git a/Circular_kernel_3/doc/Circular_kernel_3/CGAL/Algebraic_kernel_for_spheres_2_3.h b/Circular_kernel_3/doc/Circular_kernel_3/CGAL/Algebraic_kernel_for_spheres_2_3.h index d60e65986e3..6867ba05ee6 100644 --- a/Circular_kernel_3/doc/Circular_kernel_3/CGAL/Algebraic_kernel_for_spheres_2_3.h +++ b/Circular_kernel_3/doc/Circular_kernel_3/CGAL/Algebraic_kernel_for_spheres_2_3.h @@ -8,8 +8,7 @@ namespace CGAL { */ template< typename RT > -class Algebraic_kernel_for_spheres_2_3 { -public: +struct Algebraic_kernel_for_spheres_2_3 { /// @} diff --git a/Circular_kernel_3/doc/Circular_kernel_3/CGAL/Spherical_kernel_3.h b/Circular_kernel_3/doc/Circular_kernel_3/CGAL/Spherical_kernel_3.h index 24bc8de658f..21d92e1a274 100644 --- a/Circular_kernel_3/doc/Circular_kernel_3/CGAL/Spherical_kernel_3.h +++ b/Circular_kernel_3/doc/Circular_kernel_3/CGAL/Spherical_kernel_3.h @@ -24,8 +24,7 @@ manipulation of algebraic curves. */ template< typename Kernel, typename AlgebraicKernelForSpheres > -class Spherical_kernel_3 : public Kernel { -public: +struct Spherical_kernel_3 : public Kernel { /// \name Types /// The spherical kernel uses basic number types of the algebraic diff --git a/Circulator/doc/Circulator/CGAL/circulator.h b/Circulator/doc/Circulator/CGAL/circulator.h index d70a078483d..d081d150af8 100644 --- a/Circulator/doc/Circulator/CGAL/circulator.h +++ b/Circulator/doc/Circulator/CGAL/circulator.h @@ -340,8 +340,7 @@ void bar( IC i, IC j) { // calls the correct function */ template< typename C > -class Circulator_traits { -public: +struct Circulator_traits { /// \name Types /// @{ diff --git a/Classification/dont_submit b/Classification/dont_submit deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 58170a221f0..80a80c42062 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -32,11 +32,6 @@ if ( NOT Boost_FOUND ) endif() find_package( TBB ) -if( TBB_FOUND ) - include(${TBB_USE_FILE}) - list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES}) -endif() - find_package(OpenCV QUIET) @@ -54,13 +49,16 @@ include( CGAL_CreateSingleSourceCGALProgram ) set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates) create_single_source_cgal_program( "example_classification.cpp" CXX_FEATURES ${needed_cxx_features} ) +if(TBB_FOUND) + CGAL_target_use_TBB(example_classification) +endif() create_single_source_cgal_program( "example_generation_and_training.cpp" CXX_FEATURES ${needed_cxx_features} ) create_single_source_cgal_program( "example_feature.cpp" CXX_FEATURES ${needed_cxx_features} ) if( OpenCV_FOUND ) include_directories( ${OpenCV_INCLUDE_DIRS} ) create_single_source_cgal_program( "example_random_forest.cpp" CXX_FEATURES ${needed_cxx_features} ) - target_link_libraries( example_random_forest ${OpenCV_LIBS} ) + target_link_libraries( example_random_forest PRIVATE ${OpenCV_LIBS} ) else() message(STATUS "OpenCV not found, random forest example won't be compiled.") endif() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index 7d085c187a2..30b903bf36c 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -38,10 +38,6 @@ if ( NOT Boost_FOUND ) endif() find_package( TBB ) -if( TBB_FOUND ) - include(${TBB_USE_FILE}) - list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES}) -endif() # include for local directory include_directories( BEFORE include ) @@ -60,3 +56,6 @@ include( CGAL_CreateSingleSourceCGALProgram ) set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates) create_single_source_cgal_program( "test_classification_point_set.cpp" CXX_FEATURES ${needed_cxx_features} ) +if(TBB_FOUND) + CGAL_target_use_TBB( test_classification_point_set ) +endif() diff --git a/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_min_items.h b/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_min_items.h index bf501bdf07d..f00a5ee1d9d 100644 --- a/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_min_items.h +++ b/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_min_items.h @@ -31,8 +31,7 @@ struct Combinatorial_map_min_items */ template< unsigned int d > -class Combinatorial_map_min_items { -public: +struct Combinatorial_map_min_items { /// @} diff --git a/Combinatorial_map/doc/Combinatorial_map/CGAL/Dart.h b/Combinatorial_map/doc/Combinatorial_map/CGAL/Dart.h index 9e675c84eda..fb4b0707372 100644 --- a/Combinatorial_map/doc/Combinatorial_map/CGAL/Dart.h +++ b/Combinatorial_map/doc/Combinatorial_map/CGAL/Dart.h @@ -10,8 +10,7 @@ The class `Dart` represents a dD dart in a combinatorial map. */ template< typename d, typename CMap > -class Dart { -public: +struct Dart { /*! */ diff --git a/Combinatorial_map/doc/Combinatorial_map/CGAL/Generic_map_min_items.h b/Combinatorial_map/doc/Combinatorial_map/CGAL/Generic_map_min_items.h index 3ec0aa8e08d..d9a2a20e953 100644 --- a/Combinatorial_map/doc/Combinatorial_map/CGAL/Generic_map_min_items.h +++ b/Combinatorial_map/doc/Combinatorial_map/CGAL/Generic_map_min_items.h @@ -25,8 +25,7 @@ struct Generic_map_min_items \sa `Generalized_map` */ -class Generic_map_min_items { -public: +struct Generic_map_min_items { /// @} diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h index bdfa9099d32..bf44a965fa8 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h @@ -713,18 +713,18 @@ namespace CGAL typename CMap::Dart_handle d1, d2; typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle; - typename CMap::size_type mark = amap.get_new_mark(); + typename CMap::size_type amark = amap.get_new_mark(); // First we store and mark all the darts of the 1-cell to contract. std::deque to_erase; - for ( CGAL::CMap_dart_iterator_basic_of_cell it(amap,adart,mark); + for ( CGAL::CMap_dart_iterator_basic_of_cell it(amap,adart,amark); it.cont(); ++it ) { to_erase.push_back(it); if ( dg1==amap.null_handle && !amap.template is_free<0>(it) && !amap.template is_free<1>(it) ) { dg1=amap.template beta<0>(it); dg2=amap.template beta<1>(it); } - amap.mark(it, mark); + amap.mark(it, amark); ++res; } @@ -757,7 +757,8 @@ namespace CGAL if ( (*it)->beta(0)!=(*it)->beta(1) )*/ if ( amap.are_attributes_automatically_managed() && update_attributes ) { - modified_darts.push_back(amap.template beta<1>(*it)); + if (!amap.is_marked(amap.template beta<1>(*it), amark)) + { modified_darts.push_back(amap.template beta<1>(*it)); } } amap.basic_link_beta_1(amap.template beta<0>(*it), amap.template beta<1>(*it)); @@ -767,7 +768,8 @@ namespace CGAL { if ( amap.are_attributes_automatically_managed() && update_attributes ) { - modified_darts2.push_back(amap.template beta<0>(*it)); + if (!amap.is_marked(amap.template beta<0>(*it), amark)) + { modified_darts2.push_back(amap.template beta<0>(*it)); } } amap.template dart_unlink_beta<1>(amap.template beta<0>(*it)); } @@ -778,7 +780,8 @@ namespace CGAL { if ( amap.are_attributes_automatically_managed() && update_attributes ) { - modified_darts.push_back(amap.template beta<1>(*it)); + if (!amap.is_marked(amap.template beta<1>(*it), amark)) + { modified_darts.push_back(amap.template beta<1>(*it)); } } amap.template dart_unlink_beta<0>(amap.template beta<1>(*it)); } @@ -789,8 +792,8 @@ namespace CGAL for ( it=to_erase.begin(); it!=to_erase.end(); ++it ) { amap.erase_dart(*it); } - CGAL_assertion( amap.is_whole_map_unmarked(mark) ); - amap.free_mark(mark); + CGAL_assertion( amap.is_whole_map_unmarked(amark) ); + amap.free_mark(amark); if ( amap.are_attributes_automatically_managed() && update_attributes ) { diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h b/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h index b22e0f51f88..a80fd758301 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -40,6 +41,8 @@ namespace CGAL { + typedef Exact_predicates_inexact_constructions_kernel::Point_2 RPoint_2; + typedef Exact_predicates_exact_constructions_kernel::Point_2 EPoint_2; typedef Exact_predicates_inexact_constructions_kernel::Point_3 RPoint_3; typedef Exact_predicates_exact_constructions_kernel::Point_3 EPoint_3; @@ -126,6 +129,20 @@ namespace CGAL { const std::string& val) {node.add("v",val);} inline + void write_cmap_attribute_node(boost::property_tree::ptree & node, + const RPoint_2& val) + { + node.add("p.x",val.x()); + node.add("p.y",val.y()); + } + inline + void write_cmap_attribute_node(boost::property_tree::ptree & node, + const EPoint_2& val) + { + node.add("p.x",CGAL::to_double(val.x())); + node.add("p.y",CGAL::to_double(val.y())); + } + inline void write_cmap_attribute_node(boost::property_tree::ptree & node, const RPoint_3& val) { @@ -167,7 +184,7 @@ namespace CGAL { boost::property_tree::ptree& ndim = ptree.add("dimension", ""); ndim.put(".index", i); ndim.add("type", typeid(typename CMap::template Attribute_type::type::Info).name()); - ndim.add("type_point", typeid(RPoint_3).name()); + ndim.add("type_point", typeid(typename CMap::Point).name()); // for every attribute of the dimension for (; it_attrib!=itend_attrib; ++it_attrib) @@ -202,7 +219,7 @@ namespace CGAL { boost::property_tree::ptree& ndim = ptree.add("dimension", ""); ndim.put(".index", i); ndim.add("type", "void"); - ndim.add("type_point", typeid(RPoint_3).name()); + ndim.add("type_point", typeid(typename CMap::Point).name()); // for every attribute of the dimension for (; it_attrib!=itend_attrib; ++it_attrib) @@ -355,13 +372,26 @@ namespace CGAL { return pt; } - template < class CMap > - bool save_combinatorial_map(const CMap& amap, std::ostream & output) + struct EmptyFunctor + { + void operator() (boost::property_tree::ptree & /*node*/) const + { + // node.add("myinfo.myvalie",15); + } + }; + + template < class CMap, class Functor > + bool save_combinatorial_map(const CMap& amap, std::ostream & output, + const Functor& f) { using boost::property_tree::ptree; ptree tree; tree.put("data", ""); + /** First we save general information of the map (by default nothing, + the fuction can be specialized by users). */ + f(tree); + // map dart => number std::map myDarts; @@ -379,14 +409,29 @@ namespace CGAL { return true; } - template < class CMap > - bool save_combinatorial_map(const CMap& amap, const char* filename) + template < class CMap, class Functor > + bool save_combinatorial_map(const CMap& amap, const char* filename, + const Functor& f) { std::ofstream output(filename); if (!output) return false; - return save_combinatorial_map(amap, output); + return save_combinatorial_map(amap, output, f); } + template < class CMap > + bool save_combinatorial_map(const CMap& amap, std::ostream & output) + { + EmptyFunctor f; + return save_combinatorial_map(amap, output, f); + } + + template < class CMap > + bool save_combinatorial_map(const CMap& amap, const char* filename) + { + EmptyFunctor f; + return save_combinatorial_map(amap, filename, f); + } + // Here T is a Dart_handle so no need of & template void read_cmap_dart_node @@ -450,6 +495,14 @@ namespace CGAL { {val=boost::lexical_cast< std::string >(v.second.data());} template<> inline void read_cmap_attribute_node + (const boost::property_tree::ptree::value_type &v,RPoint_2 &val) + { + double x=v.second.get("x"); + double y=v.second.get("y"); + val = RPoint_2(x,y); + } + template<> inline + void read_cmap_attribute_node (const boost::property_tree::ptree::value_type &v,RPoint_3 &val) { double x=v.second.get("x"); @@ -771,26 +824,47 @@ namespace CGAL { >::run(pt, amap, myDarts); } - template < class CMap > - bool load_combinatorial_map(std::ifstream & input, CMap& amap) + template < class CMap, class Functor > + bool load_combinatorial_map(std::ifstream & input, CMap& amap, + Functor& f) { using boost::property_tree::ptree; ptree pt; read_xml(input, pt); + + /** First we load general information of the map (by default nothing, + the fuction can be specialized by users). */ + f(pt); + + // Then we load darts and attributes. std::vector myDarts; cmap_load_darts(pt,amap,myDarts); cmap_load_attributes(pt,amap,myDarts); return true; } - template < class CMap > - bool load_combinatorial_map(const char* filename, CMap& amap) + template < class CMap, class Functor > + bool load_combinatorial_map(const char* filename, CMap& amap, + Functor& f) { std::ifstream input(filename); if (!input) return false; - return load_combinatorial_map(input, amap); + return load_combinatorial_map(input, amap, f); } + template < class CMap > + bool load_combinatorial_map(std::ifstream & input, CMap& amap) + { + EmptyFunctor f; + return load_combinatorial_map(input, amap, f); + } + + template < class CMap > + bool load_combinatorial_map(const char* filename, CMap& amap) + { + EmptyFunctor f; + return load_combinatorial_map(filename, amap, f); + } } // namespace CGAL #endif // CGAL_COMBINATORIAL_MAP_SAVE_LOAD_H // diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index fffb194d7b9..4c186cfc2c3 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -347,7 +347,7 @@ namespace CGAL { // Get the dart of the i-cell attribute associated with the given dart template - Dart_handle & dart(Dart_handle adart) + Dart_handle dart(Dart_handle adart) { CGAL_assertion( adart!=NULL ); CGAL_assertion( attribute(adart)!=NULL ); diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index b7e26cfcf2b..c87ed7a4d4b 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -69,6 +69,6 @@ if(OpenMesh_FOUND) create_single_source_cgal_program( "quickhull_OM_3.cpp" ) create_single_source_cgal_program( "dynamic_hull_OM_3.cpp" ) - target_link_libraries( quickhull_OM_3 ${OPENMESH_LIBRARIES} ) - target_link_libraries( dynamic_hull_OM_3 ${OPENMESH_LIBRARIES} ) + target_link_libraries( quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES} ) + target_link_libraries( dynamic_hull_OM_3 PRIVATE ${OPENMESH_LIBRARIES} ) endif() diff --git a/Convex_hull_d/doc/Convex_hull_d/CGAL/Convex_hull_d_traits_3.h b/Convex_hull_d/doc/Convex_hull_d/CGAL/Convex_hull_d_traits_3.h index bb01faed251..3719f9fc270 100644 --- a/Convex_hull_d/doc/Convex_hull_d/CGAL/Convex_hull_d_traits_3.h +++ b/Convex_hull_d/doc/Convex_hull_d/CGAL/Convex_hull_d_traits_3.h @@ -17,8 +17,7 @@ low-dimensional standard kernel model, e.g. `Homogeneous` or */ template< typename R > -class Convex_hull_d_traits_3 { -public: +struct Convex_hull_d_traits_3 { /// \name Creation /// @{ diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_code_format.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_code_format.txt index c8ec1c39d90..fab0b433239 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_code_format.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_code_format.txt @@ -320,14 +320,13 @@ employing the authors) of this work, are allowed in \cgal), and a pointer to the file containing its text in the \cgal distribution,
  • a disclaimer notice, -
  • then, there are 2 keywords, which are automatically expanded by SVN -(there are options in SVN to suppress these expansions if you need): +
  • then, there are 2 keywords, which are automatically expanded at the creation of a new release:
      -
    • \$URL: \$ : the name of the source file in the repository, it also -helps figuring out which package the file comes from, -
    • \$Id: \$ : the SVN revision number of the file, the date of this revision, -and the author of the last commit. +
    • \$URL\$ : canonical path to the file on github, +
    • \$Id\$ : the release version the file is from.
    +
  • Then [SPDX license identifier](https://spdx.org/). For GPL-3+ it should be `SPDX-License-Identifier: GPL-3.0+`, +and `SPDX-License-Identifier: LGPL-3.0+` for LGPL-3+.
  • Then the authors of (non-negligible parts of) this file are listed, with optional affiliation or e-mail address. @@ -362,9 +361,9 @@ Here follows what this gives for a file under the GPL : // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // -// $URL: svn+ssh://pmoeller@scm.gforge.inria.fr/svn/cgal/branches/features/doxy-port-pmoeller/Developers_manual/doc_tex/Developers_manual/code_format.tex $ -// $Id: code_format.tex 70968 2012-08-02 12:55:15Z pmoeller $ -// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0+ // // Author(s) : Monique Teillaud // Sylvain Pion @@ -392,9 +391,9 @@ Here follows what this gives for a file under the LGPL : // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // -// $URL: svn+ssh://pmoeller@scm.gforge.inria.fr/svn/cgal/branches/features/doxy-port-pmoeller/Developers_manual/doc_tex/Developers_manual/code_format.tex $ -// $Id: code_format.tex 70968 2012-08-02 12:55:15Z pmoeller $ -// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0+ // // Author(s) : Herve Bronnimann, Sylvain Pion \endcode diff --git a/Documentation/doc/Documentation/Installation.txt b/Documentation/doc/Documentation/Installation.txt index 5c07d5253a7..121bb2f331c 100644 --- a/Documentation/doc/Documentation/Installation.txt +++ b/Documentation/doc/Documentation/Installation.txt @@ -323,7 +323,7 @@ variable `BUILD_SHARED_LIBS` to `FALSE`. If you use \subsection subsection_headeronly Header-only option -Since \cgal 4.9, \cgal can be used in headers only mode, i.e. without compiling the \cgal libraries and linking with these libraries when compiling examples, tests and demos. This possibility can be enabled by setting the value of the CMake variable `CGAL_HEADER_ONLY` to `ON`. CMake version 3.0.0 or higher is required to use this option. +Since \cgal 4.11, \cgal can be used in header-only mode, i.e. without configuring nor building any \cgal library. In this case, the program using \cgal (example, test, demo, etc.) must be directly configured using CMake. The variable `CGAL_DIR` must point to the root directory of the CGAL source code. One advantage of using \cgal in header-only mode is that you do not need to compile and install \cgal libraries before compiling a given example or demo. Note that even in header-only mode we still need to run CMake on \cgal in order to generate different configuration files. So, setting up \cgal becomes now: diff --git a/Documentation/doc/resources/1.8.13/header_package.html b/Documentation/doc/resources/1.8.13/header_package.html index 83b4df902cb..bec74f7c493 100644 --- a/Documentation/doc/resources/1.8.13/header_package.html +++ b/Documentation/doc/resources/1.8.13/header_package.html @@ -21,7 +21,6 @@ diff --git a/Documentation/doc/scripts/compare_testsuites.sh b/Documentation/doc/scripts/compare_testsuites.sh index 8196c30c548..1c5a594ce1b 100644 --- a/Documentation/doc/scripts/compare_testsuites.sh +++ b/Documentation/doc/scripts/compare_testsuites.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ "$1" == '--help' ]; then echo "Usage: $0 [doc 2]" - exho "doc 1 and doc 2 are paths to doxygen outputs (doc_output)." + echo "doc 1 and doc 2 are paths to doxygen outputs (doc_output)." echo "Parse the xml output of doc 1 and creates a directory with organized text files." echo "Then, if doc_2 is specified, do the same for its xml output and make the diff between them." exit 0 diff --git a/Documentation/doc/scripts/process_doc.sh b/Documentation/doc/scripts/process_doc.sh new file mode 100644 index 00000000000..29d2483bfac --- /dev/null +++ b/Documentation/doc/scripts/process_doc.sh @@ -0,0 +1,56 @@ +#!/bin/bash +if [ "$1" == '--help' ]; then + echo "Usage: $0 [publish_dir]" + echo "Compares the output of doxygen 1.8.13 and doxygen master to the one from doxygen 1.8.4, of this CGAL version, " + echo "publish_dir is the path to the dir where the testsuite results are kept" + echo "$0 must be called from doc/scripts" + exit 0 +fi + +mkdir -p doc_1_8_4 +mkdir -p doc_1_8_13 +mkdir -p doc_master + +PATH_TO_1_8_4="$1" +PATH_TO_1_8_13="$2" +PUBLISH_DIR="$3" + +DOXYGEN_1=$($PATH_TO_1_8_4 --version) +DOXYGEN_2=$($PATH_TO_1_8_13 --version) + + +####################################### +## download and build doxygen_master ## +####################################### +echo "downloading and building master" + git clone https://github.com/doxygen/doxygen.git doxygen_master 1> /dev/null + cd doxygen_master + git pull https://github.com/lrineau/doxygen.git 1> /dev/null + MASTER_DESCRIBE=$(git describe --tags) + mkdir -p build + cd build + cmake .. 1> /dev/null + make -j$NB_CORES 1> /dev/null + cd ../.. #scripts + PATH_TO_MASTER="$PWD/doxygen_master/build/bin/doxygen" + echo "done." + +echo "comparing versions 1.8.4 and 1.8.13" +bash test_doxygen_versions.sh $PATH_TO_1_8_4 $PATH_TO_1_8_13 $PWD/doc_1_8_4 $PWD/doc_1_8_13 $PUBLISH_DIR +mv diff.txt diff1.txt + +echo "comparing versions 1.8.4 and master" +bash test_doxygen_versions.sh $PATH_TO_1_8_4 $PATH_TO_MASTER $PWD/doc_1_8_4 $PWD/doc_master $PUBLISH_DIR +mv diff.txt diff2.txt + +#update overview +CGAL_NAME=$(cat cgal_version) + +python ${PWD}/testsuite.py --output-dir1 $PWD/doc_1_8_4/doc_output/ --output-dir2 $PWD/doc_1_8_13/doc_output/ --doc-log-dir $PWD/doc_1_8_4/doc_log/ \ + --publish $PUBLISH_DIR --diff1 $PWD/diff1.txt --diff2 $PWD/diff2.txt --master-dir $PWD/doc_master/doc_output/ \ + --cgal-version "$CGAL_NAME" --do-copy-results --version-to-keep 10 --doxygen-version1 "$DOXYGEN_1" --doxygen-version2 "$DOXYGEN_2" --master-describe "$MASTER_DESCRIBE" + +#clean-up +rm -rf ./doc_1_8_4 ./doc_1_8_13 ./doc_master ./doxygen_master +rm ./diff1.txt ./diff2.txt ./cgal_version + diff --git a/Documentation/doc/scripts/test_doxygen_versions.sh b/Documentation/doc/scripts/test_doxygen_versions.sh index 20d9f4bab87..60b8aa43669 100644 --- a/Documentation/doc/scripts/test_doxygen_versions.sh +++ b/Documentation/doc/scripts/test_doxygen_versions.sh @@ -2,19 +2,22 @@ set -e + if [ "$1" == '--help' ]; then - echo "Usage: $0 [doxygen_2] [publish_dir]" + echo "Usage: $0 " echo "Compares the output of doxygen_1 and doxygen_2 of this CGAL version, " echo "where doxygen_1 and doxygen_2 are valid paths to doxygen executables." - echo "If doxygen_2 is not specified, the master branch of doxygen will be cloned, built and used as doxygen_2." echo "publish_dir is the path to the dir where the testsuite results are kept" + echo "doc_##_dir is the path to the directory where the documentation will be output for the corresponding version." echo "$0 must be called from doc/scripts" exit 0 fi #build reference PATH_TO_1="$1" PATH_TO_2="$2" -PUBLISH_DIR="$3" +PUBLISH_DIR="$5" +BUILD_DIR_1="$3" +BUILD_DIR_2="$4" NB_CORES="$(grep -c ^processor /proc/cpuinfo)" if [ -z $PATH_TO_1 ] || [ $(basename $PATH_TO_1) != "doxygen" ] || [ ! -e $PATH_TO_1 ]; then @@ -23,6 +26,17 @@ if [ -z $PATH_TO_1 ] || [ $(basename $PATH_TO_1) != "doxygen" ] || [ ! -e $PATH_ exit 0 fi +if [ ! -d $BUILD_DIR_1 ] || [ ! -d $BUILD_DIR_2 ] || [ ! -d $PUBLISH_DIR ]; then + echo "doc_1_dir, doc_2_dir and publish_dir must be directories." + echo "$0 --help for more information." + exit 0 +fi + +HAS_REF=1 +TEST=$(ls $BUILD_DIR_1) +if [ -z "$TEST" ]; then + HAS_REF=0 +fi #Find the CGAL directory. If there is a directory called Documentation, this is a branch build. #Else it is from a release. TEMP=$PWD @@ -35,43 +49,31 @@ else ROOT=$PWD fi cd $TEMP #scripts -################################################################ -## Build a first time with Doxygen_1 and create the txt files ## -################################################################ +if [ "$HAS_REF" -ne "1" ]; then -echo "Building reference documentation..." -mkdir -p ./build_doc -cd ./build_doc -cmake -DCGAL_DOC_RELEASE=ON -DCGAL_GENERATE_XML=ON -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. 1> /dev/null -make -j$NB_CORES doc &> /dev/null -echo "done." -cd ../ #scripts -echo "Creating text files for diff...." -bash -$- compare_testsuites.sh $PWD/build_doc/doc_output 1> /dev/null -mv ./doc_data ./doc_ref -echo "done." + ################################################################ + ## Build a first time with Doxygen_1 and create the txt files ## + ################################################################ -####################################### -## download and build doxygen_master ## -####################################### - -if [ -z $PATH_TO_2 ] || [ $(basename $PATH_TO_2) != "doxygen" ] || [ ! -e $PATH_TO_2 ]; then - echo "No second path detected. Cloning Doxygen master branch..." - git clone https://github.com/doxygen/doxygen.git doxygen_master 1> /dev/null - cd doxygen_master - git pull https://github.com/lrineau/doxygen.git 1> /dev/null - MASTER_DESCRIBE=$(git describe --tags) - mkdir -p build - cd build - cmake .. 1> /dev/null - make -j$NB_CORES 1> /dev/null - cd ../.. #scripts - PATH_TO_2="$PWD/doxygen_master/build/bin/doxygen" + echo "Building reference documentation..." + mkdir -p ./build_doc + cd ./build_doc + cmake -DCGAL_DOC_RELEASE=ON -DCGAL_GENERATE_XML=ON -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. 1> /dev/null + make -j$NB_CORES doc &> /dev/null echo "done." + cd ../ #scripts + echo "Creating text files for diff...." + bash -$- compare_testsuites.sh $PWD/build_doc/doc_output 1> /dev/null + mv ./doc_data ./doc_ref + cp -r doc_ref first_doc_ref + echo "done." + mv ./build_doc ./doc_dir +else + echo "There is already a reference. Not re-building." fi -mv ./build_doc ./doc_dir + ################################################################## -## build doc with doxygen master, create the txt files and diff ## +## build doc with Doxygen_2, create the txt files and diff ## ################################################################## echo "Building second documentation..." mkdir -p build_doc @@ -83,7 +85,11 @@ cd ../ #scripts DOXYGEN_1=$($PATH_TO_1 --version) DOXYGEN_2=$($PATH_TO_2 --version) echo "Comparing results..." -bash -$- ./compare_testsuites.sh $PWD/build_doc/doc_output $PWD/doc_ref 1> /dev/null +if [ "$HAS_REF" -eq "1" ]; then + bash -$- ./compare_testsuites.sh $PWD/build_doc/doc_output $PWD/first_doc_ref 1> /dev/null +else + bash -$- ./compare_testsuites.sh $PWD/build_doc/doc_output $PWD/doc_ref 1> /dev/null +fi echo "done." #add post-processing cd ./build_doc @@ -91,48 +97,42 @@ echo "Adding postprocessing..." make -j$NB_CORES doc_with_postprocessing &> /dev/null echo "done." cd .. #scripts -mv ./build_doc ./doc_master +mv ./build_doc/* $BUILD_DIR_2 - -####################################################################################################################### -## rebuild doc with Doxygen_1 to get the right doc_tags without GENERATE_XML because it ignores the EXCLUDE_SYMBOLS, ## -## which disrupts the logs ## -####################################################################################################################### -rm -rf ./doc_dir -mkdir ./doc_dir -cd ./doc_dir -cmake -DCGAL_DOC_RELEASE=ON -DCGAL_DOC_CREATE_LOGS="true" -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. 1> /dev/null -echo "Building reference documentation with postprocessing..." -make -j$NB_CORES doc &> /dev/null -make -j$NB_CORES doc &> /dev/null -make -j$NB_CORES doc_with_postprocessing &> /dev/null -echo "done." -cd .. #scripts -#get VERSION's content -if [ $IS_RELEASE = 0 ]; then - cd $ROOT - mkdir -p ./build && cd ./build - cmake .. 1> /dev/null - CGAL_NAME="$(cat $PWD/VERSION)" - cd $ROOT - rm -rf ./build - cd $ROOT/Documentation/doc/scripts +if [ "$HAS_REF" -ne "1" ]; then + ####################################################################################################################### + ## rebuild doc with Doxygen_1 to get the right doc_tags without GENERATE_XML because it ignores the EXCLUDE_SYMBOLS, ## + ## which disrupts the logs ## + ####################################################################################################################### + rm -rf ./doc_dir + cd $BUILD_DIR_1 + cmake -DCGAL_DOC_RELEASE=ON -DCGAL_DOC_CREATE_LOGS="true" -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. 1> /dev/null + echo "Building reference documentation with postprocessing..." + make -j$NB_CORES doc &> /dev/null + make -j$NB_CORES doc &> /dev/null + make -j$NB_CORES doc_with_postprocessing &> /dev/null + echo "done." + cd .. #scripts + #get VERSION's content + if [ $IS_RELEASE = 0 ]; then + cd $ROOT + mkdir -p ./build && cd ./build + cmake -DWITH_CGAL_Core=false -DWITH_CGAL_ImageIO=false -DWITH_CGAL_Qt5=false .. 1> /dev/null + CGAL_NAME="$(cat $PWD/VERSION)" + cd $ROOT + rm -rf ./build + cd $ROOT/Documentation/doc/scripts + else + CGAL_NAME="$(cat $ROOT/VERSION)" + fi + echo "$CGAL_NAME">cgal_version else - CGAL_NAME="$(cat $ROOT/VERSION)" + echo "There is already a reference. Not re-building." + rm -rf ./first_doc_ref fi -#update overview - -python ${PWD}/testsuite.py --output-dir $PWD/doc_dir/doc_output/ --doc-log-dir $PWD/doc_dir/doc_log/ \ - --publish $PUBLISH_DIR --diff $PWD/diff.txt --master-dir $PWD/doc_master/doc_output/ \ - --cgal-version "$CGAL_NAME" --do-copy-results --version-to-keep 10 --doxygen-version "$DOXYGEN_1" --master-describe "$MASTER_DESCRIBE" - +echo "cleaning up" #clean-up rm -rf ./build_doc -rm -rf ./doc_dir -rm -rf ./doc_master rm -rf ./doc_ref rm -rf ./doc_data -if [ -z $PATH_TO_2 ]; then - rm -rf ./doxygen_master -fi diff --git a/Documentation/doc/scripts/testsuite.py b/Documentation/doc/scripts/testsuite.py index 4e0a755fc23..cad67169b37 100755 --- a/Documentation/doc/scripts/testsuite.py +++ b/Documentation/doc/scripts/testsuite.py @@ -88,14 +88,18 @@ body {color: black; background-color: #C0C0D0; font-family: sans-serif;} if args.publish and args.do_copy_results: suffix='' - if args.doxygen_version: - suffix = ""+args.doxygen_version - link="Documentation built with our fork of Doxygen {_suffix}\n".format(_suffix=suffix) + if args.doxygen_version1: + suffix = ""+args.doxygen_version1 + link1="Documentation built with our fork of Doxygen {_suffix}\n".format(_suffix=suffix) + suffix = '' + if args.doxygen_version2: + suffix = args.doxygen_version2 + link2="\n
    Documentation built with our fork of Doxygen {_suffix}\n".format(_suffix=suffix) suffix = '' if args.master_describe: suffix=args.master_describe link_master="\n
    Documentation built with the master version of Doxygen {_suffix} (buggy), so that we see progress/regression of doxygen development as far as CGAL is concerned.\n".format(_suffix=suffix) - d = pq(page_header+link+" "+link_master+page_footer) + d = pq(page_header+link1+" "+link2+" "+link_master+page_footer) else: d = pq(page_header+page_footer) logs=sorted(glob.glob('./*.log')) @@ -126,12 +130,15 @@ def main(): parser.add_argument('--publish', metavar='/path/to/publish', help='Specify this argument if the results should be published.') parser.add_argument('--doc-log-dir', default='.', metavar='/path/to/cgal/build/dir/doc_log', help='The path of the documentation logs.') parser.add_argument('--master-dir', default='.', metavar='/path/to/cgal/build/master_dir/doc_output', help='The path to the master build documentation.') - parser.add_argument('--output-dir', default='.', metavar='/path/to/cgal/build/dir/doc_output', help='The path to the build documentation') - parser.add_argument('--diff', metavar='/path/to/diff', help='The path to the diff file.') + parser.add_argument('--output-dir1', default='.', metavar='/path/to/cgal/build/dir1/doc_output', help='The path to the first built documentation') + parser.add_argument('--output-dir2', default='.', metavar='/path/to/cgal/build/dir2/doc_output', help='The path to the second built documentation') + parser.add_argument('--diff1', metavar='/path/to/diff', help='The path to the first diff file.') + parser.add_argument('--diff2', metavar='/path/to/diff', help='The path to the first diff file.') parser.add_argument('--cgal-version', help='Path to a version.h file from the current release. If not specified use git hash instead.') parser.add_argument('--version-to-keep', help='indicates the number of release testsuites that should be kept at the publishing location.') parser.add_argument('--do-copy-results', action="store_true", help='Specify this argument if you want to copy the generated documentation into the publishing location.') - parser.add_argument('--doxygen-version', default ='', help='Specify this argument if you want to add a version number to the name of the link to the documentation.') + parser.add_argument('--doxygen-version1', default ='', help='Specify this argument if you want to add a version number to the name of the link to the first documentation.') + parser.add_argument('--doxygen-version2', default ='', help='Specify this argument if you want to add a version number to the name of the link to the second documentation.') parser.add_argument('--master-describe', default ='', help='Specify this argument if you want to add a suffix to the name of the link to the doxygen master documentation.') args = parser.parse_args() @@ -151,12 +158,18 @@ def main(): write_out_html(d, './index.html') # does the diff exist ? - diff='n/a' - if args.diff: - diff_file=args.diff - if not os.path.isfile(diff_file): - sys.stderr.write('Diff file ' + diff_file + ' is not a file. Cannot diff.\n') + diff1='n/a' + if args.diff1: + diff_file1=args.diff1 + if not os.path.isfile(diff_file1): + sys.stderr.write('Diff file ' + diff_file1 + ' is not a file. Cannot diff.\n') sys.exit(1) + diff2='n/a' + if args.diff2: + diff_file2=args.diff2 + if not os.path.isfile(diff_file2): + sys.stderr.write('Diff file ' + diff_file2 + ' is not a file. Cannot diff.\n') + sys.exit(1) if args.publish: if args.publish.endswith('/'): publish_dir=args.publish @@ -188,24 +201,33 @@ body {color: black; background-color: #C0C0D0; font-family: sans-serif;} Manual Testsuite Overview

    Overviewpage of the Doxygen Manual Testsuite

    -
    RevisionDateWarningsErrorsDiff with doxygen master
    ''') +RevisionDateWarningsErrorsDiff with doxygen masterDiff with doxygen 1.8.13''') args_list='' for arg in sys.argv[0:]: args_list+=arg+' ' signature='

    Generated with the command line
    python {script_args}
    by {user_name}@{host_name} at {date_time}

    '.format( user_name=getpass.getuser(), host_name=socket.gethostname(), date_time=time.ctime(), script_args=args_list) f.write(signature) - with open(diff_file, 'r') as myfile: - diff=myfile.read() - if not diff: - diff='none' + with open(diff_file1, 'r') as myfile: + diff1=myfile.read() + if not diff1: + diff1='none' else: - diff='Diff between {test_version} and {master_version}.'.format( - log_path=version_string, test_version=args.doxygen_version, master_version=args.master_describe) + diff1='Diff between {test_version} and {master_version}.'.format( + log_path=version_string, test_version=args.doxygen_version1, master_version=args.doxygen_version2) + + with open(diff_file2, 'r') as myfile: + diff2=myfile.read() + if not diff2: + diff2='none' + else: + diff2='Diff between {test_version} and {master_version}.'.format( + log_path=version_string, test_version=args.doxygen_version1, master_version=args.master_describe) + d=pq(filename=publish_dir + 'index.html',parser="html") revs=d('#revisions tr') - new_row='{revision}{date}{warnings}{errors}{diffs}'.format( - revision=version_string, date=version_date, warnings=sum[0], errors=sum[1], diffs=diff) + new_row='{revision}{date}{warnings}{errors}{diffs1}{diffs2}'.format( + revision=version_string, date=version_date, warnings=sum[0], errors=sum[1], diffs1=diff2, diffs2=diff1) revs.eq(0).after(new_row) if args.version_to_keep: nb_items=len(revs) @@ -231,12 +253,15 @@ body {color: black; background-color: #C0C0D0; font-family: sans-serif;} #copy log files shutil.copytree('.', log_target) #copy diff - shutil.copyfile(diff_file, log_target+'/diff.txt') + shutil.copyfile(diff_file1, log_target+'/diff1.txt') + shutil.copyfile(diff_file2, log_target+'/diff2.txt') try: #copy documentation if args.do_copy_results: - tgt=os.path.join(log_target, 'output') - shutil.copytree(args.output_dir, tgt, symlinks=True) + tgt=os.path.join(log_target, 'output1') + shutil.copytree(args.output_dir1, tgt, symlinks=True) + tgt=os.path.join(log_target, 'output2') + shutil.copytree(args.output_dir2, tgt, symlinks=True) os.symlink("../MathJax", os.path.join(log_target, 'MathJax')) except: sys.stderr.write("Error while copying documentation\n") diff --git a/Envelope_2/Envelope_2.dxy b/Envelope_2/Envelope_2.dxy deleted file mode 100644 index 7df4443090e..00000000000 --- a/Envelope_2/Envelope_2.dxy +++ /dev/null @@ -1,1218 +0,0 @@ -# Doxyfile 1.4.2 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Envelope_2 - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. - -SHOW_DIRECTORIES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the progam writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = include/CGAL - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = examples/Envelope_3 - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = YES - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/Envelope_3/Envelope_3.dxy b/Envelope_3/Envelope_3.dxy deleted file mode 100644 index 5610bc6ece4..00000000000 --- a/Envelope_3/Envelope_3.dxy +++ /dev/null @@ -1,1218 +0,0 @@ -# Doxyfile 1.4.2 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Envelope_3 - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. - -SHOW_DIRECTORIES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the progam writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = include/CGAL - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = examples/Envelope_3 - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = YES - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/Generalized_map/include/CGAL/Generalized_map_storages.h b/Generalized_map/include/CGAL/Generalized_map_storages.h index b63f4cb16d0..e3ac9e26b0e 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages.h @@ -340,7 +340,7 @@ namespace CGAL { // Get the dart of the i-cell attribute associated with the given dart template - Dart_handle & dart(Dart_handle adart) + Dart_handle dart(Dart_handle adart) { CGAL_assertion( adart!=NULL ); CGAL_assertion( attribute(adart)!=NULL ); diff --git a/Generator/doc/Generator/CGAL/Random_convex_set_traits_2.h b/Generator/doc/Generator/CGAL/Random_convex_set_traits_2.h index b94e85e91c2..edae9a48042 100644 --- a/Generator/doc/Generator/CGAL/Random_convex_set_traits_2.h +++ b/Generator/doc/Generator/CGAL/Random_convex_set_traits_2.h @@ -9,8 +9,7 @@ for the function `random_convex_set_2()`. */ template< typename Kernel > -class Random_convex_set_traits_2 { -public: +struct Random_convex_set_traits_2 { /// \name Types /// @{ diff --git a/Generator/doc/Generator/CGAL/point_generators_2.h b/Generator/doc/Generator/CGAL/point_generators_2.h index 9d5c1da1c07..449f0444a20 100644 --- a/Generator/doc/Generator/CGAL/point_generators_2.h +++ b/Generator/doc/Generator/CGAL/point_generators_2.h @@ -451,8 +451,7 @@ get_default_random() ); template< typename Point_2, typename Triangle_2 = typename Kernel_traits::Kernel::Triangle_2, typename Creator = Creator_uniform_2::Kernel::RT,Point_2> > - class Random_points_in_triangles_2 { - public: + struct Random_points_in_triangles_2 { /// \name Types /// @{ diff --git a/Generator/doc/Generator/CGAL/point_generators_3.h b/Generator/doc/Generator/CGAL/point_generators_3.h index d6872e48f33..631637941df 100644 --- a/Generator/doc/Generator/CGAL/point_generators_3.h +++ b/Generator/doc/Generator/CGAL/point_generators_3.h @@ -421,8 +421,7 @@ template< typename Point_3, typename Triangle_3=typename Kernel_traits::Kernel::Triangle_3, typename Creator = Creator_uniform_3< typename Kernel_traits< Point_3 >::Kernel::RT, Point_3 > > -class Random_points_in_triangles_3 { -public: +struct Random_points_in_triangles_3 { /// \name Types /// @{ @@ -497,8 +496,7 @@ template < class TriangleMesh, class Creator = Creator_uniform_3< typename Kernel_traits< typename boost::property_traits::value_type >::Kernel::RT, typename boost::property_traits::value_type > > -class Random_points_in_triangle_mesh_3 { -public: +struct Random_points_in_triangle_mesh_3 { /// \name Types /// @{ diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index 74befb6c8d3..79481e9d477 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -35,14 +35,16 @@ qt5_generate_moc( Alpha_shapes_2.cpp Alpha_shapes_2.moc ) # The executable itself. add_executable ( Alpha_shapes_2 Alpha_shapes_2.cpp Alpha_shapes_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) -qt5_use_modules(Alpha_shapes_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Alpha_shapes_2 ) -# Link with Qt libraries -target_link_libraries( Alpha_shapes_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Alpha_shapes_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +target_link_libraries( Alpha_shapes_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Alpha_shapes_2) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Alpha_shapes_2) else() diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index c471e14a301..5277df796c8 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -33,14 +33,17 @@ qt5_generate_moc( Apollonius_graph_2.cpp Apollonius_graph_2.moc ) # The executable itself. add_executable ( Apollonius_graph_2 Apollonius_graph_2.cpp Apollonius_graph_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) -qt5_use_modules(Apollonius_graph_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Apollonius_graph_2 ) -# Link with Qt libraries -target_link_libraries( Apollonius_graph_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Apollonius_graph_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +target_link_libraries( Apollonius_graph_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 + Qt5::Gui ) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Apollonius_graph_2) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Apollonius_graph_2) else() diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index fe3dee88349..73dbe769131 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -38,14 +38,16 @@ qt5_generate_moc( "Bounding_volumes.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Bounding_v # The executable itself. add_executable ( Bounding_volumes Bounding_volumes.cpp Bounding_volumes.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) -qt5_use_modules(Bounding_volumes Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Bounding_volumes ) -# Link with Qt libraries -target_link_libraries( Bounding_volumes ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Bounding_volumes ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +target_link_libraries( Bounding_volumes PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Bounding_volumes) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Bounding_volumes) else() diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 8faf940eb06..b832117e578 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -38,14 +38,16 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # The executable itself. add_executable ( Circular_kernel_2 Circular_kernel_2.cpp Circular_kernel_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) - qt5_use_modules(Circular_kernel_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Circular_kernel_2 ) - # Link with Qt libraries - target_link_libraries( Circular_kernel_2 ${QT_LIBRARIES} ) - # Link with CGAL - target_link_libraries( Circular_kernel_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) + target_link_libraries( Circular_kernel_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui) + + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Circular_kernel_2) + + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Circular_kernel_2) else() diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index ee92ef751ae..186f37e94dd 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -1,4 +1,3 @@ -# Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. project (Generator_Demo) @@ -15,8 +14,6 @@ include(${CGAL_USE_FILE}) find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) -include_directories (BEFORE ../../include) - if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) add_definitions(-DQT_NO_KEYWORDS) @@ -35,15 +32,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # The executable itself. add_executable ( Generator_2 Generator_2.cpp Generator_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} ) - qt5_use_modules(Generator_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Generator_2 ) - # Link with Qt libraries - target_link_libraries( Generator_2 ${QT_LIBRARIES} ) - # And with CGAL libraries - target_link_libraries( Generator_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + target_link_libraries( Generator_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Generator_2) else() message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index e1d0ecf5135..3da163ace44 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -20,15 +20,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) add_executable ( min min.cpp ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) - qt5_use_modules(min Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS min ) - # Link with Qt libraries - target_link_libraries( min ${QT_LIBRARIES} ) - # Link with CGAL - target_link_libraries( min ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) + target_link_libraries( min PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(min) else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index 2a5579dfd2b..4e42f7ed98f 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -37,14 +37,16 @@ qt5_generate_moc( L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc ) # The executable itself. add_executable ( L1_voronoi_diagram_2 L1_voronoi_diagram_2.cpp L1_voronoi_diagram_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} ) -qt5_use_modules(L1_voronoi_diagram_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS L1_voronoi_diagram_2 ) -# Link with Qt libraries -target_link_libraries( L1_voronoi_diagram_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( L1_voronoi_diagram_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +target_link_libraries( L1_voronoi_diagram_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(L1_voronoi_diagram_2) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(L1_voronoi_diagram_2) else() diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index 7d4429da9dd..f3ea3822cee 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -36,15 +36,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # The executable itself. add_executable ( Largest_empty_rectangle_2 Largest_empty_rectangle_2.cpp Largest_empty_rectangle_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} ) - qt5_use_modules(Largest_empty_rectangle_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Largest_empty_rectangle_2 ) - # Link with Qt libraries - target_link_libraries( Largest_empty_rectangle_2 ${QT_LIBRARIES} ) - # And with CGAL libraries - target_link_libraries( Largest_empty_rectangle_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + target_link_libraries( Largest_empty_rectangle_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Largest_empty_rectangle_2) else() message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index b500820bea4..065264be817 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -53,14 +53,13 @@ add_executable ( Periodic_2_Delaunay_triangulation_2 ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} ${headers} ${QT_headers} ${P2T2_headers}) -qt5_use_modules( Periodic_2_Delaunay_triangulation_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Periodic_2_Delaunay_triangulation_2 ) -# Link with Qt libraries -target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +target_link_libraries( Periodic_2_Delaunay_triangulation_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Periodic_2_Delaunay_triangulation_2) else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index 9f7e2ff5038..ed26300f92c 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -43,16 +43,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # The executable itself. add_executable ( Polygon_2 Polygon_2.cpp Polygon_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} ) - qt5_use_modules(Polygon_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polygon_2 ) + target_link_libraries( Polygon_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) - # Link with Qt libraries - target_link_libraries( Polygon_2 ${QT_LIBRARIES} ) - # And with CGAL libraries - target_link_libraries( Polygon_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) - + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Polygon_2) else() message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core, and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 5aee7461e01..d686684058e 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -43,15 +43,13 @@ qt5_generate_moc( "Segment_voronoi_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Segment_v # The executable itself. add_executable ( Segment_voronoi_2 Segment_voronoi_2.cpp Segment_voronoi_2.moc ${CDT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) -qt5_use_modules(Segment_voronoi_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Segment_voronoi_2 ) -# Link with Qt libraries -target_link_libraries( Segment_voronoi_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Segment_voronoi_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +target_link_libraries( Segment_voronoi_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Segment_voronoi_2) else() diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 54c06e8794c..235361f99be 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -43,16 +43,13 @@ qt5_generate_moc( "Segment_voronoi_linf_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Segm # The executable itself. add_executable ( Segment_voronoi_linf_2 Segment_voronoi_linf_2.cpp Segment_voronoi_linf_2.moc ${CDT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) -qt5_use_modules(Segment_voronoi_linf_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Segment_voronoi_linf_2 ) -# Link with Qt libraries -target_link_libraries( Segment_voronoi_linf_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Segment_voronoi_linf_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) - +target_link_libraries( Segment_voronoi_linf_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Segment_voronoi_linf_2) else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index a8b9e52638b..0644db2a4ef 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -35,14 +35,16 @@ qt5_generate_moc( Snap_rounding_2.cpp Snap_rounding_2.moc ) # The executable itself. add_executable ( Snap_rounding_2 Snap_rounding_2.cpp Snap_rounding_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} ) -qt5_use_modules(Snap_rounding_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Snap_rounding_2 ) -# Link with Qt libraries -target_link_libraries( Snap_rounding_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Snap_rounding_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +target_link_libraries( Snap_rounding_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Snap_rounding_2) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Snap_rounding_2) else() diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index 0aa76f63964..92c07195c75 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -37,15 +37,14 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # The executable itself. add_executable ( Spatial_searching_2 Spatial_searching_2.cpp Spatial_searching_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} ) - qt5_use_modules(Spatial_searching_2 Xml Script OpenGL Svg) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Spatial_searching_2 ) - # Link with Qt libraries - target_link_libraries( Spatial_searching_2 ${QT_LIBRARIES} ) - # And with CGAL libraries - target_link_libraries( Spatial_searching_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + target_link_libraries( Spatial_searching_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Spatial_searching_2) else() message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 5a0d0d8ab2e..e980d9e818e 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -36,14 +36,16 @@ qt5_generate_moc( Stream_lines_2.cpp Stream_lines_2.moc ) # The executable itself. add_executable ( Stream_lines_2 Stream_lines_2.cpp Stream_lines_2.moc ${DT_UI_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES} ) -qt5_use_modules(Stream_lines_2 Xml Script OpenGL Svg) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Stream_lines_2 ) -# Link with Qt libraries -target_link_libraries( Stream_lines_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Stream_lines_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +target_link_libraries( Stream_lines_2 PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui ) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Stream_lines_2) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Stream_lines_2) else() diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index 5b8e2f404ef..461ad726ad7 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -9,99 +9,68 @@ if(NOT POLICY CMP0070 AND POLICY CMP0053) cmake_policy(SET CMP0053 OLD) endif() +if(POLICY CMP0071) + cmake_policy(SET CMP0071 NEW) +endif() + +set(CMAKE_AUTOMOC TRUE) +set(CMAKE_AUTOUIC TRUE) +set(CMAKE_AUTORCC TRUE) +set(CMAKE_INCLUDE_CURRENT_DIR TRUE) + find_package(CGAL COMPONENTS Qt5) +find_package(Qt5 QUIET COMPONENTS Widgets) -include(${CGAL_USE_FILE}) - - -find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) - -include_directories (BEFORE ../../include) -include_directories (BEFORE ./include) -include_directories (BEFORE ../../../Number_types/include) - -include_directories (BEFORE ../../../Triangulation_2/include) - -if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) +if ( NOT CGAL_FOUND OR NOT CGAL_Qt5_FOUND OR NOT Qt5_FOUND ) + message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + return() +endif() add_definitions(-DQT_NO_KEYWORDS) - - #-------------------------------- # The "constrained Delaunay" demo: Constrained_Delaunay_triangulation_2 #-------------------------------- -# UI files (Qt Designer files) -qt5_wrap_ui( CDT_UI_FILES Constrained_Delaunay_triangulation_2.ui ) - -# qrc files (resources files, that contain icons, at least) -qt5_add_resources ( CDT_RESOURCE_FILES ./Constrained_Delaunay_triangulation_2.qrc ) - -# use the Qt MOC preprocessor on classes that derives from QObject -qt5_generate_moc( "Constrained_Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Constrained_Delaunay_triangulation_2.moc" ) # The executable itself. -add_executable ( Constrained_Delaunay_triangulation_2 Constrained_Delaunay_triangulation_2.cpp Constrained_Delaunay_triangulation_2.moc ${CDT_UI_FILES} ${CDT_RESOURCE_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) +add_executable( Constrained_Delaunay_triangulation_2 + Constrained_Delaunay_triangulation_2.cpp) +target_link_libraries( Constrained_Delaunay_triangulation_2 + PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Widgets) +target_include_directories( Constrained_Delaunay_triangulation_2 + PRIVATE ./include) -qt5_use_modules(Constrained_Delaunay_triangulation_2 Xml Script OpenGL Svg) - -add_to_cached_list( CGAL_EXECUTABLE_TARGETS Constrained_Delaunay_triangulation_2 ) - -# Link with Qt libraries -target_link_libraries( Constrained_Delaunay_triangulation_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Constrained_Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +add_to_cached_list(CGAL_EXECUTABLE_TARGETS Constrained_Delaunay_triangulation_2) #-------------------------------- # The "Delaunay" demo: Delaunay_triangulation_2 #-------------------------------- -# UI files (Qt Designer files) -qt5_wrap_ui( DT_UI_FILES Delaunay_triangulation_2.ui ) - -# qrc files (resources files, that contain icons, at least) -qt5_add_resources ( DT_RESOURCE_FILES ./Delaunay_triangulation_2.qrc ) - -# use the Qt MOC preprocessor on classes that derives from QObject -qt5_generate_moc( "Delaunay_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Delaunay_triangulation_2.moc" ) # The executable itself. -add_executable ( Delaunay_triangulation_2 Delaunay_triangulation_2.cpp Delaunay_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) - -qt5_use_modules(Delaunay_triangulation_2 Xml Script OpenGL Svg) +add_executable ( Delaunay_triangulation_2 + Delaunay_triangulation_2.cpp) +target_link_libraries( Delaunay_triangulation_2 + PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Widgets) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Delaunay_triangulation_2 ) -# Link with Qt libraries -target_link_libraries( Delaunay_triangulation_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) - #-------------------------------- # The "Regular" demo: Regular_triangulation_2 #-------------------------------- -# UI files (Qt Designer files) -qt5_wrap_ui( DT_UI_FILES Regular_triangulation_2.ui ) - -# qrc files (resources files, that contain icons, at least) -qt5_add_resources ( DT_RESOURCE_FILES ./Regular_triangulation_2.qrc ) - -# use the Qt MOC preprocessor on classes that derives from QObject -qt5_generate_moc( "Regular_triangulation_2.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Regular_triangulation_2.moc" ) # The executable itself. -add_executable ( Regular_triangulation_2 Regular_triangulation_2.cpp Regular_triangulation_2.moc ${DT_UI_FILES} ${DT_RESOURCE_FILES} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) - -qt5_use_modules(Regular_triangulation_2 Xml Script OpenGL Svg) +add_executable ( Regular_triangulation_2 + Regular_triangulation_2.cpp) +target_link_libraries(Regular_triangulation_2 + PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Widgets) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Regular_triangulation_2 ) -# Link with Qt libraries -target_link_libraries( Regular_triangulation_2 ${QT_LIBRARIES} ) -# Link with CGAL -target_link_libraries( Regular_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +foreach(target + Constrained_Delaunay_triangulation_2 + Delaunay_triangulation_2 + Regular_triangulation_2) + cgal_add_compilation_test(${target}) +endforeach() -else() - - message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - -endif() diff --git a/GraphicsView/include/CGAL/Qt/debug.h b/GraphicsView/include/CGAL/Qt/debug.h index 967f808cba8..d87439e8805 100644 --- a/GraphicsView/include/CGAL/Qt/debug.h +++ b/GraphicsView/include/CGAL/Qt/debug.h @@ -48,7 +48,33 @@ CGAL_QT_EXPORT void traverse_resources(const QString& name, /** * Call this in the end of an OpenGL implementation to check if it returns errors. */ -CGAL_QT_EXPORT void opengl_check_errors(unsigned int line); +template +void opengl_check_errors(QtOpenGLFunctions* gl, + unsigned int line) { + GLenum error = gl->glGetError(); + while (error != GL_NO_ERROR) + { + if(error == GL_INVALID_ENUM) + std::cerr << "An unacceptable value is specified for an enumerated argument." << "@" << line << std::endl; + if(error == GL_INVALID_VALUE) + std::cerr << "A numeric argument is out of range." << "@" << line << std::endl; + if(error == GL_INVALID_OPERATION) + std::cerr << "The specified operation is not allowed in the current state." << "@" << line << std::endl; + if(error == GL_INVALID_FRAMEBUFFER_OPERATION) + std::cerr << "The framebuffer object is not complete." << "@" << line << std::endl; + if(error == GL_OUT_OF_MEMORY) + std::cerr << "There is not enough memory left to execute the command." << "@" << line << std::endl; +#ifdef GL_STACK_UNDERFLOW + if(error == GL_STACK_UNDERFLOW) + std::cerr << "An attempt has been made to perform an operation that would cause an internal stack to underflow." << "@" << line << std::endl; +#endif +#ifdef GL_STACK_OVERFLOW + if(error == GL_STACK_OVERFLOW) + std::cerr << "An attempt has been made to perform an operation that would cause an internal stack to overflow." << "@" << line << std::endl; +#endif + error = gl->glGetError(); + } +} } // namespace Qt } // namespace CGAL diff --git a/GraphicsView/include/CGAL/Qt/debug_impl.h b/GraphicsView/include/CGAL/Qt/debug_impl.h index 56ba9754291..abaad10d91c 100644 --- a/GraphicsView/include/CGAL/Qt/debug_impl.h +++ b/GraphicsView/include/CGAL/Qt/debug_impl.h @@ -60,32 +60,5 @@ void traverse_resources(const QString& name, const QString& dirname, int indent) } } -CGAL_INLINE_FUNCTION -void opengl_check_errors(unsigned int line) -{ - GLenum error = ::glGetError(); - while (error != GL_NO_ERROR) - { - if(error == GL_INVALID_ENUM) - std::cerr << "An unacceptable value is specified for an enumerated argument." << "@" << line << std::endl; - if(error == GL_INVALID_VALUE) - std::cerr << "A numeric argument is out of range." << "@" << line << std::endl; - if(error == GL_INVALID_OPERATION) - std::cerr << "The specified operation is not allowed in the current state." << "@" << line << std::endl; - if(error == GL_INVALID_FRAMEBUFFER_OPERATION) - std::cerr << "The framebuffer object is not complete." << "@" << line << std::endl; - if(error == GL_OUT_OF_MEMORY) - std::cerr << "There is not enough memory left to execute the command." << "@" << line << std::endl; -#ifdef GL_STACK_UNDERFLOW - if(error == GL_STACK_UNDERFLOW) - std::cerr << "An attempt has been made to perform an operation that would cause an internal stack to underflow." << "@" << line << std::endl; -#endif -#ifdef GL_STACK_OVERFLOW - if(error == GL_STACK_OVERFLOW) - std::cerr << "An attempt has been made to perform an operation that would cause an internal stack to overflow." << "@" << line << std::endl; -#endif - error = ::glGetError(); - } -} } // namesapce Qt } // namespace CGAL diff --git a/GraphicsView/src/CGAL_Qt5/CMakeLists.txt b/GraphicsView/src/CGAL_Qt5/CMakeLists.txt index d0077a33c88..173fb87e2e9 100644 --- a/GraphicsView/src/CGAL_Qt5/CMakeLists.txt +++ b/GraphicsView/src/CGAL_Qt5/CMakeLists.txt @@ -5,107 +5,36 @@ if(NOT POLICY CMP0070 AND POLICY CMP0053) cmake_policy(SET CMP0053 OLD) endif() -if($ENV{CGAL_FAKE_PUBLIC_RELEASE}) - add_definitions( -DCGAL_FAKE_PUBLIC_RELEASE ) +include(CGAL_SetupCGAL_Qt5Dependencies) + +if(CGAL_Qt5_MISSING_DEPS) + message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.") + return() +endif() + +message( STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'" ) + +if(NOT CGAL_HEADER_ONLY) + collect_cgal_library( CGAL_Qt5 "${_CGAL_Qt5_MOC_FILES_private};${_CGAL_Qt5_RESOURCE_FILES_private}") +else() + collect_cgal_library( CGAL_Qt5 "") endif() if(CGAL_HEADER_ONLY) - cache_set(CGAL_Qt5_3RD_PARTY_LIBRARIES Qt5::OpenGL Qt5::Svg ) -else(CGAL_HEADER_ONLY) - find_package(Qt5 QUIET COMPONENTS OpenGL Svg) - find_package(OpenGL QUIET) + set(keyword "INTERFACE") +endif() - set(CGAL_Qt5_MISSING_DEPS "") - if(NOT Qt5OpenGL_FOUND) - set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL") - endif() - if(NOT Qt5Svg_FOUND) - set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg") - endif() - if(NOT Qt5_FOUND) - set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5") - endif() - if(NOT OPENGL_FOUND) - set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL") - endif() +CGAL_setup_CGAL_Qt5_dependencies( CGAL_Qt5 ${keyword}) - if(CGAL_Qt5_MISSING_DEPS) - message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.") - return() - endif() - - include_directories (BEFORE ../../include) - - message( STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'" ) - if(COMMAND add_config_flag) - set( CGAL_HAS_QT5 TRUE ) - add_config_flag( CGAL_HAS_QT5 ) - endif() - - get_property(QT_UIC_EXECUTABLE TARGET Qt5::uic PROPERTY LOCATION) - message( STATUS "OpenGL include: ${OPENGL_INCLUDE_DIR}" ) - message( STATUS "OpenGL libraries: ${OPENGL_LIBRARIES}" ) - message( STATUS "OpenGL definitions: ${OPENGL_DEFINITIONS}" ) - message( STATUS "Qt5Core include: ${Qt5Core_INCLUDE_DIRS}" ) - message( STATUS "Qt5 libraries: ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Svg_LIBRARIES} ${Qt5OpenGL_LIBRARIES}" ) - message( STATUS "Qt5Core definitions: ${Qt5Core_DEFINITIONS}" ) - message( STATUS "moc executable: ${QT_MOC_EXECUTABLE}" ) - message( STATUS "uic executable: ${QT_UIC_EXECUTABLE}" ) - - cache_set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ) - cache_set(CGAL_Qt5_3RD_PARTY_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ) - cache_set(CGAL_Qt5_3RD_PARTY_DEFINITIONS ${QT_DEFINITIONS} ${OPENGL_DEFINITIONS} ) - - set(mocfiles "") - set(RESOURCE_FILES "") - - foreach (package ${CGAL_CONFIGURED_PACKAGES} ) - file(GLOB PACKAGE_QTMOC_FILES "${package}/src/CGAL_Qt5/*.qtmoc.cmake") - list(SORT PACKAGE_QTMOC_FILES) - foreach(package_qtmoc_file ${PACKAGE_QTMOC_FILES}) - # includes 'moccing' for sources/headers in package + collects lists of moc-files for dependency (to properly build the lib) - include(${package_qtmoc_file}) - # message(STATUS QTMOC------------FILE: ${package_qtmoc_file}) - - endforeach() - endforeach() - - foreach(mocfile ${mocfiles}) - list(APPEND additional_files ${mocfile}) - endforeach() - foreach(resfile ${RESOURCE_FILES}) - list(APPEND additional_files ${resfile}) - endforeach() - -# message(STATUS "Additional input files: ${additional_files}") - - use_essential_libs() - - include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS} ) - - link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) - - add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} ) -endif(CGAL_HEADER_ONLY) - -collect_cgal_library( CGAL_Qt5 "${additional_files}") - -if (NOT CGAL_HEADER_ONLY) - - qt5_use_modules(CGAL_Qt5 OpenGL Svg) - - add_dependencies( CGAL_Qt5 CGAL ) - - # CGAL_Qt5 only depends on CGAL in DEBUG, but we still link it in - # both build types. - target_link_libraries( CGAL_Qt5 CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt5_3RD_PARTY_LIBRARIES} ) - -else() - - install(DIRECTORY "../../include/CGAL/Qt/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/include/CGAL/Qt") - install(DIRECTORY "../../demo/resources/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/demo/resources") - install(DIRECTORY "../../demo/icons/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/demo/icons") +if(COMMAND add_config_flag) + set( CGAL_HAS_QT5 TRUE ) + add_config_flag( CGAL_HAS_QT5 ) +endif() +if (CGAL_HEADER_ONLY) + install(DIRECTORY "../../include/CGAL/Qt/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/include/CGAL/Qt" COMPONENT CGAL_Qt5) + install(DIRECTORY "../../demo/resources/" DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/resources" COMPONENT CGAL_Qt5) + install(DIRECTORY "../../demo/icons/" DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/icons" COMPONENT CGAL_Qt5) endif() message("libCGAL_Qt5 is configured") diff --git a/Inscribed_areas/Largest_empty_rect_2.dxy b/Inscribed_areas/Largest_empty_rect_2.dxy deleted file mode 100644 index 7a3270454d5..00000000000 --- a/Inscribed_areas/Largest_empty_rect_2.dxy +++ /dev/null @@ -1,1218 +0,0 @@ -# Doxyfile 1.4.2 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Largest_empty_rect_2 - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. - -SHOW_DIRECTORIES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the progam writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = include/CGAL - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = examples/Largest_empty_rect_2 - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = YES - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/Inscribed_areas/todo.txt b/Inscribed_areas/TODO similarity index 100% rename from Inscribed_areas/todo.txt rename to Inscribed_areas/TODO diff --git a/Inscribed_areas/doc/Inscribed_areas/CGAL/Extremal_polygon_traits_2.h b/Inscribed_areas/doc/Inscribed_areas/CGAL/Extremal_polygon_traits_2.h index a1b3d20a151..4cbe9351891 100644 --- a/Inscribed_areas/doc/Inscribed_areas/CGAL/Extremal_polygon_traits_2.h +++ b/Inscribed_areas/doc/Inscribed_areas/CGAL/Extremal_polygon_traits_2.h @@ -23,8 +23,7 @@ be inscribed into a given convex polygon \f$ P\f$ using the function */ template< typename K > -class Extremal_polygon_area_traits_2 { -public: +struct Extremal_polygon_area_traits_2 { /// \name Types /// @{ @@ -128,8 +127,7 @@ k\f$-gon \f$ P_k\f$ that can be inscribed into a given convex polygon */ template< typename K > -class Extremal_polygon_perimeter_traits_2 { -public: +struct Extremal_polygon_perimeter_traits_2 { /// \name Types /// @{ diff --git a/Installation/CGALConfig.cmake b/Installation/CGALConfig.cmake new file mode 100644 index 00000000000..8b228bdf3eb --- /dev/null +++ b/Installation/CGALConfig.cmake @@ -0,0 +1,6 @@ +# +# This file points to the CGALConfig.cmake for a header-only +# CGAL installation. +# + +include(${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index b2f4d35b321..477c6cdb340 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -35,12 +35,11 @@ include(GNUInstallDirs) if(CMAKE_MAJOR_VERSION GREATER 2) # In header only mode, we use INTERFACE libraries, which was introduced in cmake 3.0. # Thus this option is only enabled for cmake >= 3.0. - option(CGAL_HEADER_ONLY "Enable the header only version of CGAL" OFF ) if (CGAL_HEADER_ONLY) set(CGAL_HEADER_ONLY TRUE CACHE BOOL "Enable cgal header only" FORCE) add_definitions(-DCGAL_HEADER_ONLY) - endif (CGAL_HEADER_ONLY) + endif() endif() @@ -200,7 +199,7 @@ if ( CGAL_BRANCH_BUILD ) file(REMOVE ${CMAKE_BINARY_DIR}/include/CGAL/version.h) string(TIMESTAMP CGAL_CREATED_RELEASE_DATE "%Y%m%d") - configure_file(${CGAL_INSTALLATION_PACKAGE_DIR}/config/version.h.in ${CMAKE_BINARY_DIR}/include/CGAL/version.h @ONLY) + configure_file(${CGAL_INSTALLATION_PACKAGE_DIR}/cmake/modules/config/version.h.in ${CMAKE_BINARY_DIR}/include/CGAL/version.h @ONLY) # # Duplicate files @@ -551,12 +550,18 @@ message( "== Generate version files (DONE) ==\n") # -= External libraries =- # #-------------------------------------------------------------------------------------------------- - -message("== Set up flags ==") -include(CGAL_SetupFlags) +if( RUNNING_CGAL_AUTO_TEST ) + message("== Set up flags ==") -message("== Set up flags (DONE) ==\n") + # Ugly hack to be compatible with current CGAL testsuite process (as of + # Nov. 2017). -- Laurent Rineau + include(CGAL_SetupFlags) + + message("== Set up flags (DONE) ==\n") +else() + include( CGAL_display_flags ) +endif() message("== Detect external libraries ==") @@ -673,7 +678,9 @@ option( CGAL_ENABLE_PRECONFIG "Select to allow to preconfiguration of external l # this; e.g. in MPFI/RS in Algebraic_kernel_d. For these cases CGAL # and the example/test must be configured with MPFI (just one is not sufficient) -include(CGAL_SetupDependencies) +if(NOT CGAL_HEADER_ONLY) + include(CGAL_SetupDependencies) +endif() message("== Detect external libraries (DONE) ==\n") @@ -683,6 +690,7 @@ message("== Detect external libraries (DONE) ==\n") # #-------------------------------------------------------------------------------------------------- +if(NOT CGAL_HEADER_ONLY) # The variables set are the #defines expected by compiler_config.h # Note: CMake will not notice when files are added or removed # but this is probably OK for the installation procedure. @@ -698,7 +706,7 @@ macro(add_config_flag flag) endmacro() if(NOT CMAKE_CROSSCOMPILING) - file(GLOB all_config_tests "${CGAL_INSTALLATION_PACKAGE_DIR}/config/testfiles/*.cpp") + file(GLOB all_config_tests "${CGAL_MODULES_DIR}/config/testfiles/*.cpp") list(SORT all_config_tests) file(WRITE ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h "//\n// compiler_config.h is included by CGAL headers to load the needed compiler settings.\n//\n// DO NOT EDIT compiler_config.h. It is generated by CMake.\n//\n\n") @@ -742,6 +750,10 @@ if ( RUNNING_CGAL_AUTO_TEST AND MSVC ) file( APPEND "${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h" "#include \n\n" ) endif() +message("== Write compiler_config.h (DONE) ==\n") + +endif(NOT CGAL_HEADER_ONLY) + #-------------------------------------------------------------------------------------------------- # # -= Installation Setup =- @@ -760,7 +772,7 @@ set ( CGAL_INSTALL_BIN_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING "The folder where CGAL user-side scripts will be installed, relative to CMAKE_INSTALL_PREFIX" ) -set ( CGAL_INSTALL_CMAKE_DIR "${CGAL_INSTALL_LIB_DIR}/CGAL" +set ( CGAL_INSTALL_CMAKE_DIR "${CGAL_INSTALL_LIB_DIR}/cmake/CGAL" CACHE STRING "The folder where CGAL CMake modules will be installed, relative to CMAKE_INSTALL_PREFIX" ) @@ -772,8 +784,6 @@ set ( CGAL_INSTALL_MAN_DIR "${CMAKE_INSTALL_DATAROOTDIR}/man/man1" CACHE STRING "The folder where manual pages for CGAL scripts will be installed, relative to CMAKE_INSTALL_PREFIX" ) -message("== Write compiler_config.h (DONE) ==\n") - #-------------------------------------------------------------------------------------------------- # # -= Build =- @@ -788,7 +798,9 @@ set(CGAL_LIBRARIES_DIR ${CMAKE_BINARY_DIR}/lib) set(CGAL_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include) foreach (package ${CGAL_CONFIGURED_PACKAGES}) - set(CGAL_INCLUDE_DIRS ${CGAL_INCLUDE_DIRS} ${package}/include) + if(EXISTS ${package}/include) + set(CGAL_INCLUDE_DIRS ${CGAL_INCLUDE_DIRS} ${package}/include) + endif() endforeach() include_directories (${CGAL_INCLUDE_DIRS}) @@ -847,7 +859,12 @@ if (CGAL_BRANCH_BUILD AND CGAL_REPORT_DUPLICATE_FILES ) endif() -create_CGALconfig_files() +if(NOT CGAL_HEADER_ONLY) + create_CGALconfig_files() +else() + configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary_header_only.cmake.in" + "${CMAKE_BINARY_DIR}/CGALConfig.cmake" @ONLY) +endif() #-------------------------------------------------------------------------------------------------- # @@ -858,7 +875,7 @@ create_CGALconfig_files() # DESTINATION option is mandatory; skipping it breaks CPack! if(CGAL_INSTALL_DOC_DIR) - install(FILES AUTHORS CHANGES LICENSE LICENSE.FREE_USE LICENSE.GPL LICENSE.LGPL DESTINATION ${CGAL_INSTALL_DOC_DIR} ) + install(FILES AUTHORS changes.md LICENSE LICENSE.FREE_USE LICENSE.GPL LICENSE.LGPL DESTINATION ${CGAL_INSTALL_DOC_DIR} ) endif() #install all includes collected in trunk et cetera @@ -892,10 +909,17 @@ if ( ZLIB_IN_AUXILIARY ) endif() -install(FILES - ${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake - ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake - DESTINATION ${CGAL_INSTALL_CMAKE_DIR} ) +if(NOT CGAL_HEADER_ONLY) + install(FILES + ${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake + ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake + DESTINATION ${CGAL_INSTALL_CMAKE_DIR} ) +else() + install(FILES + ${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake + ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake + DESTINATION ${CGAL_INSTALL_CMAKE_DIR} ) +endif() if(CGAL_INSTALL_MAN_DIR) install(FILES auxiliary/cgal_create_cmake_script.1 DESTINATION ${CGAL_INSTALL_MAN_DIR} ) @@ -1085,7 +1109,7 @@ because IPE_FOUND is false.") if(NOT DEFINED CGAL_CHECK_SYNTAX_ONLY) execute_process(COMMAND - ${CMAKE_CXX_COMPILER} -x c++ -fsyntax-only ${CMAKE_CURRENT_SOURCE_DIR}/config/support/test_syntaxonly.cpp + ${CMAKE_CXX_COMPILER} -x c++ -fsyntax-only ${CGAL_MODULES_DIR}/config/support/test_syntaxonly.cpp ERROR_QUIET RESULT_VARIABLE ok) if(ok EQUAL 0) diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index 7c817e6a7f0..d50ef38cf46 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -15,30 +15,9 @@ set(CGAL_HEADER_ONLY "@CGAL_HEADER_ONLY@" ) # The code for including exported targets is different from # CGAL_Config_install.cmake. We do not have separate export files in # an installed version and we need to make sure that we are not -# currently building CGAL. Note that for CMake<=2.8.11 (detected by -# the absence of CMP0024), the else() condition is never used. -if(NOT POLICY CMP0024 OR NOT CGAL_BUILDING_LIBS) +# currently building CGAL. +if(NOT CGAL_BUILDING_LIBS) include("${CGAL_CONFIG_DIR}/CGALExports.cmake") - - macro(CGAL_get_property_optional VAR TARGET PROPERTY) - if(TARGET ${TARGET}) - get_property(${VAR} TARGET ${TARGET} PROPERTY ${PROPERTY}) - else() - set(${VAR} "") - endif() - endmacro() - - if(NOT MSVC AND NOT CGAL_HEADER_ONLY) - CGAL_get_property_optional(CGAL_LIBRARY CGAL::CGAL LOCATION) - CGAL_get_property_optional(CGAL_Core_LIBRARY CGAL::CGAL_Core LOCATION) - CGAL_get_property_optional(CGAL_ImageIO_LIBRARY CGAL::CGAL_ImageIO LOCATION) - CGAL_get_property_optional(CGAL_Qt5_LIBRARY CGAL::CGAL_Qt5 LOCATION) - else() - set(CGAL_LIBRARY "") - set(CGAL_Core_LIBRARY "") - set(CGAL_ImageIO_LIBRARY "") - set(CGAL_Qt5_LIBRARY "") - endif() else() # We are currently in a CGAL Build and CGALExports.cmake has not # necessarily been created yet. Just alias the targets. Also don't @@ -48,9 +27,6 @@ else() macro(CGAL_alias_library lib) if(TARGET ${lib} AND NOT TARGET CGAL::${lib}) add_library(CGAL::${lib} ALIAS ${lib}) - set(${lib}_LIBRARY CGAL::${lib}) - else() - set(${lib}_LIBRARY "") endif() endmacro() @@ -60,6 +36,19 @@ else() CGAL_alias_library(CGAL_Qt5) endif() +macro(CGAL_set_LIB_LIBRARY_var lib) + if(TARGET CGAL::${lib}) + set(${lib}_LIBRARY CGAL::${lib}) + else() + set(${lib}_LIBRARY "") + endif() +endmacro() + +CGAL_set_LIB_LIBRARY_var(CGAL) +CGAL_set_LIB_LIBRARY_var(CGAL_Core) +CGAL_set_LIB_LIBRARY_var(CGAL_ImageIO) +CGAL_set_LIB_LIBRARY_var(CGAL_Qt5) + # Check for possible config files of our libraries and include them. file(GLOB CGAL_CONFIG_FILES LIST_DIRECTORIES false RELATIVE "${CGAL_CONFIG_DIR}" "${CGAL_CONFIG_DIR}/*LibConfig.cmake") @@ -130,47 +119,30 @@ macro(check_cgal_component COMPONENT) set( CHECK_CGAL_ERROR_TAIL "" ) else( "${CGAL_LIB}" STREQUAL "CGAL" ) if ( WITH_${CGAL_LIB} ) - if(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB}) + if(TARGET CGAL::${CGAL_LIB}) if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5") - find_package(Qt5 QUIET COMPONENTS OpenGL Svg) - find_package(OpenGL QUIET) - - set(CGAL_Qt5_MISSING_DEPS "") - if(NOT Qt5OpenGL_FOUND) - set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL") - endif() - if(NOT Qt5Svg_FOUND) - set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg") - endif() - if(NOT Qt5_FOUND) - set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5") - endif() - if(NOT OPENGL_FOUND) - set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL") - endif() + + include("${CGAL_MODULES_DIR}/CGAL_SetupCGAL_Qt5Dependencies.cmake") if(CGAL_Qt5_MISSING_DEPS) - set( ${CGAL_LIB}_FOUND FALSE ) + set( CGAL_Qt5_FOUND FALSE ) message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.") else() - set( ${CGAL_LIB}_FOUND TRUE ) - if (CGAL_HEADER_ONLY) - include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake") - endif() + set( CGAL_Qt5_FOUND TRUE ) endif() else("${CGAL_LIB}" STREQUAL "CGAL_Qt5") # Librairies that have no dependencies set( ${CGAL_LIB}_FOUND TRUE ) endif("${CGAL_LIB}" STREQUAL "CGAL_Qt5") - else(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB}) + else(TARGET CGAL::${CGAL_LIB}) set( ${CGAL_LIB}_FOUND FALSE ) set( CHECK_${CGAL_LIB}_ERROR_TAIL " CGAL was configured with WITH_${CGAL_LIB}=ON, but one of the dependencies of ${CGAL_LIB} was not configured properly." ) - endif(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB}) + endif(TARGET CGAL::${CGAL_LIB}) else( WITH_${CGAL_LIB} ) set( ${CGAL_LIB}_FOUND FALSE ) set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." ) endif( WITH_${CGAL_LIB} ) - endif( "${CGAL_LIB}" STREQUAL "CGAL" ) + endif() if ( NOT ${CGAL_LIB}_FOUND AND CHECK_CGAL_COMPONENT_MSG_ON_ERROR ) message( ${CHECK_CGAL_COMPONENT_ERROR_TYPE} "${CHECK_CGAL_COMPONENT_ERROR_TITLE} The ${CGAL_LIB} library was not configured.${CHECK_${CGAL_LIB}_ERROR_TAIL}" ) @@ -198,3 +170,15 @@ set(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES "@CGAL_SUPPORTING_3RD_PARTY_LIBRARIES@") set(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "@CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES@") set(CGAL_DISABLE_GMP "@CGAL_DISABLE_GMP@") + +include(${CGAL_MODULES_DIR}/CGAL_CreateSingleSourceCGALProgram.cmake) +include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) + +# Temporary? Change the CMAKE module path +cgal_setup_module_path() + +if( RUNNING_CGAL_AUTO_TEST ) + # Ugly hack to be compatible with current CGAL testsuite process (as of + # Nov. 2017). -- Laurent Rineau + include(CGAL_SetupFlags) +endif() diff --git a/Installation/cmake/modules/CGALConfig_binary_header_only.cmake.in b/Installation/cmake/modules/CGALConfig_binary_header_only.cmake.in new file mode 100644 index 00000000000..474864c0b7e --- /dev/null +++ b/Installation/cmake/modules/CGALConfig_binary_header_only.cmake.in @@ -0,0 +1,5 @@ +# +# This file points to the CGALConfig.cmake for header-only CGAL. +# + +include(@CGAL_INSTALLATION_PACKAGE_DIR@/lib/cmake/CGAL/CGALConfig.cmake) diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index ea644ba9ade..8c5031762a8 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -91,42 +91,25 @@ macro(check_cgal_component COMPONENT) endif() if ( WITH_${CGAL_LIB} ) - if(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB}) + if(TARGET CGAL::${CGAL_LIB}) if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5") - find_package(Qt5 QUIET COMPONENTS OpenGL Svg) - find_package(OpenGL QUIET) - - set(CGAL_Qt5_MISSING_DEPS "") - if(NOT Qt5OpenGL_FOUND) - set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL") - endif() - if(NOT Qt5Svg_FOUND) - set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg") - endif() - if(NOT Qt5_FOUND) - set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5") - endif() - if(NOT OPENGL_FOUND) - set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL") - endif() + + include("${CGAL_MODULES_DIR}/CGAL_SetupCGAL_Qt5Dependencies.cmake") if(CGAL_Qt5_MISSING_DEPS) - set( ${CGAL_LIB}_FOUND FALSE ) + set( CGAL_Qt5_FOUND FALSE ) message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.") else() - set( ${CGAL_LIB}_FOUND TRUE ) - if (CGAL_HEADER_ONLY) - include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake") - endif() + set( CGAL_Qt5_FOUND TRUE ) endif() else("${CGAL_LIB}" STREQUAL "CGAL_Qt5") # Librairies that have no dependencies set( ${CGAL_LIB}_FOUND TRUE ) endif("${CGAL_LIB}" STREQUAL "CGAL_Qt5") - else(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB}) + else(TARGET CGAL::${CGAL_LIB}) set( ${CGAL_LIB}_FOUND FALSE ) set( CHECK_${CGAL_LIB}_ERROR_TAIL " CGAL was configured with WITH_${CGAL_LIB}=ON, but one of the dependencies of ${CGAL_LIB} was not configured properly." ) - endif(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB}) + endif(TARGET CGAL::${CGAL_LIB}) else( WITH_${CGAL_LIB} ) set( ${CGAL_LIB}_FOUND FALSE ) set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." ) @@ -159,3 +142,15 @@ set(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES "@CGAL_SUPPORTING_3RD_PARTY_LIBRARIES@") set(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "@CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES@") set(CGAL_DISABLE_GMP "@CGAL_DISABLE_GMP@") + +include(${CGAL_MODULES_DIR}/CGAL_CreateSingleSourceCGALProgram.cmake) +include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) + +# Temporary? Change the CMAKE module path +cgal_setup_module_path() + +if( RUNNING_CGAL_AUTO_TEST ) + # Ugly hack to be compatible with current CGAL testsuite process (as of + # Nov. 2017). -- Laurent Rineau + include(CGAL_SetupFlags) +endif() diff --git a/Installation/cmake/modules/CGAL_Common.cmake b/Installation/cmake/modules/CGAL_Common.cmake index 2110d9c3aa1..68a9791fde7 100644 --- a/Installation/cmake/modules/CGAL_Common.cmake +++ b/Installation/cmake/modules/CGAL_Common.cmake @@ -1,4 +1,4 @@ -include(CGAL_Macros) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) if(RUNNING_CGAL_AUTO_TEST) # Just to avoid a warning from CMake if that variable is set on the command line... @@ -43,7 +43,7 @@ if( NOT CGAL_COMMON_FILE_INCLUDED ) hide_variable(CMAKE_UNAME) # Optionally setup the Visual Leak Detector - include(CGAL_SetupVLD) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupVLD.cmake) CGAL_SetupVLD() if(VLD_FOUND) message(STATUS "Visual Leak Detector (VLD) is enabled.") diff --git a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake index 8168a4baf47..b6b7c44bd52 100644 --- a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake +++ b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake @@ -1,4 +1,9 @@ -include(CGAL_add_test) +if(CGAL_CreateSingleSourceCGALProgram_included) + return() +endif(CGAL_CreateSingleSourceCGALProgram_included) +set(CGAL_CreateSingleSourceCGALProgram_included TRUE) + +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_add_test.cmake) include(CMakeParseArguments) function(create_single_source_cgal_program firstfile ) @@ -11,7 +16,7 @@ function(create_single_source_cgal_program firstfile ) set(NO_TESTING ${create_single_source_cgal_program_NO_TESTING}) if(NOT IS_ABSOLUTE "${firstfile}") - set(firstfile "${CGAL_CURRENT_SOURCE_DIR}/${firstfile}") + set(firstfile "${CMAKE_CURRENT_SOURCE_DIR}/${firstfile}") endif() get_filename_component(exe_name ${firstfile} NAME_WE) @@ -52,22 +57,22 @@ function(create_single_source_cgal_program firstfile ) set(NO_TESTING TRUE) endif() - if(NOT NO_TESTING) - cgal_add_test(${exe_name}) - endif(NOT NO_TESTING) + if(POLICY CMP0064) + # CMake 3.4 or later + if(NOT NO_TESTING) + cgal_add_test(${exe_name}) + else() + cgal_add_test(${exe_name} NO_EXECUTION) + endif() + endif() add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} ) - # Link the executable to CGAL and third-party libraries - if ( CGAL_AUTO_LINK_ENABLED ) - - target_link_libraries(${exe_name} ${CGAL_3RD_PARTY_LIBRARIES} ) - - else() - - target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) - + target_link_libraries(${exe_name} PRIVATE CGAL::CGAL) + if(CGAL_3RD_PARTY_LIBRARIES) + target_link_libraries(${exe_name} PRIVATE ${CGAL_3RD_PARTY_LIBRARIES}) endif() + else() message(AUTHOR_WARNING "The executable ${exe_name} will not be created because the source file ${firstfile} does not exist.") endif() diff --git a/Installation/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake b/Installation/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake index 9dac365114f..ca4470a2124 100644 --- a/Installation/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake +++ b/Installation/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake @@ -12,7 +12,7 @@ # CGAL_TAUCS_LIBRARIES_DIR -list of folders (using full path name) containing # TAUCS (and optionaly BLAS and LAPACK) libraries -include(CGAL_Macros) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) if ( NOT CGAL_TAUCS_FOUND ) diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index c0520f3ea44..5836bde26b5 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -159,16 +159,22 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) set ( ${LIB}_VERSION "unknown" ) - try_run( ${LIB}_RUN_RES - ${LIB}_COMPILE_RES - "${CMAKE_BINARY_DIR}" - "${CGAL_INSTALLATION_PACKAGE_DIR}/config/support/print_${LIB}_version.cpp" - CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${${PKG}_INCLUDE_DIR};${${PKG}_DEPENDENCY_INCLUDE_DIR}" - "-DLINK_LIBRARIES:STRING=${${PKG}_LIBRARIES};${${PKG}_DEPENDENCY_LIBRARIES}" - "-DLINK_DIRECTORIES:STRING=${${PKG}_LIBRARIES_DIR};${${PKG}_DEPENDENCY_LIBRARIES_DIR}" - OUTPUT_VARIABLE ${LIB}_OUTPUT - ) - + if(NOT CMAKE_CROSSCOMPILING) + if(EXISTS "${CGAL_MODULES_DIR}/config/support/print_${LIB}_version.cpp") + try_run( ${LIB}_RUN_RES + ${LIB}_COMPILE_RES + "${CMAKE_BINARY_DIR}" + "${CGAL_MODULES_DIR}/config/support/print_${LIB}_version.cpp" + CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${${PKG}_INCLUDE_DIR};${${PKG}_DEPENDENCY_INCLUDE_DIR}" + "-DLINK_LIBRARIES:STRING=${${PKG}_LIBRARIES};${${PKG}_DEPENDENCY_LIBRARIES}" + "-DLINK_DIRECTORIES:STRING=${${PKG}_LIBRARIES_DIR};${${PKG}_DEPENDENCY_LIBRARIES_DIR}" + OUTPUT_VARIABLE ${LIB}_OUTPUT + ) + endif() + else() + set(${LIB}_COMPILE_RES FALSE) + message(STATUS "CROSS-COMPILING!") + endif() if ( ${LIB}_COMPILE_RES ) if ( ${LIB}_RUN_RES EQUAL "0" ) @@ -268,7 +274,9 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) message (STATUS "Requested component: ${component}") if(WITH_CGAL_${component}) - if(TARGET CGAL_${component}) + if(TARGET CGAL::CGAL_${component}) + add_to_list( CGAL_LIBRARIES CGAL::CGAL_${component} ) + elseif(TARGET CGAL_${component}) add_to_list( CGAL_LIBRARIES CGAL_${component} ) else() add_to_list( CGAL_LIBRARIES ${CGAL_${component}_LIBRARY} ) @@ -298,7 +306,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endif() if (${component} STREQUAL "Qt5") - find_package(OpenGL QUIET) find_package(Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools QUIET) endif() @@ -335,7 +342,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) if (${component} STREQUAL "Qt5") set(CGAL_${component}_FOUND TRUE) - find_package(OpenGL QUIET) find_package(Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools QUIET) endif() ####message( STATUS "External library ${vlib} after find") diff --git a/Installation/cmake/modules/CGAL_Qt5_moc_and_resource_files.cmake b/Installation/cmake/modules/CGAL_Qt5_moc_and_resource_files.cmake new file mode 100644 index 00000000000..8be8a352486 --- /dev/null +++ b/Installation/cmake/modules/CGAL_Qt5_moc_and_resource_files.cmake @@ -0,0 +1,26 @@ +if(CGAL_Qt5_moc_and_resource_files_included) + return() +endif() +set(CGAL_Qt5_moc_and_resource_files_included TRUE) + +qt5_wrap_cpp(_CGAL_Qt5_MOC_FILES_private + ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h + ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h + ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsItem.h + ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewInput.h) + +# qrc files (resources files, that contain icons, at least) +if(EXISTS ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/CGAL.qrc) + qt5_add_resources (_CGAL_Qt5_RESOURCE_FILES_private + ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/CGAL.qrc + ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/Input.qrc + ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/File.qrc + ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/Triangulation_2.qrc) +else() + # Installed version, in CMake resources + qt5_add_resources (_CGAL_Qt5_RESOURCE_FILES_private + ${CGAL_MODULES_DIR}/demo/resources/CGAL.qrc + ${CGAL_MODULES_DIR}/demo/icons/Input.qrc + ${CGAL_MODULES_DIR}/demo/icons/File.qrc + ${CGAL_MODULES_DIR}/demo/icons/Triangulation_2.qrc) +endif() diff --git a/Installation/cmake/modules/CGAL_SCM.cmake b/Installation/cmake/modules/CGAL_SCM.cmake index 6fafc60c7aa..2e826779307 100644 --- a/Installation/cmake/modules/CGAL_SCM.cmake +++ b/Installation/cmake/modules/CGAL_SCM.cmake @@ -1,50 +1,58 @@ # Common settings for CGAL cmake scripts -if( NOT CGAL_SCM_FILE_INCLUDED ) - set(CGAL_SCM_FILE_INCLUDED 1 ) +if(CGAL_SCM_FILE_INCLUDED) + return() +endif() +set(CGAL_SCM_FILE_INCLUDED 1) # CGAL_SCM_NAME can be either git or n/a as an indicator if we have a # build system or not # TODO: make that scm agnostic and turn it into a boolean -set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}") -set(GIT_DIR "${GIT_PARENT_DIR}/.git") -if (EXISTS "${GIT_DIR}") - set( CGAL_SCM_NAME "git" ) -else() - while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories - set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") - get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) - if( "${GIT_PARENT_DIR}" STREQUAL "${GIT_PREVIOUS_PARENT}" ) - # We have reached the root directory, we are not in git - set( _refspecvar "GITDIR-NOTFOUND" ) - set( _hashvar "GITDIR-NOTFOUND" ) - set( CGAL_SCM_NAME "n/a" ) - break() - else() - set( GIT_DIR "${GIT_PARENT_DIR}/.git" ) - set( CGAL_SCM_NAME "git" ) - endif() - endwhile() -endif() +function(CGAL_detect_git GIT_PARENT_DIR) + set(GIT_DIR "${GIT_PARENT_DIR}/.git") + if (EXISTS "${GIT_DIR}") + set( CGAL_SCM_NAME "git" ) + else() + while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories + set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") + get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) + if( "${GIT_PARENT_DIR}" STREQUAL "${GIT_PREVIOUS_PARENT}" ) + # We have reached the root directory, we are not in git + set( _refspecvar "GITDIR-NOTFOUND" ) + set( _hashvar "GITDIR-NOTFOUND" ) + set( CGAL_SCM_NAME "n/a" ) + break() + else() + set( GIT_DIR "${GIT_PARENT_DIR}/.git" ) + set( CGAL_SCM_NAME "git" ) + endif() + endwhile() + endif() -if ( "${CGAL_SCM_NAME}" STREQUAL "git" ) - find_program(GIT_EXECUTABLE git DOC "git command line client") - execute_process(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_DIR} rev-parse --symbolic --abbrev-ref HEAD - OUTPUT_VARIABLE CGAL_GIT_BRANCH - OUTPUT_STRIP_TRAILING_WHITESPACE) + if ( "${CGAL_SCM_NAME}" STREQUAL "git" ) + find_program(GIT_EXECUTABLE git DOC "git command line client") + execute_process(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_DIR} rev-parse --symbolic --abbrev-ref HEAD + OUTPUT_VARIABLE CGAL_GIT_BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE) - set( CGAL_SCM_BRANCH_NAME "${CGAL_GIT_BRANCH}" ) + set( CGAL_SCM_BRANCH_NAME "${CGAL_GIT_BRANCH}" ) - execute_process(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_DIR} rev-parse HEAD - OUTPUT_VARIABLE CGAL_GIT_HASH - OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_DIR} rev-parse HEAD + OUTPUT_VARIABLE CGAL_CREATED_GIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE) - # backward compatible - set( CGAL_CREATED_SVN_REVISION "99999" ) -else() - set( CGAL_SCM_BRANCH_NAME "n/a") - set( CGAL_CREATED_GIT_HASH "n/a" ) - set( CGAL_CREATED_SVN_REVISION "n/a" ) -endif() + # backward compatible + set( CGAL_CREATED_SVN_REVISION "99999" ) + else() + set( CGAL_SCM_BRANCH_NAME "n/a" ) + set( CGAL_CREATED_GIT_HASH "n/a" ) + set( CGAL_CREATED_SVN_REVISION "n/a" ) + endif() + + # export the variables to PARENT_SCOPE + set( CGAL_SCM_NAME ${CGAL_SCM_NAME} PARENT_SCOPE ) + set( CGAL_SCM_BRANCH_NAME ${CGAL_SCM_BRANCH_NAME} PARENT_SCOPE ) + set( CGAL_CREATED_GIT_HASH ${CGAL_CREATED_GIT_HASH} PARENT_SCOPE ) + set( CGAL_CREATED_SVN_REVISION ${CGAL_CREATED_SVN_REVISION} PARENT_SCOPE ) +endfunction() -endif() diff --git a/Installation/cmake/modules/CGAL_SetupBoost.cmake b/Installation/cmake/modules/CGAL_SetupBoost.cmake index c392d09e78e..9c6da250b3c 100644 --- a/Installation/cmake/modules/CGAL_SetupBoost.cmake +++ b/Installation/cmake/modules/CGAL_SetupBoost.cmake @@ -1,6 +1,21 @@ -if ( NOT CGAL_Boost_Setup ) +#.rst: +# CGAL_SetupBoost +# --------------- +# +# The module searchs for the `Boost` headers and library, by calling +# +# .. code-block:: cmake +# +# find_package(Boost) +# +# and defines the function :command:`use_CGAL_Boost_support`. - include(CGAL_TweakFindBoost) +if ( CGAL_Boost_Setup ) + return() +endif() +set ( CGAL_Boost_Setup TRUE ) + +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_TweakFindBoost.cmake) set ( CGAL_requires_Boost_libs TRUE ) if ( DEFINED MSVC_VERSION AND "${MSVC_VERSION}" GREATER 1800) @@ -8,7 +23,7 @@ if ( NOT CGAL_Boost_Setup ) else() try_run( CGAL_test_cpp_version_RUN_RES CGAL_test_cpp_version_COMPILE_RES "${CMAKE_BINARY_DIR}" - "${CGAL_INSTALLATION_PACKAGE_DIR}/config/support/CGAL_test_cpp_version.cpp" + "${CGAL_MODULES_DIR}/config/support/CGAL_test_cpp_version.cpp" RUN_OUTPUT_VARIABLE CGAL_cplusplus) message(STATUS "__cplusplus is ${CGAL_cplusplus}") if(NOT CGAL_test_cpp_version_RUN_RES) @@ -17,40 +32,54 @@ if ( NOT CGAL_Boost_Setup ) endif() endif() - if (CGAL_requires_Boost_libs) - find_package( Boost 1.48 REQUIRED thread system ) - else() - find_package( Boost 1.48 REQUIRED ) - endif() - - if(Boost_FOUND) - if(DEFINED Boost_DIR AND NOT Boost_DIR) - # Unset that cache variable that is set in the cache by FindBoost - # (while it was searching for boost-cmake). - unset(Boost_DIR CACHE) - set(Boost_NO_BOOST_CMAKE TRUE CACHE INTERNAL "Avoid future search of boost-cmake") - endif() - endif() - - message( STATUS "Boost include: ${Boost_INCLUDE_DIRS}" ) - message( STATUS "Boost libraries: ${Boost_LIBRARIES}" ) - message( STATUS "Boost definitions: ${Boost_DEFINITIONS}" ) - - set ( CGAL_USE_BOOST 1 ) - - include(CGAL_Macros) - - add_to_cached_list(CGAL_3RD_PARTY_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ) - add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES_DIRS ${Boost_LIBRARY_DIRS} ) - add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS ${Boost_DEFINITIONS} ) - - if ( NOT MSVC ) - add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES ${Boost_LIBRARIES} ) - endif() - - message( STATUS "USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'" ) - - set ( CGAL_Boost_Setup TRUE ) - +if (CGAL_requires_Boost_libs) + find_package( Boost 1.48 REQUIRED thread system ) +else() + find_package( Boost 1.48 REQUIRED ) endif() +if(Boost_FOUND) + if(DEFINED Boost_DIR AND NOT Boost_DIR) + # Unset that cache variable that is set in the cache by FindBoost + # (while it was searching for boost-cmake). + unset(Boost_DIR CACHE) + set(Boost_NO_BOOST_CMAKE TRUE CACHE INTERNAL "Avoid future search of boost-cmake") + endif() +endif() + +message( STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}" ) +message( STATUS "Boost libraries: ${Boost_LIBRARIES}" ) + +set ( CGAL_USE_BOOST 1 ) + + +#.rst: +# Provided Functions +# ^^^^^^^^^^^^^^^^^^ +# +# .. command:: use_CGAL_Boost_support +# +# Link the target with the `Boost` libraries:: +# +# use_CGAL_Boost_support( target [INTERFACE] ) +# +# If the option ``INTERFACE`` is passed, the dependencies are +# added using :command:`target_link_libraries` with the ``INTERFACE`` +# keyword, or ``PUBLIC`` otherwise. + +function(use_CGAL_Boost_support target) + if(ARGV1 STREQUAL INTERFACE) + set(keyword INTERFACE) + else() + set(keyword PUBLIC) + endif() + if(NOT Boost_FOUND) + message(FATAL_ERROR "use_CGAL_Boost_support is use whereas Boost_FOUND is false.") + return() + endif() + if(NOT CGAL_Boost_USE_STATIC_LIBS AND CGAL_AUTO_LINK_ENABLED) + target_compile_definitions(${target} ${keyword} BOOST_ALL_DYN_LINK=1) + endif() + target_include_directories(${target} SYSTEM ${keyword} ${Boost_INCLUDE_DIRS}) + target_link_libraries(${target} ${keyword} ${Boost_LIBRARIES}) +endfunction() diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake new file mode 100644 index 00000000000..a784d745370 --- /dev/null +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -0,0 +1,150 @@ +#.rst: +# CGAL_SetupCGALDependencies +# -------------------------- +# +# The module searchs for the dependencies of the CGAL library: +# - the `GMP/MPFR` couple, +# - `LEDA` (optional) +# - the `Boost` libraries (mostly the header-only libraries) +# +# and defines the variable :variable:`CGAL_FOUND` and the function +# :command:`CGAL_setup_CGAL_dependencies`. +# +# Module Input Variables +# ^^^^^^^^^^^^^^^^^^^^^^ +# .. variable:: CGAL_DISABLE_GMP +# +# If set, the `GMP` library will not be used. If +# :variable:`WITH_LEDA` is not used either, a efficient exact +# number types are used by CGAL kernels for exact computation. +# +# .. variable:: WITH_LEDA +# +# If set, the `LEDA` library will be searched and used to provide +# the exact number types used by CGAL kernels. +# +# .. variable:: CGAL_HEADER_ONLY +# +# Set this variable if you are using the CGAL libraries as +# header-only libraries. +# +if(CGAL_SetupCGALDependencies_included) + return() +endif() +set(CGAL_SetupCGALDependencies_included TRUE) + +#.rst: +# Used Modules +# ^^^^^^^^^^^^ +# - :module:`CGAL_SetupGMP` +if(NOT CGAL_DISABLE_GMP) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupGMP.cmake) +endif() + +#.rst: +# - :module:`CGAL_SetupLEDA` +if(WITH_LEDA) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupLEDA.cmake) +endif() + +#.rst: +# - :module:`CGAL_SetupBoost` +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupBoost.cmake) + +#.rst: +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# .. variable:: CGAL_FOUND +# +# Set to `TRUE` if the dependencies of CGAL were found. +if(Boost_FOUND) + set(CGAL_FOUND TRUE) +endif() + +#.rst: +# +# Provided Functions +# ^^^^^^^^^^^^^^^^^^ +# +# .. command:: CGAL_setup_CGAL_dependencies +# +# Link the target with the dependencies of CGAL:: +# +# CGAL_setup_CGAL_dependencies( target [INTERFACE] ) +# +# If the option ``INTERFACE`` is passed, the dependencies are +# added using :command:`target_link_libraries` with the ``INTERFACE`` +# keyword, or ``PUBLIC`` otherwise. +# +function(CGAL_setup_CGAL_dependencies target) + if(ARGV1 STREQUAL INTERFACE) + set(keyword INTERFACE) + else() + set(keyword PUBLIC) + endif() + if(NOT CGAL_DISABLE_GMP) + use_CGAL_GMP_support(${target} ${keyword}) + set(CGAL_USE_GMP TRUE CACHE INTERNAL "CGAL library is configured to use GMP") + set(CGAL_USE_MPFR TRUE CACHE INTERNAL "CGAL library is configured to use MPFR") + endif() + + if(WITH_LEDA) + use_CGAL_LEDA_support(${target} ${keyword}) + endif() + + if (CGAL_HEADER_ONLY) + target_compile_definitions(${target} ${keyword} CGAL_HEADER_ONLY=1) + endif() + if (RUNNING_CGAL_AUTO_TEST) + target_compile_definitions(${target} ${keyword} CGAL_TEST_SUITE=1) + endif() + + use_CGAL_Boost_support(${target} ${keyword}) + + foreach(dir ${CGAL_INCLUDE_DIRS}) + target_include_directories(${target} ${keyword} + $) + endforeach() + target_include_directories(${target} ${keyword} + $) + + # Now setup compilation flags + if(MSVC) + target_compile_options(${target} ${keyword} + "-D_CRT_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_DEPRECATE;-D_CRT_SECURE_NO_WARNINGS;-D_SCL_SECURE_NO_WARNINGS" + "/fp:strict" + "/fp:except-" + "/wd4503" # Suppress warnings C4503 about "decorated name length exceeded" + "/bigobj" # Use /bigobj by default + ) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) + if(WIN32) + target_compile_options(${target} ${keyword} "/fp:strict") + else() + target_compile_options(${target} ${keyword} "-fp-model" "strict") + endif() + elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") + message( STATUS "Using SunPro compiler, using STLPort 4." ) + target_compile_options(${target} ${keyword} + "-features=extensions;-library=stlport4;-D_GNU_SOURCE") + target_link_libraries(${target} ${keyword} "-library=stlport4") + elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + if ( RUNNING_CGAL_AUTO_TEST ) + target_compile_options(${target} ${keyword} "-Wall") + endif() + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3) + message( STATUS "Using gcc version 4 or later. Adding -frounding-math" ) + target_compile_options(${target} ${keyword} "-frounding-math") + endif() + if ( "${GCC_VERSION}" MATCHES "^4.2" ) + message( STATUS "Using gcc version 4.2. Adding -fno-strict-aliasing" ) + target_compile_options(${target} ${keyword} "-fno-strict-aliasing" ) + endif() + if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha" ) + message( STATUS "Using gcc on alpha. Adding -mieee -mfp-rounding-mode=d" ) + target_compile_options(${target} ${keyword} "-mieee -mfp-rounding-mode=d" ) + endif() + endif() +endfunction() diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake new file mode 100644 index 00000000000..b5f469cf386 --- /dev/null +++ b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake @@ -0,0 +1,70 @@ +#.rst: +# CGAL_SetupCGAL_CoreDependencies +# ------------------------------- +# +# The module searchs for the dependencies of the `CGAL_Core` library: +# - the `GMP/MPFR` couple, +# +# and defines the variable :variable:`CGAL_Core_FOUND` and the function +# :command:`CGAL_setup_CGAL_Core_dependencies`. +# +# Module Input Variables +# ^^^^^^^^^^^^^^^^^^^^^^ +# - :variable:`CGAL_DISABLE_GMP` + +if(CGAL_SetupCGAL_CoreDependencies_included) + return() +endif() +set(CGAL_SetupCGAL_CoreDependencies_included TRUE) + +#.rst: +# Used Modules +# ^^^^^^^^^^^^ +# - :module:`CGAL_SetupGMP` +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# .. variable:: CGAL_Core_FOUND +# +# Set to `TRUE` if the dependencies of `CGAL_Core` were found. + +if(NOT CGAL_DISABLE_GMP) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupGMP.cmake) + if(GMP_FOUND) + set(CGAL_Core_FOUND TRUE) + endif() +endif() + +#.rst: +# +# Provided Functions +# ^^^^^^^^^^^^^^^^^^ +# +# .. command:: CGAL_setup_CGAL_Core_dependencies +# +# Link the target with the dependencies of `CGAL_Core`:: +# +# CGAL_setup_CGAL_Core_dependencies( target [INTERFACE] ) +# +# If the option ``INTERFACE`` is passed, the dependencies are +# added using :command:`target_link_libraries` with the ``INTERFACE`` +# keyword, or ``PUBLIC`` otherwise. +# + +# See the release notes of CGAL-4.10: CGAL_Core now requires +# Boost.Thread, with all compilers but MSVC. +if (NOT MSVC) + find_package( Boost 1.48 REQUIRED thread system ) +endif() + +function(CGAL_setup_CGAL_Core_dependencies target) + if(ARGV1 STREQUAL INTERFACE) + set(keyword INTERFACE) + else() + set(keyword PUBLIC) + endif() + use_CGAL_GMP_support(CGAL_Core ${keyword}) + target_compile_definitions(${target} ${keyword} CGAL_USE_CORE=1) + target_link_libraries( CGAL_Core ${keyword} CGAL::CGAL ${Boost_LIBRARIES}) +endfunction() diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake new file mode 100644 index 00000000000..ed2981f3b5e --- /dev/null +++ b/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake @@ -0,0 +1,72 @@ +#.rst: +# CGAL_SetupCGAL_ImageIODependencies +# ---------------------------------- +# +# The module searchs for the dependencies of the `CGAL_ImageIO` library: +# - the `Zlib` library (optional) +# +# by calling +# +# .. code-block:: cmake +# +# find_package(ZLIB) +# +# and defines the variable :variable:`CGAL_ImageIO_FOUND` and the function +# :command:`CGAL_setup_CGAL_ImageIO_dependencies`. +# +if(CGAL_SetupCGAL_ImageIODependencies_included) + return() +endif() +set(CGAL_SetupCGAL_ImageIODependencies_included TRUE) + +#.rst: +# Used Modules +# ^^^^^^^^^^^^ +# - :module:`FindZLIB` +find_package( ZLIB ) + +define_property(TARGET PROPERTY CGAL_TARGET_USES_ZLIB + BRIEF_DOCS "Tells if the target uses ZLIB as a dependency" + FULL_DOCS "Tells if the target uses ZLIB as a dependency") + +#.rst: +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# .. variable:: CGAL_ImageIO_USE_ZLIB +# +# Set to `TRUE` if `CGAL_ImageIO` was compiled with `Zlib`. +# +# .. variable:: CGAL_ImageIO_FOUND +# +# Always set to `TRUE`. + +if(ZLIB_FOUND) + set(CGAL_ImageIO_USE_ZLIB ON CACHE BOOL "CGAL_ImageIO uses ZLIB") +endif(ZLIB_FOUND) + +set( CGAL_ImageIO_BASENAME CGAL_ImageIO) + +set(CGAL_ImageIO_FOUND TRUE) + +function(CGAL_setup_CGAL_ImageIO_dependencies target) + if(ARGV1 STREQUAL INTERFACE) + set(keyword INTERFACE) + else() + set(keyword PUBLIC) + endif() + + target_link_libraries( CGAL_ImageIO ${keyword} CGAL::CGAL) + + if(ZLIB_FOUND) + target_include_directories( CGAL_ImageIO SYSTEM ${keyword} ${ZLIB_INCLUDE_DIRS}) + target_link_libraries( CGAL_ImageIO ${keyword} ${ZLIB_LIBRARIES}) + + target_compile_definitions( CGAL_ImageIO ${keyword} CGAL_USE_ZLIB=1) + if(NOT ARGV1 STREQUAL INTERFACE) + set_target_properties(CGAL_ImageIO PROPERTIES CGAL_TARGET_USES_ZLIB TRUE) + endif() + else() + message( STATUS "NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.") + endif() +endfunction() diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake new file mode 100644 index 00000000000..ea5d623a499 --- /dev/null +++ b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake @@ -0,0 +1,105 @@ +#.rst: +# CGAL_SetupCGAL_Qt5Dependencies +# ------------------------------ +# +# The module searchs for the dependencies of the `CGAL_Qt5` library: +# - the `Qt5` libraries +# +# by calling +# +# .. code-block:: cmake +# +# find_package(Qt5 QUIET COMPONENTS OpenGL Svg) +# +# and defines the variable :variable:`CGAL_Qt5_FOUND` and the function +# :command:`CGAL_setup_CGAL_Qt5_dependencies`. +# + +if(CGAL_SetupCGAL_Qt5Dependencies_included) + return() +endif() +set(CGAL_SetupCGAL_Qt5Dependencies_included TRUE) + +#.rst: +# Used Modules +# ^^^^^^^^^^^^ +# - :module:`Qt5Config` +find_package(Qt5 QUIET COMPONENTS OpenGL Svg) + +set(CGAL_Qt5_MISSING_DEPS "") +if(NOT Qt5OpenGL_FOUND) + set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL") +endif() +if(NOT Qt5Svg_FOUND) + set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg") +endif() +if(NOT Qt5_FOUND) + set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5") +endif() + + +#.rst: +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# .. variable:: CGAL_Qt5_FOUND +# +# Set to `TRUE` if the dependencies of `CGAL_Qt5` were found. +# +if(NOT CGAL_Qt5_MISSING_DEPS) + set(CGAL_Qt5_FOUND TRUE) + + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Qt5_moc_and_resource_files.cmake) + + if(NOT TARGET CGAL_Qt5_moc_and_resources) + add_library(CGAL_Qt5_moc_and_resources STATIC ${_CGAL_Qt5_MOC_FILES_private} ${_CGAL_Qt5_RESOURCE_FILES_private}) + set_target_properties(CGAL_Qt5_moc_and_resources PROPERTIES + POSITION_INDEPENDENT_CODE TRUE + EXCLUDE_FROM_ALL TRUE) + target_link_libraries(CGAL_Qt5_moc_and_resources CGAL::CGAL Qt5::Widgets Qt5::OpenGL Qt5::Svg) + + add_library(CGAL::CGAL_Qt5_moc_and_resources ALIAS CGAL_Qt5_moc_and_resources) + add_library(CGAL::Qt5_moc_and_resources ALIAS CGAL_Qt5_moc_and_resources) + endif() + +endif() + +#get_property(QT_UIC_EXECUTABLE TARGET Qt5::uic PROPERTY LOCATION) +#message( STATUS "Qt5Core include: ${Qt5Core_INCLUDE_DIRS}" ) +#message( STATUS "Qt5 libraries: ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Svg_LIBRARIES} ${Qt5OpenGL_LIBRARIES}" ) +#message( STATUS "Qt5Core definitions: ${Qt5Core_DEFINITIONS}" ) +#message( STATUS "moc executable: ${QT_MOC_EXECUTABLE}" ) +#message( STATUS "uic executable: ${QT_UIC_EXECUTABLE}" ) + +#.rst: +# +# Provided Functions +# ^^^^^^^^^^^^^^^^^^ +# +# .. command:: CGAL_setup_CGAL_Qt5_dependencies +# +# Link the target with the dependencies of `CGAL_Qt5`:: +# +# CGAL_setup_CGAL_Qt5_dependencies( target [INTERFACE] ) +# +# If the option ``INTERFACE`` is passed, the dependencies are +# added using :command:`target_link_libraries` with the ``INTERFACE`` +# keyword, or ``PUBLIC`` otherwise. +# +function(CGAL_setup_CGAL_Qt5_dependencies target) + if(ARGV1 STREQUAL INTERFACE) + set(keyword INTERFACE) + else() + set(keyword PUBLIC) + endif() + + if($ENV{CGAL_FAKE_PUBLIC_RELEASE}) + target_compile_definitions( ${target} ${keyword} CGAL_FAKE_PUBLIC_RELEASE=1 ) + endif() + target_link_libraries( ${target} ${keyword} CGAL::CGAL) + if(CGAL_HEADER_ONLY) + target_link_libraries( ${target} ${keyword} CGAL::Qt5_moc_and_resources) + endif() + target_link_libraries( ${target} ${keyword} Qt5::OpenGL Qt5::Svg) +endfunction() + diff --git a/Installation/cmake/modules/CGAL_SetupDependencies.cmake b/Installation/cmake/modules/CGAL_SetupDependencies.cmake index 6575cdf542d..1c0135b155a 100644 --- a/Installation/cmake/modules/CGAL_SetupDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupDependencies.cmake @@ -1,4 +1,4 @@ -include(CGAL_Macros) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) message ( STATUS "External libraries supported: ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}") @@ -82,4 +82,4 @@ if( NOT GMP_FOUND ) endif( NOT GMP_FOUND ) # finally setup Boost -include(CGAL_SetupBoost) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupBoost.cmake) diff --git a/Installation/cmake/modules/CGAL_SetupGMP.cmake b/Installation/cmake/modules/CGAL_SetupGMP.cmake new file mode 100644 index 00000000000..757ca2637a7 --- /dev/null +++ b/Installation/cmake/modules/CGAL_SetupGMP.cmake @@ -0,0 +1,50 @@ +#.rst: +# CGAL_SetupGMP +# ------------- +# +# The module searchs for the `GMP` and `MPFR` headers and libraries, +# by calling +# +# .. code-block:: cmake +# +# find_package(GMP) +# find_package(MPFR) +# +# and defines the function :command:`use_CGAL_GMP_support`. + +if(CGAL_SetupGMP_included OR CGAL_DISABLE_GMP) + return() +endif() +set(CGAL_SetupGMP_included TRUE) + +find_package(GMP) +find_package(MPFR) + +#.rst: +# Provided Functions +# ^^^^^^^^^^^^^^^^^^ +# +# .. command:: use_CGAL_GMP_support +# +# Link the target with the `GMP` and `MPFR` libraries:: +# +# use_CGAL_GMP_support( target [INTERFACE] ) +# +# If the option ``INTERFACE`` is passed, the dependencies are +# added using :command:`target_link_libraries` with the ``INTERFACE`` +# keyword, or ``PUBLIC`` otherwise. + +function(use_CGAL_GMP_support target) + if(ARGV1 STREQUAL INTERFACE) + set(keyword INTERFACE) + else() + set(keyword PUBLIC) + endif() + if(NOT GMP_FOUND OR NOT MPFR_FOUND) + message(FATAL_ERROR "CGAL requires GMP and MPFR.") + return() + endif() + + target_include_directories(${target} SYSTEM ${keyword} ${GMP_INCLUDE_DIR} ${MPFR_INCLUDE_DIR}) + target_link_libraries(${target} ${keyword} ${GMP_LIBRARIES} ${MPFR_LIBRARIES}) +endfunction() diff --git a/Installation/cmake/modules/CGAL_SetupLEDA.cmake b/Installation/cmake/modules/CGAL_SetupLEDA.cmake new file mode 100644 index 00000000000..fb7a2f6c721 --- /dev/null +++ b/Installation/cmake/modules/CGAL_SetupLEDA.cmake @@ -0,0 +1,47 @@ +#.rst: +# CGAL_SetupLEDA +# -------------- +# +# The module searchs for the `LEDA` headers and library, by calling +# +# .. code-block:: cmake +# +# find_package(LEDA) +# +# and defines the function :command:`use_CGAL_LEDA_support`. + +if(CGAL_SetupLEDA_included) + return() +endif() +set(CGAL_SetupLEDA_included TRUE) + +find_package(LEDA) + +#.rst: +# Provided Functions +# ^^^^^^^^^^^^^^^^^^ +# +# .. command:: use_CGAL_LEDA_support +# +# Link the target with the `LEDA` libraries:: +# +# use_CGAL_LEDA_support( target [INTERFACE] ) +# +# If the option ``INTERFACE`` is passed, the dependencies are +# added using :command:`target_link_libraries` with the ``INTERFACE`` +# keyword, or ``PUBLIC`` otherwise. + +function(use_CGAL_LEDA_support target) + if(ARGV1 STREQUAL INTERFACE) + set(keyword INTERFACE) + else() + set(keyword PUBLIC) + endif() + if(NOT LEDA_FOUND) + message(FATAL_ERROR "use_CGAL_LEDA_support is use whereas LEDA_FOUND is false.") + return() + endif() + target_compile_options(${target} ${keyword} ${LEDA_CXX_FLAGS} ${LEDA_DEFINITIONS}) + target_include_directories(${target} SYSTEM ${keyword} ${LEDA_INCLUDE_DIR}) + target_link_libraries(${target} ${keyword} ${LEDA_LIBRARIES} ${LEDA_LINKER_FLAGS}) +endfunction() diff --git a/Installation/cmake/modules/CGAL_TweakFindBoost.cmake b/Installation/cmake/modules/CGAL_TweakFindBoost.cmake index 95577907b49..a27ff2d960b 100644 --- a/Installation/cmake/modules/CGAL_TweakFindBoost.cmake +++ b/Installation/cmake/modules/CGAL_TweakFindBoost.cmake @@ -52,10 +52,9 @@ if( NOT CGAL_TweakFindBoost ) # One must add -DBOOST_ALL_DYN_LINK to DEFINITIONS to use Boost # auto-link with shared libraries. - # First, add the variable to cache, if it was loaded from CGALConfig.cmake - cache_set(CGAL_3RD_PARTY_DEFINITIONS "${CGAL_3RD_PARTY_DEFINITIONS}") - # Then amend it - add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS -DBOOST_ALL_DYN_LINK) + list(APPEND CGAL_3RD_PARTY_DEFINITIONS -DBOOST_ALL_DYN_LINK) + set(CGAL_3RD_PARTY_DEFINITIONS "${CGAL_3RD_PARTY_DEFINITIONS}" + CACHE INTERNAL "3rd party definitions for CGAL") endif() endif() diff --git a/Installation/cmake/modules/CGAL_UseRS.cmake b/Installation/cmake/modules/CGAL_UseRS.cmake index 5104bdd7549..d638ff0f12a 100644 --- a/Installation/cmake/modules/CGAL_UseRS.cmake +++ b/Installation/cmake/modules/CGAL_UseRS.cmake @@ -9,7 +9,7 @@ if( RS_FOUND AND NOT RS_SETUP ) message( STATUS "RS libraries: ${RS_LIBRARIES}" ) if( APPLE AND CMAKE_COMPILER_IS_GNUCXX ) - include( CGAL_VersionUtils ) + include( ${CMAKE_CURRENT_LIST_DIR}/CGAL_VersionUtils.cmake ) EXEC_PROGRAM( ${CMAKE_CXX_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE RS_GXX_VERSION ) diff --git a/Installation/cmake/modules/CGAL_UseRS3.cmake b/Installation/cmake/modules/CGAL_UseRS3.cmake index 77a4065ad44..3a560aecd72 100644 --- a/Installation/cmake/modules/CGAL_UseRS3.cmake +++ b/Installation/cmake/modules/CGAL_UseRS3.cmake @@ -3,7 +3,7 @@ if( RS3_FOUND AND NOT RS3_SETUP ) - include( CGAL_UseRS ) + include( ${CMAKE_CURRENT_LIST_DIR}/CGAL_UseRS.cmake ) # add rs3 parameters, if necessary (rs3 must be always after rsexport) message( STATUS "UseRS3" ) @@ -40,7 +40,7 @@ if( RS3_FOUND AND NOT RS3_SETUP ) message( STATUS "Using old RS signatures" ) endif( RS3_OLD_INCLUDES ) - include(CGAL_UseMPFI) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_UseMPFI.cmake) set (RS3_SETUP TRUE) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index 163ebfee9b9..79bef011112 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -3,10 +3,26 @@ if(CGAL_add_test_included) endif(CGAL_add_test_included) set(CGAL_add_test_included TRUE) -if(POLICY CMP0064) - cmake_policy(SET CMP0064 NEW) +if(NOT POLICY CMP0064) + # CMake <= 3.3 + if(BUILD_TESTING) + message(WARNING + "CGAL CTest support requires CMake 3.4 or later.\n" + "You must either disable BUILD_TESTING or upgrade CMake.") + endif() + + # Add a fake function to avoid CMake errors + function(cgal_add_compilation_test) + endfunction() + + # Then return, to exit the file + return() endif() +include(CTest) + +cmake_policy(SET CMP0064 NEW) + include(CMakeParseArguments) option(CGAL_CTEST_DISPLAY_MEM_AND_TIME @@ -19,6 +35,11 @@ if(CGAL_CTEST_DISPLAY_MEM_AND_TIME) endif() endif() +if(ANDROID) + set(ANDROID_DIR_PREFIX /data/local/tmp/) + find_program(adb_executable adb) +endif() + # Process a list, and replace items contains a file pattern (like # `*.off`) by the sublist that corresponds to the globbing of the # pattern in the directory `${CGAL_CURRENT_SOURCE_DIR}`. @@ -61,7 +82,7 @@ function(expand_list_with_globbing list_name) endfunction() function(cgal_add_compilation_test exe_name) - if(TEST compilation_of__${exe_name}) + if(NOT POLICY CMP0064 OR TEST compilation_of__${exe_name}) return() endif() add_test(NAME "compilation_of__${exe_name}" @@ -78,7 +99,7 @@ function(cgal_setup_test_properties test_name) APPEND PROPERTY LABELS "${PROJECT_NAME}") # message(STATUS " working dir: ${CGAL_CURRENT_SOURCE_DIR}") set_property(TEST "${test_name}" - PROPERTY WORKING_DIRECTORY ${CGAL_CURRENT_SOURCE_DIR}) + PROPERTY WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) if(exe_name) set_property(TEST "${test_name}" APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") @@ -86,20 +107,47 @@ function(cgal_setup_test_properties test_name) if(POLICY CMP0066) # CMake 3.7 or later if(NOT TEST ${PROJECT_NAME}_SetupFixture) - add_test(NAME ${PROJECT_NAME}_SetupFixture - COMMAND - ${CMAKE_COMMAND} -E copy_directory - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir - ) + if(ANDROID) + add_test(NAME ${PROJECT_NAME}_SetupFixture + COMMAND + ${adb_executable} push + ${CMAKE_CURRENT_SOURCE_DIR} + ${ANDROID_DIR_PREFIX}${PROJECT_NAME} + ) + add_test(NAME ${PROJECT_NAME}_copy_GMP_MPFR + COMMAND + ${adb_executable} push + ${GMP_LIBRARIES} ${MPFR_LIBRARIES} + ${ANDROID_DIR_PREFIX}${PROJECT_NAME} + ) + set_property(TEST ${PROJECT_NAME}_copy_GMP_MPFR + APPEND PROPERTY DEPENDS ${PROJECT_NAME}_SetupFixture) + set_property(TEST ${PROJECT_NAME}_copy_GMP_MPFR + PROPERTY FIXTURES_SETUP ${PROJECT_NAME}) + else() + add_test(NAME ${PROJECT_NAME}_SetupFixture + COMMAND + ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir + ) + endif() set_property(TEST ${PROJECT_NAME}_SetupFixture PROPERTY FIXTURES_SETUP ${PROJECT_NAME}) - add_test(NAME ${PROJECT_NAME}_CleanupFixture - COMMAND - ${CMAKE_COMMAND} -E remove_directory - ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir - ) + if(ANDROID) + add_test(NAME ${PROJECT_NAME}_CleanupFixture + COMMAND + ${adb_executable} shell rm -rf + ${ANDROID_DIR_PREFIX}${PROJECT_NAME} + ) + else() + add_test(NAME ${PROJECT_NAME}_CleanupFixture + COMMAND + ${CMAKE_COMMAND} -E remove_directory + ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir + ) + endif() set_property(TEST ${PROJECT_NAME}_CleanupFixture PROPERTY FIXTURES_CLEANUP ${PROJECT_NAME}) @@ -107,15 +155,26 @@ function(cgal_setup_test_properties test_name) ${PROJECT_NAME}_CleanupFixture ${PROJECT_NAME}_SetupFixture APPEND PROPERTY LABELS "${PROJECT_NAME}") endif() - set_tests_properties("${test_name}" - PROPERTIES - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir - FIXTURES_REQUIRED "${PROJECT_NAME}") + if(NOT ANDROID) + set_property(TEST "${test_name}" + PROPERTY + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir) + endif() + set_property(TEST "${test_name}" + APPEND PROPERTY FIXTURES_REQUIRED "${PROJECT_NAME}") if(exe_name) set_property(TEST ${test_name} APPEND PROPERTY FIXTURES_REQUIRED "${exe_name}") set_property(TEST "compilation_of__${exe_name}" PROPERTY FIXTURES_SETUP "${exe_name}") + if(ANDROID) + add_test(NAME "push_of__${exe_name}" + COMMAND ${adb_executable} push $ ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name}) + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY FIXTURES_SETUP "${exe_name}") + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") + endif() endif() endif() # end CMake 3.7 or later endfunction(cgal_setup_test_properties) @@ -124,7 +183,7 @@ function(cgal_add_test exe_name) cgal_add_compilation_test(${exe_name}) cmake_parse_arguments("cgal_add_test" # prefix - "" # optional arguments + "NO_EXECUTION" # optional arguments "TEST_NAME" # single arguments "ARGUMENTS" # multivalue arguments ${ARGN}) @@ -135,7 +194,7 @@ function(cgal_add_test exe_name) set(test_name "execution___of__${exe_name}") endif() # message(" test_name: ${test_name}") - if(TEST ${test_name}) + if(cgal_add_test_NO_EXECUTION OR NOT POLICY CMP0064 OR TEST ${test_name}) return() endif() # message("Add test ${test_name}") @@ -145,7 +204,11 @@ function(cgal_add_test exe_name) COMMAND ${TIME_COMMAND} ${CMAKE_COMMAND} -DCMD:STRING=$ -DCIN:STRING=${cin_file} + -DANDROID_DIR_PREFIX=${ANDROID_DIR_PREFIX} + -DPROJECT_NAME=${PROJECT_NAME} -P "${CGAL_MODULES_DIR}/run_test_with_cin.cmake") + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${cin_file}) # message(STATUS "add test: ${exe_name} < ${cin_file}") else() if(NOT ARGS AND NOT cgal_add_test_TEST_NAME) @@ -168,10 +231,16 @@ function(cgal_add_test exe_name) list(APPEND ARGS ${CMD_LINE_ARGS}) endforeach() expand_list_with_globbing(ARGS) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${cmd_file}) endif() endif() # message(STATUS "add test: ${exe_name} ${ARGS}") - add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} $ ${ARGS}) + if(ANDROID) + add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${adb_executable} shell cd ${ANDROID_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${ANDROID_DIR_PREFIX}${PROJECT_NAME} ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) + else() + add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} $ ${ARGS}) + endif() endif() cgal_setup_test_properties(${test_name} ${exe_name}) return() @@ -197,3 +266,6 @@ function(cgal_add_test exe_name) set_property(TEST "${test_name}" APPEND PROPERTY LABELS "${PROJECT_NAME}") endfunction() + +function(CGAL_add_compilation_tests_for_all_targets) +endfunction() diff --git a/Installation/cmake/modules/CGAL_display_flags.cmake b/Installation/cmake/modules/CGAL_display_flags.cmake new file mode 100644 index 00000000000..777d6402898 --- /dev/null +++ b/Installation/cmake/modules/CGAL_display_flags.cmake @@ -0,0 +1,21 @@ +if(CMAKE_CONFIGURATION_TYPES) + # Multi-configuration CMake generator, + message( STATUS "Multi-configuration CMake generator: cannot display flags" ) + return() +endif() + +message( STATUS "Build type: ${CMAKE_BUILD_TYPE}" ) + +string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER ) + +message( STATUS "USING CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) + +if ( CGAL_BUILDING_LIBS ) + if ( BUILD_SHARED_LIBS ) + message( STATUS "USING LDFLAGS = '${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) + else() + message( STATUS "USING LDFLAGS = '${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) + endif() +else() + message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) +endif() diff --git a/Installation/cmake/modules/CGAL_setup_target_dependencies.cmake b/Installation/cmake/modules/CGAL_setup_target_dependencies.cmake new file mode 100644 index 00000000000..73a357b4d08 --- /dev/null +++ b/Installation/cmake/modules/CGAL_setup_target_dependencies.cmake @@ -0,0 +1,17 @@ +function(CGAL_setup_target_dependencies target) + if(ARGV1 STREQUAL INTERFACE) + set(keyword INTERFACE) + else() + set(keyword PUBLIC) + endif() + + if(${target} STREQUAL CGAL) + CGAL_setup_CGAL_dependencies(${target} ${keyword}) + elseif(${target} STREQUAL CGAL_Core) + CGAL_setup_CGAL_Core_dependencies(${target} ${keyword}) + elseif(${target} STREQUAL CGAL_ImageIO) + CGAL_setup_CGAL_ImageIO_dependencies(${target} ${keyword}) + elseif(${target} STREQUAL CGAL_Qt5) + CGAL_setup_CGAL_Qt5_dependencies(${target} ${keyword}) + endif() +endfunction() diff --git a/Installation/cmake/modules/CGAL_target_use_TBB.cmake b/Installation/cmake/modules/CGAL_target_use_TBB.cmake new file mode 100644 index 00000000000..2cb56b11ad9 --- /dev/null +++ b/Installation/cmake/modules/CGAL_target_use_TBB.cmake @@ -0,0 +1,10 @@ +if (CGAL_target_use_TBB_included) + return() +endif() +set(CGAL_target_use_TBB_included TRUE) + +function(CGAL_target_use_TBB target) + target_include_directories ( ${target} SYSTEM PRIVATE ${TBB_INCLUDE_DIRS} ) + target_link_libraries( ${target} PRIVATE ${TBB_LIBRARIES} ) + target_compile_options( ${target} PRIVATE -DNOMINMAX -DCGAL_LINKED_WITH_TBB ) +endfunction() diff --git a/Installation/cmake/modules/FindBLAS.cmake b/Installation/cmake/modules/FindBLAS.cmake index f00a896d66f..34f5bb5fdf2 100644 --- a/Installation/cmake/modules/FindBLAS.cmake +++ b/Installation/cmake/modules/FindBLAS.cmake @@ -32,8 +32,8 @@ include(CheckFunctionExists) -include(CGAL_GeneratorSpecificSettings) -include(CGAL_Macros) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_GeneratorSpecificSettings.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) # This macro checks for the existence of the combination of fortran libraries @@ -161,7 +161,7 @@ else() # Look first for the TAUCS library distributed with CGAL in auxiliary/taucs. # Set CGAL_TAUCS_FOUND, CGAL_TAUCS_INCLUDE_DIR and CGAL_TAUCS_LIBRARIES_DIR. - include(CGAL_Locate_CGAL_TAUCS) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Locate_CGAL_TAUCS.cmake) # Search for BLAS in CGAL_TAUCS_INCLUDE_DIR/CGAL_TAUCS_LIBRARIES_DIR (TAUCS shipped with CGAL)... if(CGAL_TAUCS_FOUND AND CGAL_AUTO_LINK_ENABLED) diff --git a/Installation/cmake/modules/FindF2C.cmake b/Installation/cmake/modules/FindF2C.cmake index b677ec18218..105a31632d2 100644 --- a/Installation/cmake/modules/FindF2C.cmake +++ b/Installation/cmake/modules/FindF2C.cmake @@ -15,7 +15,7 @@ else(F2C_LIBRARIES) # F2C shipped with CGAL (as part of TAUCS)? # If found, we will search for f2c library in ${CGAL_TAUCS_LIBRARIES_DIR}. - include(CGAL_Locate_CGAL_TAUCS) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Locate_CGAL_TAUCS.cmake) find_library(F2C_LIBRARIES NAMES f2c g2c vcf2c PATHS ${CGAL_TAUCS_LIBRARIES_DIR} diff --git a/Installation/cmake/modules/FindGMP.cmake b/Installation/cmake/modules/FindGMP.cmake index 9f2ac1802b1..1cd156da92f 100644 --- a/Installation/cmake/modules/FindGMP.cmake +++ b/Installation/cmake/modules/FindGMP.cmake @@ -9,7 +9,7 @@ # TODO: support MacOSX include(FindPackageHandleStandardArgs) -include(CGAL_GeneratorSpecificSettings) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_GeneratorSpecificSettings.cmake) if(GMP_INCLUDE_DIR) set(GMP_in_cache TRUE) diff --git a/Installation/cmake/modules/FindLAPACK.cmake b/Installation/cmake/modules/FindLAPACK.cmake index 660429c0756..8612095f14e 100644 --- a/Installation/cmake/modules/FindLAPACK.cmake +++ b/Installation/cmake/modules/FindLAPACK.cmake @@ -31,8 +31,8 @@ include(CheckFunctionExists) -include(CGAL_GeneratorSpecificSettings) -include(CGAL_Macros) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_GeneratorSpecificSettings.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) # This macro checks for the existence of the combination of fortran libraries @@ -172,7 +172,7 @@ else() # Look first for the TAUCS library distributed with CGAL in auxiliary/taucs. # Set CGAL_TAUCS_FOUND, CGAL_TAUCS_INCLUDE_DIR and CGAL_TAUCS_LIBRARIES_DIR. - include(CGAL_Locate_CGAL_TAUCS) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Locate_CGAL_TAUCS.cmake) # Search for LAPACK in CGAL_TAUCS_INCLUDE_DIR/CGAL_TAUCS_LIBRARIES_DIR (TAUCS shipped with CGAL)... if(CGAL_TAUCS_FOUND AND CGAL_AUTO_LINK_ENABLED) diff --git a/Installation/cmake/modules/FindMKL.cmake b/Installation/cmake/modules/FindMKL.cmake index 92def59f19c..391c7b1d082 100644 --- a/Installation/cmake/modules/FindMKL.cmake +++ b/Installation/cmake/modules/FindMKL.cmake @@ -15,8 +15,8 @@ include(CheckFunctionExists) -include(CGAL_GeneratorSpecificSettings) -include(CGAL_Macros) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_GeneratorSpecificSettings.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) # This macro checks for the existence of the combination of fortran libraries diff --git a/Installation/cmake/modules/FindMPFR.cmake b/Installation/cmake/modules/FindMPFR.cmake index c01948fb188..f108294cb6f 100644 --- a/Installation/cmake/modules/FindMPFR.cmake +++ b/Installation/cmake/modules/FindMPFR.cmake @@ -8,7 +8,7 @@ # TODO: support MacOSX include(FindPackageHandleStandardArgs) -include(CGAL_GeneratorSpecificSettings) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_GeneratorSpecificSettings.cmake) if(MPFR_INCLUDE_DIR) set(MPFR_in_cache TRUE) diff --git a/Installation/cmake/modules/FindNTL.cmake b/Installation/cmake/modules/FindNTL.cmake index 1a76114b2b3..55d671bd1c1 100644 --- a/Installation/cmake/modules/FindNTL.cmake +++ b/Installation/cmake/modules/FindNTL.cmake @@ -10,7 +10,7 @@ if( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) else( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) - include( CGAL_VersionUtils ) + include( ${CMAKE_CURRENT_LIST_DIR}/CGAL_VersionUtils.cmake ) get_dependency_version( GMP ) diff --git a/Installation/cmake/modules/FindOpenGL.cmake b/Installation/cmake/modules/FindOpenGL.cmake deleted file mode 100644 index 49121fd6717..00000000000 --- a/Installation/cmake/modules/FindOpenGL.cmake +++ /dev/null @@ -1,31 +0,0 @@ -if ( NOT FIND_OPENGL_WRAPPER ) - - set ( FIND_OPENGL_WRAPPER 1 ) - - set(SAVED_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ) - - set(CMAKE_MODULE_PATH ${ORIG_CMAKE_MODULE_PATH} ) - - find_package(OpenGL) - - if ( OPENGL_FOUND AND CGAL_APPLE_LEOPARD ) - - if ( BUILD_SHARED_LIBS ) - - uniquely_add_flags( CMAKE_SHARED_LINKER_FLAGS - "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" - ) - - else() - - uniquely_add_flags( CMAKE_MODULE_LINKER_FLAGS - "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" - ) - endif() - - - endif() - - set(CMAKE_MODULE_PATH ${SAVED_CMAKE_MODULE_PATH} ) - -endif() diff --git a/Installation/cmake/modules/FindQGLViewer.cmake b/Installation/cmake/modules/FindQGLViewer.cmake index e769d9e196f..aadfa505689 100644 --- a/Installation/cmake/modules/FindQGLViewer.cmake +++ b/Installation/cmake/modules/FindQGLViewer.cmake @@ -6,6 +6,12 @@ # QGLVIEWER_LIBRARIES - Link these to use QGLViewer # QGLVIEWER_DEFINITIONS - Compiler switches required for using QGLViewer # +if(POLICY CMP0072) + # About the use of OpenGL + cmake_policy(SET CMP0072 NEW) +endif() +find_package(OpenGL QUIET) +find_package(Qt5 QUIET COMPONENTS OpenGL Xml) # first look in user defined locations find_path(QGLVIEWER_INCLUDE_DIR @@ -50,9 +56,9 @@ endif() if(QGLVIEWER_LIBRARY_RELEASE) if(QGLVIEWER_LIBRARY_DEBUG) - set(QGLVIEWER_LIBRARIES_ optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG}) + set(QGLVIEWER_LIBRARIES_ Qt5::Xml Qt5::OpenGL ${OPENGL_LIBRARIES} optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG}) else() - set(QGLVIEWER_LIBRARIES_ ${QGLVIEWER_LIBRARY_RELEASE}) + set(QGLVIEWER_LIBRARIES_ Qt5::Xml Qt5::OpenGL ${OPENGL_LIBRARIES} ${QGLVIEWER_LIBRARY_RELEASE}) endif() set(QGLVIEWER_LIBRARIES ${QGLVIEWER_LIBRARIES_} CACHE FILEPATH "The QGLViewer library") diff --git a/Installation/cmake/modules/FindRS.cmake b/Installation/cmake/modules/FindRS.cmake index 9ddba75c32c..00eac97e03b 100644 --- a/Installation/cmake/modules/FindRS.cmake +++ b/Installation/cmake/modules/FindRS.cmake @@ -11,7 +11,7 @@ endif() if( MPFI_FOUND ) - include( CGAL_VersionUtils ) + include( ${CMAKE_CURRENT_LIST_DIR}/CGAL_VersionUtils.cmake ) find_path(RS_INCLUDE_DIR NAMES rs_exports.h diff --git a/Installation/cmake/modules/FindRS3.cmake b/Installation/cmake/modules/FindRS3.cmake index d2d1753e83b..fbb782bac6a 100644 --- a/Installation/cmake/modules/FindRS3.cmake +++ b/Installation/cmake/modules/FindRS3.cmake @@ -9,7 +9,7 @@ if ( RS_FOUND ) if( MPFI_FOUND ) - include( CGAL_VersionUtils ) + include( ${CMAKE_CURRENT_LIST_DIR}/CGAL_VersionUtils.cmake ) find_path(RS3_INCLUDE_DIR NAMES rs3_fncts.h diff --git a/Installation/cmake/modules/FindTAUCS.cmake b/Installation/cmake/modules/FindTAUCS.cmake index d6625e7471c..f45c51dd9d6 100644 --- a/Installation/cmake/modules/FindTAUCS.cmake +++ b/Installation/cmake/modules/FindTAUCS.cmake @@ -11,7 +11,7 @@ # TAUCS_USE_FILE - The name of the cmake module to include to compile # applications or libraries using TAUCS. -include(CGAL_GeneratorSpecificSettings) +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_GeneratorSpecificSettings.cmake) # TAUCS requires LAPACK if(TAUCS_FIND_QUIETLY OR NOT TAUCS_FIND_REQUIRED) @@ -43,7 +43,7 @@ else() # Look first for the TAUCS library distributed with CGAL in auxiliary/taucs. # Set CGAL_TAUCS_FOUND, CGAL_TAUCS_INCLUDE_DIR and CGAL_TAUCS_LIBRARIES_DIR. - include(CGAL_Locate_CGAL_TAUCS) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Locate_CGAL_TAUCS.cmake) # Search for TAUCS headers in ${CGAL_TAUCS_INCLUDE_DIR} (TAUCS shipped with CGAL), # else in $TAUCS_INC_DIR environment variable. diff --git a/Installation/cmake/modules/FindTBB.cmake b/Installation/cmake/modules/FindTBB.cmake index 13f4d9292a2..0d9a135cd52 100644 --- a/Installation/cmake/modules/FindTBB.cmake +++ b/Installation/cmake/modules/FindTBB.cmake @@ -418,7 +418,7 @@ if (TBB_FOUND) endif (TBB_FOUND) set(TBB_USE_FILE "UseTBB") - +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_target_use_TBB.cmake) ### ** Emacs settings ** ### Local Variables: ### cmake-tab-width: 4 diff --git a/Installation/cmake/modules/Help/CGAL_SetupBoost.rst b/Installation/cmake/modules/Help/CGAL_SetupBoost.rst new file mode 100644 index 00000000000..23f0d839045 --- /dev/null +++ b/Installation/cmake/modules/Help/CGAL_SetupBoost.rst @@ -0,0 +1 @@ +.. cmake-module:: ../CGAL_SetupBoost.cmake diff --git a/Installation/cmake/modules/Help/CGAL_SetupCGALDependencies.rst b/Installation/cmake/modules/Help/CGAL_SetupCGALDependencies.rst new file mode 100644 index 00000000000..b660bd26231 --- /dev/null +++ b/Installation/cmake/modules/Help/CGAL_SetupCGALDependencies.rst @@ -0,0 +1 @@ +.. cmake-module:: ../CGAL_SetupCGALDependencies.cmake diff --git a/Installation/cmake/modules/Help/CGAL_SetupCGAL_CoreDependencies.rst b/Installation/cmake/modules/Help/CGAL_SetupCGAL_CoreDependencies.rst new file mode 100644 index 00000000000..7db98a80573 --- /dev/null +++ b/Installation/cmake/modules/Help/CGAL_SetupCGAL_CoreDependencies.rst @@ -0,0 +1 @@ +.. cmake-module:: ../CGAL_SetupCGAL_CoreDependencies.cmake diff --git a/Installation/cmake/modules/Help/CGAL_SetupCGAL_ImageIODependencies.rst b/Installation/cmake/modules/Help/CGAL_SetupCGAL_ImageIODependencies.rst new file mode 100644 index 00000000000..98fef84747d --- /dev/null +++ b/Installation/cmake/modules/Help/CGAL_SetupCGAL_ImageIODependencies.rst @@ -0,0 +1 @@ +.. cmake-module:: ../CGAL_SetupCGAL_ImageIODependencies.cmake diff --git a/Installation/cmake/modules/Help/CGAL_SetupCGAL_Qt5Dependencies.rst b/Installation/cmake/modules/Help/CGAL_SetupCGAL_Qt5Dependencies.rst new file mode 100644 index 00000000000..815f7a4dd5f --- /dev/null +++ b/Installation/cmake/modules/Help/CGAL_SetupCGAL_Qt5Dependencies.rst @@ -0,0 +1 @@ +.. cmake-module:: ../CGAL_SetupCGAL_Qt5Dependencies.cmake diff --git a/Installation/cmake/modules/Help/CGAL_SetupGMP.rst b/Installation/cmake/modules/Help/CGAL_SetupGMP.rst new file mode 100644 index 00000000000..701ef3aabed --- /dev/null +++ b/Installation/cmake/modules/Help/CGAL_SetupGMP.rst @@ -0,0 +1 @@ +.. cmake-module:: ../CGAL_SetupGMP.cmake diff --git a/Installation/cmake/modules/Help/CGAL_SetupLEDA.rst b/Installation/cmake/modules/Help/CGAL_SetupLEDA.rst new file mode 100644 index 00000000000..d9a872a44a8 --- /dev/null +++ b/Installation/cmake/modules/Help/CGAL_SetupLEDA.rst @@ -0,0 +1 @@ +.. cmake-module:: ../CGAL_SetupLEDA.cmake diff --git a/Installation/cmake/modules/Help/cmake.py b/Installation/cmake/modules/Help/cmake.py new file mode 100644 index 00000000000..32003d475e6 --- /dev/null +++ b/Installation/cmake/modules/Help/cmake.py @@ -0,0 +1,393 @@ +#============================================================================= +# CMake - Cross Platform Makefile Generator +# Copyright 2000-2013 Kitware, Inc., Insight Software Consortium +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +import os +import re + +# Monkey patch for pygments reporting an error when generator expressions are +# used. +# https://bitbucket.org/birkenfeld/pygments-main/issue/942/cmake-generator-expressions-not-handled +from pygments.lexers import CMakeLexer +from pygments.token import Name, Operator +from pygments.lexer import bygroups +CMakeLexer.tokens["args"].append(('(\\$<)(.+?)(>)', + bygroups(Operator, Name.Variable, Operator))) + +# Monkey patch for sphinx generating invalid content for qcollectiongenerator +# https://bitbucket.org/birkenfeld/sphinx/issue/1435/qthelp-builder-should-htmlescape-keywords +from sphinx.util.pycompat import htmlescape +from sphinx.builders.qthelp import QtHelpBuilder +old_build_keywords = QtHelpBuilder.build_keywords +def new_build_keywords(self, title, refs, subitems): + old_items = old_build_keywords(self, title, refs, subitems) + new_items = [] + for item in old_items: + before, rest = item.split("ref=\"", 1) + ref, after = rest.split("\"") + if ("<" in ref and ">" in ref): + new_items.append(before + "ref=\"" + htmlescape(ref) + "\"" + after) + else: + new_items.append(item) + return new_items +QtHelpBuilder.build_keywords = new_build_keywords + + +from docutils.parsers.rst import Directive, directives +from docutils.transforms import Transform +try: + from docutils.utils.error_reporting import SafeString, ErrorString +except ImportError: + # error_reporting was not in utils before version 0.11: + from docutils.error_reporting import SafeString, ErrorString + +from docutils import io, nodes + +from sphinx.directives import ObjectDescription +from sphinx.domains import Domain, ObjType +from sphinx.roles import XRefRole +from sphinx.util.nodes import make_refnode +from sphinx import addnodes + +class CMakeModule(Directive): + required_arguments = 1 + optional_arguments = 0 + final_argument_whitespace = True + option_spec = {'encoding': directives.encoding} + + def __init__(self, *args, **keys): + self.re_start = re.compile(r'^#\[(?P=*)\[\.rst:$') + Directive.__init__(self, *args, **keys) + + def run(self): + settings = self.state.document.settings + if not settings.file_insertion_enabled: + raise self.warning('"%s" directive disabled.' % self.name) + + env = self.state.document.settings.env + rel_path, path = env.relfn2path(self.arguments[0]) + path = os.path.normpath(path) + encoding = self.options.get('encoding', settings.input_encoding) + e_handler = settings.input_encoding_error_handler + try: + settings.record_dependencies.add(path) + f = io.FileInput(source_path=path, encoding=encoding, + error_handler=e_handler) + except UnicodeEncodeError as error: + raise self.severe('Problems with "%s" directive path:\n' + 'Cannot encode input file path "%s" ' + '(wrong locale?).' % + (self.name, SafeString(path))) + except IOError as error: + raise self.severe('Problems with "%s" directive path:\n%s.' % + (self.name, ErrorString(error))) + raw_lines = f.read().splitlines() + f.close() + rst = None + lines = [] + for line in raw_lines: + if rst is not None and rst != '#': + # Bracket mode: check for end bracket + pos = line.find(rst) + if pos >= 0: + if line[0] == '#': + line = '' + else: + line = line[0:pos] + rst = None + else: + # Line mode: check for .rst start (bracket or line) + m = self.re_start.match(line) + if m: + rst = ']%s]' % m.group('eq') + line = '' + elif line == '#.rst:': + rst = '#' + line = '' + elif rst == '#': + if line == '#' or line[:2] == '# ': + line = line[2:] + else: + rst = None + line = '' + elif rst is None: + line = '' + lines.append(line) + if rst is not None and rst != '#': + raise self.warning('"%s" found unclosed bracket "#[%s[.rst:" in %s' % + (self.name, rst[1:-1], path)) + self.state_machine.insert_input(lines, path) + return [] + +class _cmake_index_entry: + def __init__(self, desc): + self.desc = desc + + def __call__(self, title, targetid, main = 'main'): +# return (targetid, title, main, targetid, '', '', 0) + return ('pair', u'%s ; %s' % (self.desc, title), targetid, main) + +_cmake_index_objs = { + 'command': _cmake_index_entry('command'), + 'generator': _cmake_index_entry('generator'), + 'manual': _cmake_index_entry('manual'), + 'module': _cmake_index_entry('module'), + 'policy': _cmake_index_entry('policy'), + 'prop_cache': _cmake_index_entry('cache property'), + 'prop_dir': _cmake_index_entry('directory property'), + 'prop_gbl': _cmake_index_entry('global property'), + 'prop_inst': _cmake_index_entry('installed file property'), + 'prop_sf': _cmake_index_entry('source file property'), + 'prop_test': _cmake_index_entry('test property'), + 'prop_tgt': _cmake_index_entry('target property'), + 'variable': _cmake_index_entry('variable'), + } + +def _cmake_object_inventory(env, document, line, objtype, targetid): + inv = env.domaindata['cmake']['objects'] + if targetid in inv: + document.reporter.warning( + 'CMake object "%s" also described in "%s".' % + (targetid, env.doc2path(inv[targetid][0])), line=line) + inv[targetid] = (env.docname, objtype) + +class CMakeTransform(Transform): + + # Run this transform early since we insert nodes we want + # treated as if they were written in the documents. + default_priority = 210 + + def __init__(self, document, startnode): + Transform.__init__(self, document, startnode) + self.titles = {} + + def parse_title(self, docname): + """Parse a document title as the first line starting in [A-Za-z0-9<] + or fall back to the document basename if no such line exists. + The cmake --help-*-list commands also depend on this convention. + Return the title or False if the document file does not exist. + """ + env = self.document.settings.env + title = self.titles.get(docname) + if title is None: + fname = os.path.join(env.srcdir, docname+'.rst') + try: + f = open(fname, 'r') + except IOError: + title = False + else: + for line in f: + if len(line) > 0 and (line[0].isalnum() or line[0] == '<'): + title = line.rstrip() + break + f.close() + if title is None: + title = os.path.basename(docname) + self.titles[docname] = title + return title + + def apply(self): + env = self.document.settings.env + + # Treat some documents as cmake domain objects. + objtype, sep, tail = env.docname.rpartition('/') + make_index_entry = _cmake_index_objs.get(objtype) + if make_index_entry: + title = self.parse_title(env.docname) + # Insert the object link target. + if objtype == 'command': + targetname = title.lower() + else: + targetname = title + targetid = '%s:%s' % (objtype, targetname) + targetnode = nodes.target('', '', ids=[targetid]) + self.document.note_explicit_target(targetnode) + self.document.insert(0, targetnode) + # Insert the object index entry. + indexnode = addnodes.index() + indexnode['entries'] = [make_index_entry(title, targetid)] + self.document.insert(0, indexnode) + # Add to cmake domain object inventory + _cmake_object_inventory(env, self.document, 1, objtype, targetid) + +class CMakeObject(ObjectDescription): + + def handle_signature(self, sig, signode): + # called from sphinx.directives.ObjectDescription.run() + signode += addnodes.desc_name(sig, sig) + return sig + + def add_target_and_index(self, name, sig, signode): + if self.objtype == 'command': + targetname = name.lower() + else: + targetname = name + targetid = '%s:%s' % (self.objtype, targetname) + if targetid not in self.state.document.ids: + signode['names'].append(targetid) + signode['ids'].append(targetid) + signode['first'] = (not self.names) + self.state.document.note_explicit_target(signode) + _cmake_object_inventory(self.env, self.state.document, + self.lineno, self.objtype, targetid) + + make_index_entry = _cmake_index_objs.get(self.objtype) + if make_index_entry: + self.indexnode['entries'].append(make_index_entry(name, targetid)) + +class CMakeXRefRole(XRefRole): + + # See sphinx.util.nodes.explicit_title_re; \x00 escapes '<'. + _re = re.compile(r'^(.+?)(\s*)(?$', re.DOTALL) + _re_sub = re.compile(r'^([^()\s]+)\s*\(([^()]*)\)$', re.DOTALL) + + def __call__(self, typ, rawtext, text, *args, **keys): + # Translate CMake command cross-references of the form: + # `command_name(SUB_COMMAND)` + # to have an explicit target: + # `command_name(SUB_COMMAND) ` + if typ == 'cmake:command': + m = CMakeXRefRole._re_sub.match(text) + if m: + text = '%s <%s>' % (text, m.group(1)) + # CMake cross-reference targets frequently contain '<' so escape + # any explicit `` with '<' not preceded by whitespace. + while True: + m = CMakeXRefRole._re.match(text) + if m and len(m.group(2)) == 0: + text = '%s\x00<%s>' % (m.group(1), m.group(3)) + else: + break + return XRefRole.__call__(self, typ, rawtext, text, *args, **keys) + + # We cannot insert index nodes using the result_nodes method + # because CMakeXRefRole is processed before substitution_reference + # nodes are evaluated so target nodes (with 'ids' fields) would be + # duplicated in each evaluted substitution replacement. The + # docutils substitution transform does not allow this. Instead we + # use our own CMakeXRefTransform below to add index entries after + # substitutions are completed. + # + # def result_nodes(self, document, env, node, is_ref): + # pass + +class CMakeXRefTransform(Transform): + + # Run this transform early since we insert nodes we want + # treated as if they were written in the documents, but + # after the sphinx (210) and docutils (220) substitutions. + default_priority = 221 + + def apply(self): + env = self.document.settings.env + + # Find CMake cross-reference nodes and add index and target + # nodes for them. + for ref in self.document.traverse(addnodes.pending_xref): + if not ref['refdomain'] == 'cmake': + continue + + objtype = ref['reftype'] + make_index_entry = _cmake_index_objs.get(objtype) + if not make_index_entry: + continue + + objname = ref['reftarget'] + targetnum = env.new_serialno('index-%s:%s' % (objtype, objname)) + + targetid = 'index-%s-%s:%s' % (targetnum, objtype, objname) + targetnode = nodes.target('', '', ids=[targetid]) + self.document.note_explicit_target(targetnode) + + indexnode = addnodes.index() + indexnode['entries'] = [make_index_entry(objname, targetid, '')] + ref.replace_self([indexnode, targetnode, ref]) + +class CMakeDomain(Domain): + """CMake domain.""" + name = 'cmake' + label = 'CMake' + object_types = { + 'command': ObjType('command', 'command'), + 'generator': ObjType('generator', 'generator'), + 'variable': ObjType('variable', 'variable'), + 'module': ObjType('module', 'module'), + 'policy': ObjType('policy', 'policy'), + 'prop_cache': ObjType('prop_cache', 'prop_cache'), + 'prop_dir': ObjType('prop_dir', 'prop_dir'), + 'prop_gbl': ObjType('prop_gbl', 'prop_gbl'), + 'prop_inst': ObjType('prop_inst', 'prop_inst'), + 'prop_sf': ObjType('prop_sf', 'prop_sf'), + 'prop_test': ObjType('prop_test', 'prop_test'), + 'prop_tgt': ObjType('prop_tgt', 'prop_tgt'), + 'manual': ObjType('manual', 'manual'), + } + directives = { + 'command': CMakeObject, + 'variable': CMakeObject, + # Other object types cannot be created except by the CMakeTransform + # 'generator': CMakeObject, + # 'module': CMakeObject, + # 'policy': CMakeObject, + # 'prop_cache': CMakeObject, + # 'prop_dir': CMakeObject, + # 'prop_gbl': CMakeObject, + # 'prop_inst': CMakeObject, + # 'prop_sf': CMakeObject, + # 'prop_test': CMakeObject, + # 'prop_tgt': CMakeObject, + # 'manual': CMakeObject, + } + roles = { + 'command': CMakeXRefRole(fix_parens = True, lowercase = True), + 'generator': CMakeXRefRole(), + 'variable': CMakeXRefRole(), + 'module': CMakeXRefRole(), + 'policy': CMakeXRefRole(), + 'prop_cache': CMakeXRefRole(), + 'prop_dir': CMakeXRefRole(), + 'prop_gbl': CMakeXRefRole(), + 'prop_inst': CMakeXRefRole(), + 'prop_sf': CMakeXRefRole(), + 'prop_test': CMakeXRefRole(), + 'prop_tgt': CMakeXRefRole(), + 'manual': CMakeXRefRole(), + } + initial_data = { + 'objects': {}, # fullname -> docname, objtype + } + + def clear_doc(self, docname): + to_clear = set() + for fullname, (fn, _) in self.data['objects'].items(): + if fn == docname: + to_clear.add(fullname) + for fullname in to_clear: + del self.data['objects'][fullname] + + def resolve_xref(self, env, fromdocname, builder, + typ, target, node, contnode): + targetid = '%s:%s' % (typ, target) + obj = self.data['objects'].get(targetid) + if obj is None: + # TODO: warn somehow? + return None + return make_refnode(builder, fromdocname, obj[0], targetid, + contnode, target) + + def get_objects(self): + for refname, (docname, type) in self.data['objects'].items(): + yield (refname, refname, type, docname, refname, 1) + +def setup(app): + app.add_directive('cmake-module', CMakeModule) + app.add_transform(CMakeTransform) + app.add_transform(CMakeXRefTransform) + app.add_domain(CMakeDomain) diff --git a/Installation/cmake/modules/Help/conf.py b/Installation/cmake/modules/Help/conf.py new file mode 100644 index 00000000000..8f40868be48 --- /dev/null +++ b/Installation/cmake/modules/Help/conf.py @@ -0,0 +1,340 @@ +# -*- coding: utf-8 -*- +# +# CGAL CMake Modules documentation build configuration file, created by +# sphinx-quickstart on Fri Sep 23 22:51:32 2016. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +primary_domain = 'cmake' + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['cmake'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The encoding of source files. +# +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'CGAL CMake Modules' +copyright = u'2016, The CGAL Project' +author = u'The CGAL Project' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = u'4.10' +# The full version, including alpha/beta/rc tags. +release = u'4.10' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# +# today = '' +# +# Else, today_fmt is used as the format for a strftime call. +# +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. +# " v documentation" by default. +# +# html_title = u'CGAL CMake Modules v4.10' + +# A shorter title for the navigation bar. Default is the same as html_title. +# +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# +# html_logo = None + +# The name of an image file (relative to this directory) to use as a favicon of +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# +# html_extra_path = [] + +# If not None, a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +# The empty string is equivalent to '%b %d, %Y'. +# +# html_last_updated_fmt = None + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# +# html_additional_pages = {} + +# If false, no module index is generated. +# +# html_domain_indices = True + +# If false, no index is generated. +# +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' +# +# html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# 'ja' uses this config value. +# 'zh' user can custom change `jieba` dictionary path. +# +# html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# +# html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'CGALModulesdoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'CGALModules.tex', u'CGAL CMake Modules Documentation', + u'Laurent Rineau', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# +# latex_use_parts = False + +# If true, show page references after internal links. +# +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# +# latex_appendices = [] + +# It false, will not define \strong, \code, itleref, \crossref ... but only +# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added +# packages. +# +# latex_keep_old_macro_names = True + +# If false, no module index is generated. +# +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'cgalmodules', u'CGAL CMake Modules Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +# +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'CGALModules', u'CGAL CMake Modules Documentation', + author, 'CGALModules', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# +# texinfo_appendices = [] + +# If false, no module index is generated. +# +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# +# texinfo_no_detailmenu = False diff --git a/Installation/cmake/modules/Help/index.rst b/Installation/cmake/modules/Help/index.rst new file mode 100644 index 00000000000..7178feb71ac --- /dev/null +++ b/Installation/cmake/modules/Help/index.rst @@ -0,0 +1,34 @@ +.. CGAL CMake Modules documentation master file, created by + sphinx-quickstart on Fri Sep 23 22:51:32 2016. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to CGAL CMake Modules's documentation! +============================================== + +Contents: + +.. toctree:: + :maxdepth: 1 + + CGAL_SetupGMP + CGAL_SetupLEDA + CGAL_SetupBoost + CGAL_SetupCGALDependencies + CGAL_SetupCGAL_CoreDependencies + CGAL_SetupCGAL_Qt5Dependencies + CGAL_SetupCGAL_ImageIODependencies + +TODO +^^^^ +- ``CGAL_SetupDependencies.cmake`` +- ``CGAL_SetupFlags.cmake`` +- ``CGAL_SetupVLD.cmake`` + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/Installation/cmake/modules/Makefile b/Installation/cmake/modules/Makefile new file mode 100644 index 00000000000..a45ff590e87 --- /dev/null +++ b/Installation/cmake/modules/Makefile @@ -0,0 +1,225 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) Help +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) Help + +.PHONY: help +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " epub3 to make an epub3" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + @echo " dummy to check syntax errors of document sources" + +.PHONY: clean +clean: + rm -rf $(BUILDDIR)/* + +.PHONY: html +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: dirhtml +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +.PHONY: singlehtml +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +.PHONY: pickle +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +.PHONY: json +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +.PHONY: htmlhelp +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +.PHONY: qthelp +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/CGALModules.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/CGALModules.qhc" + +.PHONY: applehelp +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/CGALModules" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/CGALModules" + @echo "# devhelp" + +.PHONY: epub +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +.PHONY: epub3 +epub3: + $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 + @echo + @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." + +.PHONY: latex +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +.PHONY: latexpdf +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: latexpdfja +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: text +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +.PHONY: man +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +.PHONY: texinfo +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +.PHONY: info +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +.PHONY: gettext +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +.PHONY: changes +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +.PHONY: linkcheck +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +.PHONY: doctest +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +.PHONY: coverage +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +.PHONY: pseudoxml +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +.PHONY: dummy +dummy: + $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy + @echo + @echo "Build finished. Dummy builder generates no files." diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 075b6c17093..9a70bf7ec18 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -17,16 +17,21 @@ set(CGAL_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) if(NOT USE_CGAL_FILE_INCLUDED) set(USE_CGAL_FILE_INCLUDED 1) - include(CGAL_Common) - include(CGAL_SetupFlags) - include(CGAL_GeneratorSpecificSettings) - include(CGAL_TweakFindBoost) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Common.cmake) + if( RUNNING_CGAL_AUTO_TEST ) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupFlags.cmake) + else() + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_display_flags.cmake) + endif() + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_GeneratorSpecificSettings.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_TweakFindBoost.cmake) set(CGAL_INSTALLED_SCM_BRANCH_NAME ${CGAL_SCM_BRANCH_NAME}) set(CGAL_SCM_BRANCH_NAME "") if( NOT "${CGAL_INSTALLED_SCM_BRANCH_NAME}" STREQUAL "" ) - include(CGAL_SCM) + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SCM.cmake) + CGAL_detect_git(${CMAKE_SOURCE_DIR}) if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "" ) message ( STATUS "Code taken from Git branch: ${CGAL_SCM_BRANCH_NAME}" ) if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "${CGAL_INSTALLED_SCM_BRANCH_NAME}") @@ -45,7 +50,9 @@ if(NOT USE_CGAL_FILE_INCLUDED) include_directories( "${CMAKE_CURRENT_BINARY_DIR}" ) - if(TARGET CGAL) + if(TARGET CGAL::CGAL) + add_to_list( CGAL_LIBRARIES CGAL::CGAL ) + elseif(TARGET CGAL) add_to_list( CGAL_LIBRARIES CGAL ) else() add_to_list( CGAL_LIBRARIES ${CGAL_LIBRARY} ) @@ -62,7 +69,7 @@ if(NOT USE_CGAL_FILE_INCLUDED) add_definitions(-DCGAL_HEADER_ONLY) if(NOT CGAL_NO_BLANKET_LINKING) link_directories ( ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) - link_libraries ( ${CGAL_3RD_PARTY_LIBRARIES} ) + link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) endif() else() if(NOT CGAL_NO_BLANKET_LINKING) diff --git a/Installation/cmake/modules/UseTBB.cmake b/Installation/cmake/modules/UseTBB.cmake index 25122e25825..5a22f6f079a 100644 --- a/Installation/cmake/modules/UseTBB.cmake +++ b/Installation/cmake/modules/UseTBB.cmake @@ -4,3 +4,5 @@ include_directories ( ${TBB_INCLUDE_DIRS} ) link_directories( ${TBB_LIBRARY_DIRS} ) add_definitions( -DNOMINMAX -DCGAL_LINKED_WITH_TBB ) + +message(DEPRECATION "This file UseTBB.cmake is deprecated, and the function `CGAL_target_use_TBB` from CGAL_target_use_TBB.cmake should be used instead.") diff --git a/Installation/cmake/modules/Use_CGAL_Qt5_headers.cmake b/Installation/cmake/modules/Use_CGAL_Qt5_headers.cmake deleted file mode 100644 index 4132d77bfab..00000000000 --- a/Installation/cmake/modules/Use_CGAL_Qt5_headers.cmake +++ /dev/null @@ -1,13 +0,0 @@ -qt5_wrap_cpp(CGAL_Qt5_MOC_FILES - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsItem.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewInput.h) - -# qrc files (resources files, that contain icons, at least) -qt5_add_resources (CGAL_Qt5_RESOURCE_FILES - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/CGAL.qrc - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/Input.qrc - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/File.qrc - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/Triangulation_2.qrc) - diff --git a/Installation/config/support/CGAL_test_cpp_version.cpp b/Installation/cmake/modules/config/support/CGAL_test_cpp_version.cpp similarity index 100% rename from Installation/config/support/CGAL_test_cpp_version.cpp rename to Installation/cmake/modules/config/support/CGAL_test_cpp_version.cpp diff --git a/Installation/config/support/print_BOOST_version.cpp b/Installation/cmake/modules/config/support/print_BOOST_version.cpp similarity index 100% rename from Installation/config/support/print_BOOST_version.cpp rename to Installation/cmake/modules/config/support/print_BOOST_version.cpp diff --git a/Installation/config/support/print_GCC_version.cpp b/Installation/cmake/modules/config/support/print_GCC_version.cpp similarity index 100% rename from Installation/config/support/print_GCC_version.cpp rename to Installation/cmake/modules/config/support/print_GCC_version.cpp diff --git a/Installation/config/support/print_GMP_version.cpp b/Installation/cmake/modules/config/support/print_GMP_version.cpp similarity index 100% rename from Installation/config/support/print_GMP_version.cpp rename to Installation/cmake/modules/config/support/print_GMP_version.cpp diff --git a/Installation/config/support/print_IntelCompiler_version.cpp b/Installation/cmake/modules/config/support/print_IntelCompiler_version.cpp similarity index 100% rename from Installation/config/support/print_IntelCompiler_version.cpp rename to Installation/cmake/modules/config/support/print_IntelCompiler_version.cpp diff --git a/Installation/config/support/print_LEDA_version.cpp b/Installation/cmake/modules/config/support/print_LEDA_version.cpp similarity index 100% rename from Installation/config/support/print_LEDA_version.cpp rename to Installation/cmake/modules/config/support/print_LEDA_version.cpp diff --git a/Installation/config/support/print_MPFI_version.cpp b/Installation/cmake/modules/config/support/print_MPFI_version.cpp similarity index 100% rename from Installation/config/support/print_MPFI_version.cpp rename to Installation/cmake/modules/config/support/print_MPFI_version.cpp diff --git a/Installation/config/support/print_MPFR_version.cpp b/Installation/cmake/modules/config/support/print_MPFR_version.cpp similarity index 100% rename from Installation/config/support/print_MPFR_version.cpp rename to Installation/cmake/modules/config/support/print_MPFR_version.cpp diff --git a/Installation/config/support/print_OPENGL_version.cpp b/Installation/cmake/modules/config/support/print_OPENGL_version.cpp similarity index 100% rename from Installation/config/support/print_OPENGL_version.cpp rename to Installation/cmake/modules/config/support/print_OPENGL_version.cpp diff --git a/Installation/config/support/print_QT4_version.cpp b/Installation/cmake/modules/config/support/print_QT4_version.cpp similarity index 100% rename from Installation/config/support/print_QT4_version.cpp rename to Installation/cmake/modules/config/support/print_QT4_version.cpp diff --git a/Installation/config/support/print_QT_version.cpp b/Installation/cmake/modules/config/support/print_QT_version.cpp similarity index 100% rename from Installation/config/support/print_QT_version.cpp rename to Installation/cmake/modules/config/support/print_QT_version.cpp diff --git a/Installation/config/support/print_ZLIB_version.cpp b/Installation/cmake/modules/config/support/print_ZLIB_version.cpp similarity index 100% rename from Installation/config/support/print_ZLIB_version.cpp rename to Installation/cmake/modules/config/support/print_ZLIB_version.cpp diff --git a/Installation/config/support/test_ATLAS.cpp b/Installation/cmake/modules/config/support/test_ATLAS.cpp similarity index 100% rename from Installation/config/support/test_ATLAS.cpp rename to Installation/cmake/modules/config/support/test_ATLAS.cpp diff --git a/Installation/config/support/test_BLAS.cpp b/Installation/cmake/modules/config/support/test_BLAS.cpp similarity index 100% rename from Installation/config/support/test_BLAS.cpp rename to Installation/cmake/modules/config/support/test_BLAS.cpp diff --git a/Installation/config/support/test_BOOST.cpp b/Installation/cmake/modules/config/support/test_BOOST.cpp similarity index 100% rename from Installation/config/support/test_BOOST.cpp rename to Installation/cmake/modules/config/support/test_BOOST.cpp diff --git a/Installation/config/support/test_BOOST_PROGRAM_OPTIONS.cpp b/Installation/cmake/modules/config/support/test_BOOST_PROGRAM_OPTIONS.cpp similarity index 100% rename from Installation/config/support/test_BOOST_PROGRAM_OPTIONS.cpp rename to Installation/cmake/modules/config/support/test_BOOST_PROGRAM_OPTIONS.cpp diff --git a/Installation/config/support/test_BOOST_THREAD.cpp b/Installation/cmake/modules/config/support/test_BOOST_THREAD.cpp similarity index 100% rename from Installation/config/support/test_BOOST_THREAD.cpp rename to Installation/cmake/modules/config/support/test_BOOST_THREAD.cpp diff --git a/Installation/config/support/test_GMP.cpp b/Installation/cmake/modules/config/support/test_GMP.cpp similarity index 100% rename from Installation/config/support/test_GMP.cpp rename to Installation/cmake/modules/config/support/test_GMP.cpp diff --git a/Installation/config/support/test_GMPXX.cpp b/Installation/cmake/modules/config/support/test_GMPXX.cpp similarity index 100% rename from Installation/config/support/test_GMPXX.cpp rename to Installation/cmake/modules/config/support/test_GMPXX.cpp diff --git a/Installation/config/support/test_LAPACK.cpp b/Installation/cmake/modules/config/support/test_LAPACK.cpp similarity index 100% rename from Installation/config/support/test_LAPACK.cpp rename to Installation/cmake/modules/config/support/test_LAPACK.cpp diff --git a/Installation/config/support/test_LEDA.cpp b/Installation/cmake/modules/config/support/test_LEDA.cpp similarity index 100% rename from Installation/config/support/test_LEDA.cpp rename to Installation/cmake/modules/config/support/test_LEDA.cpp diff --git a/Installation/config/support/test_LEDAWIN.cpp b/Installation/cmake/modules/config/support/test_LEDAWIN.cpp similarity index 100% rename from Installation/config/support/test_LEDAWIN.cpp rename to Installation/cmake/modules/config/support/test_LEDAWIN.cpp diff --git a/Installation/config/support/test_LIDIA.cpp b/Installation/cmake/modules/config/support/test_LIDIA.cpp similarity index 100% rename from Installation/config/support/test_LIDIA.cpp rename to Installation/cmake/modules/config/support/test_LIDIA.cpp diff --git a/Installation/config/support/test_MPFR.cpp b/Installation/cmake/modules/config/support/test_MPFR.cpp similarity index 100% rename from Installation/config/support/test_MPFR.cpp rename to Installation/cmake/modules/config/support/test_MPFR.cpp diff --git a/Installation/config/support/test_OPENGL.cpp b/Installation/cmake/modules/config/support/test_OPENGL.cpp similarity index 100% rename from Installation/config/support/test_OPENGL.cpp rename to Installation/cmake/modules/config/support/test_OPENGL.cpp diff --git a/Installation/config/support/test_QT.cpp b/Installation/cmake/modules/config/support/test_QT.cpp similarity index 100% rename from Installation/config/support/test_QT.cpp rename to Installation/cmake/modules/config/support/test_QT.cpp diff --git a/Installation/config/support/test_X11.cpp b/Installation/cmake/modules/config/support/test_X11.cpp similarity index 100% rename from Installation/config/support/test_X11.cpp rename to Installation/cmake/modules/config/support/test_X11.cpp diff --git a/Installation/config/support/test_ZLIB.cpp b/Installation/cmake/modules/config/support/test_ZLIB.cpp similarity index 100% rename from Installation/config/support/test_ZLIB.cpp rename to Installation/cmake/modules/config/support/test_ZLIB.cpp diff --git a/Installation/config/support/test_syntaxonly.cpp b/Installation/cmake/modules/config/support/test_syntaxonly.cpp similarity index 100% rename from Installation/config/support/test_syntaxonly.cpp rename to Installation/cmake/modules/config/support/test_syntaxonly.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_DENORMALS_COMPILE_BUG.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_DENORMALS_COMPILE_BUG.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_DENORMALS_COMPILE_BUG.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_DENORMALS_COMPILE_BUG.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_IEEE_754_BUG.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_IEEE_754_BUG.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_IEEE_754_BUG.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_IEEE_754_BUG.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_ISTREAM_INT_BUG.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_ISTREAM_INT_BUG.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_ISTREAM_INT_BUG.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_ISTREAM_INT_BUG.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_6.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_6.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_6.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_6.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_7.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_8.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_8.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_MATCHING_BUG_8.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_8.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_NO_LIMITS.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_NO_LIMITS.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_NO_LIMITS.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_NO_LIMITS.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_NO_NEXTAFTER.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_NO_NEXTAFTER.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_NO_NEXTAFTER.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_NO_NEXTAFTER.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_NO_STL.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_NO_STL.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_NO_STL.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_NO_STL.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_NUMERIC_LIMITS_BUG.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_NUMERIC_LIMITS_BUG.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_NUMERIC_LIMITS_BUG.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_NUMERIC_LIMITS_BUG.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG.cpp diff --git a/Installation/config/testfiles/CGAL_CFG_USING_BASE_MEMBER_BUG_2.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_USING_BASE_MEMBER_BUG_2.cpp similarity index 100% rename from Installation/config/testfiles/CGAL_CFG_USING_BASE_MEMBER_BUG_2.cpp rename to Installation/cmake/modules/config/testfiles/CGAL_CFG_USING_BASE_MEMBER_BUG_2.cpp diff --git a/Installation/config/version.h.in b/Installation/cmake/modules/config/version.h.in similarity index 100% rename from Installation/config/version.h.in rename to Installation/cmake/modules/config/version.h.in diff --git a/Installation/cmake/modules/run_test_with_cin.cmake b/Installation/cmake/modules/run_test_with_cin.cmake index c5218fc8141..1877beb096d 100644 --- a/Installation/cmake/modules/run_test_with_cin.cmake +++ b/Installation/cmake/modules/run_test_with_cin.cmake @@ -8,10 +8,17 @@ if(NOT CIN OR NOT EXISTS ${CIN}) "The variable `CIN` should be defined to the input file for the test!") endif() -execute_process( - COMMAND ${CMD} - INPUT_FILE ${CIN} - RESULT_VARIABLE error_result) +if(ANDROID) + execute_process( + COMMAND adb shell "cd ${ANDROID_DIR_PREFIX}${PROJECT_NAME} && ${ANDROID_DIR_PREFIX}${CMD}" + INPUT_FILE ${CIN} + RESULT_VARIABLE error_result) +else() + execute_process( + COMMAND ${CMD} + INPUT_FILE ${CIN} + RESULT_VARIABLE error_result) +endif() if(error_result) message(SEND_ERROR diff --git a/Installation/config/testfiles/CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp b/Installation/config/testfiles/CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp deleted file mode 100644 index 5d59ee84aef..00000000000 --- a/Installation/config/testfiles/CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2005 Foundation for Research and Technology-Hellas (Greece). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; either version 3 of the License, -// or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0+ -// -// -// Author(s) : Menelaos Karavelas - -//| The flag CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG is set -//| if the compiler cannot recognize the declaration of a nested -//| class as friend. -//| Compilers such as the Intel compiler 8.x (for linux or windows), -//| MSVC 7.1 or pgCC have this "bug". It should be noted that the C++ -//| standard is a bit vague on this issue, in other words what is referred -//| to as "bug" above, may not really be a bug. Hopefully, the next standard -//| will resolve this issue. - -#include - -template -struct A -{ - void do_something() const { - std::cerr << "A's do_something" << std::endl; - T().do_something(); - } -}; - -template -struct B -{ - typedef A Nested; - - void do_something() const { - std::cerr << "B's do_something" << std::endl; - T().do_something(); - } -}; - - -template -class C -{ - friend struct B< C >; - friend struct B< C >::Nested; - // the following declaration (instead of the one above) is what - // pgCC, Intel 8.x and MSVC 7.1 would accept: - // friend class A< C >; - - protected: - void do_something() const { - std::cerr << "C's do_something" << std::endl; - } -}; - - -int main() -{ - A< C > a; - B< C > b; - - a.do_something(); - b.do_something(); - - return 0; -} diff --git a/Installation/include/CGAL/MSVC_compiler_config.h b/Installation/include/CGAL/MSVC_compiler_config.h new file mode 100644 index 00000000000..c0f7db275ba --- /dev/null +++ b/Installation/include/CGAL/MSVC_compiler_config.h @@ -0,0 +1,37 @@ +// Copyright (c) 2016 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0+ +// +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_MSVC_COMPILER_CONFIG_H +#define CGAL_MSVC_COMPILER_CONFIG_H + +// For all known version of MSVC. Actually we do not really have a +// test for that bug. +#define CGAL_CFG_MATCHING_BUG_6 1 + +// Fixed since MSVC 2015 +#define CGAL_CFG_MATCHING_BUG_7 1 + +// for all known version of MSVC +#define CGAL_CFG_MATCHING_BUG_8 1 + +// Should be only for MSVC 2012 and 2013 in Release +#define CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG 1 + +#endif // CGAL_MSVC_COMPILER_CONFIG_H diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 69f851441aa..420e7311ddd 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -140,7 +140,18 @@ // platform specific workaround flags (CGAL_CFG_...) //----------------------------------------------------------------------// -#include +#if CGAL_HEADER_ONLY +# include +# if(BOOST_MSVC) +# include +# endif +#else +# include +#endif + +#if BOOST_MSVC && CGAL_TEST_SUITE +# include +#endif //----------------------------------------------------------------------// // Support for DLL on Windows (CGAL_EXPORT macro) @@ -538,7 +549,7 @@ using std::max; #if __has_feature(cxx_thread_local) || \ ( (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L ) || \ ( _MSC_VER >= 1900 ) -// see also Installation/config/support/CGAL_test_cpp_version.cpp +// see also Installation/cmake/modules/config/support/CGAL_test_cpp_version.cpp #define CGAL_CAN_USE_CXX11_THREAD_LOCAL #endif diff --git a/Installation/include/CGAL/internal/enable_third_party_libraries.h b/Installation/include/CGAL/internal/enable_third_party_libraries.h new file mode 100644 index 00000000000..5bab670ae2f --- /dev/null +++ b/Installation/include/CGAL/internal/enable_third_party_libraries.h @@ -0,0 +1,53 @@ +// Copyright (c) 2016 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0+ +// +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_INTERNAL_ENABLE_THIRD_PARTY_LIBRARIES_H +#define CGAL_INTERNAL_ENABLE_THIRD_PARTY_LIBRARIES_H + +// GMP and MPFR are highly recommended in CGAL. +#define CGAL_USE_GMP 1 +#define CGAL_USE_MPFR 1 + +#if CGAL_DISABLE_GMP && ! defined(CGAL_NO_GMP) +# define CGAL_NO_GMP 1 +#endif + +#if CGAL_NO_GMP || CGAL_NO_MPFR +# undef CGAL_USE_MPFR +# undef CGAL_USE_GMP +#endif + +#if defined(__has_include) +# if CGAL_USE_GMP && ! __has_include() +# warning " cannot be found. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose." +# undef CGAL_USE_GMP +# undef CGAL_USE_MPFR +# elif CGAL_USE_MPFR && ! __has_include() +# warning " cannot be found and the GMP support in CGAL requires it. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose." +# undef CGAL_USE_GMP +# undef CGAL_USE_MPFR +# endif // CGAL_USE_MPFR and no +#endif // __has_include + +#if CGAL_USE_GMP && CGAL_USE_MPFR && ! CGAL_NO_CORE +# define CGAL_USE_CORE 1 +#endif + +#endif // CGAL_INTERNAL_ENABLE_THIRD_PARTY_LIBRARIES_H diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h new file mode 100644 index 00000000000..1545e9c5c79 --- /dev/null +++ b/Installation/include/CGAL/version.h @@ -0,0 +1,34 @@ +// Copyright (c) 2009 +// Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), +// INRIA Sophia-Antipolis (France), +// Max-Planck-Institute Saarbruecken (Germany), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0+ +// +// Author(s) : - + +#ifndef CGAL_VERSION_H +#define CGAL_VERSION_H + +#define CGAL_VERSION 4.12-dev +#define CGAL_VERSION_NR 1041200000 +#define CGAL_SVN_REVISION 99999 + +#include + +#endif diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake new file mode 100644 index 00000000000..73624767ee1 --- /dev/null +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -0,0 +1,129 @@ +# +# This file is the CGALConfig.cmake for a header-only CGAL installation +# + +if(CGALConfig_included) + return() +endif() + +message(STATUS "Using header-only CGAL") + +set(CGALConfig_included TRUE) + +get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +set(CGAL_HEADER_ONLY TRUE) + +set( CGAL_REQUESTED_COMPONENTS ${CGAL_FIND_COMPONENTS} ) + +# Save the current source directory. That variable can be changed by +# a `CMakeLists.txt`, for `CMakeLists.txt` files that are created in +# the binary directory. +set(CGAL_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +function(_detect_branch_build VAR_NAME) + if(IS_DIRECTORY ${CGAL_CONFIG_DIR}/../../../../Installation/package_info/Installation/) + set(${VAR_NAME} TRUE PARENT_SCOPE) + else() + set(${VAR_NAME} FALSE PARENT_SCOPE) + endif() +endfunction() + +_detect_branch_build(BRANCH_BUILD) +if(BRANCH_BUILD) + set(CGAL_ROOT ${CGAL_CONFIG_DIR}/../../../..) + set(CGAL_INSTALLATION_PACKAGE_DIR ${CGAL_ROOT}/Installation) + set(CGAL_GRAPHICSVIEW_PACKAGE_DIR ${CGAL_ROOT}/GraphicsView) + set(CGAL_MODULES_DIR ${CGAL_ROOT}/Installation/cmake/modules) + file(GLOB packages_dirs ${CGAL_ROOT}/*) +# message("packages_dirs: ${packages_dirs}") + foreach(package_dir ${packages_dirs}) + set(inc_dir ${package_dir}/include) + if(IS_DIRECTORY ${inc_dir} + AND IS_DIRECTORY ${package_dir}/package_info) + list(APPEND CGAL_INCLUDE_DIRS ${inc_dir}) + if(EXISTS ${inc_dir}/CGAL/config.h) + set(CGAL_FOUND TRUE) + endif() + endif() + endforeach() +else() + # not BRANCH_BUILD: it can be an installed CGAL, or the tarball layout + if(EXISTS ${CGAL_CONFIG_DIR}/CGAL_add_test.cmake) + # installed CGAL + set(CGAL_MODULES_DIR ${CGAL_CONFIG_DIR}) + else() + # tarball + set(CGAL_MODULES_DIR ${CGAL_ROOT}/cmake/modules) + endif() + + set(CGAL_ROOT ${CGAL_CONFIG_DIR}/../../..) + set(CGAL_INSTALLATION_PACKAGE_DIR ${CGAL_ROOT}) + set(CGAL_GRAPHICSVIEW_PACKAGE_DIR ${CGAL_ROOT}) + set(CGAL_INCLUDE_DIRS ${CGAL_ROOT}/include) + if(EXISTS ${CGAL_ROOT}/include/CGAL/config.h) + set(CGAL_FOUND TRUE) + endif() +endif() + +if(NOT CGAL_FOUND) + return() +endif() + +list(APPEND CMAKE_MODULE_PATH ${CGAL_MODULES_DIR}) + +include( ${CGAL_MODULES_DIR}/CGAL_SCM.cmake ) +CGAL_detect_git(${CGAL_CONFIG_DIR}/../../../..) + +set(CGAL_LIBRARIES CGAL) +foreach(comp ${CGAL_FIND_COMPONENTS}) + if(NOT comp MATCHES "Core|ImageIO|Qt5") + message(FATAL_ERROR "The requested CGAL component ${comp} does not exist!") + endif() + list(APPEND CGAL_LIBRARIES CGAL_${comp}) +endforeach() + +# +# Search for all dependencies +# +foreach(cgal_lib ${CGAL_LIBRARIES}) + include(CGAL_Setup${cgal_lib}Dependencies) +endforeach() + +# +# Define the CGAL targets and theirs CGAL:: aliases +# +foreach(cgal_lib ${CGAL_LIBRARIES}) + set(WITH_${cgal_lib} TRUE) + if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib}) + add_library(${cgal_lib} INTERFACE) + if(NOT TARGET CGAL::${cgal_lib}) + add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib}) + endif() + endif() +endforeach() + +# this include has to be after the loop that includes the +# `CGAL_Setup${cgal_lib}Dependencies` files +include(CGAL_setup_target_dependencies) + +foreach(cgal_lib ${CGAL_LIBRARIES}) + if(${cgal_lib}_FOUND) + CGAL_setup_target_dependencies(${cgal_lib} INTERFACE) + endif() +endforeach() + +target_compile_definitions(CGAL INTERFACE CGAL_HEADER_ONLY=1) + + +# +# +# + +include(${CGAL_MODULES_DIR}/CGAL_CreateSingleSourceCGALProgram.cmake) +include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) + +# Temporary? Change the CMAKE module path +cgal_setup_module_path() + +set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) diff --git a/Installation/src/CGAL/CMakeLists.txt b/Installation/src/CGAL/CMakeLists.txt index c3c36110247..cf661e93fa7 100644 --- a/Installation/src/CGAL/CMakeLists.txt +++ b/Installation/src/CGAL/CMakeLists.txt @@ -1,19 +1,24 @@ message("Configuring libCGAL") -use_essential_libs() - -include_directories (SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS}) - -add_definitions(${CGAL_3RD_PARTY_DEFINITIONS}) - -link_directories(${CGAL_3RD_PARTY_LIBRARIES_DIRS}) - collect_cgal_library(CGAL "") +include(CGAL_SetupCGALDependencies) + if(CGAL_HEADER_ONLY) - target_link_libraries(CGAL INTERFACE ${CGAL_3RD_PARTY_LIBRARIES}) -else() - target_link_libraries(CGAL ${CGAL_3RD_PARTY_LIBRARIES}) + set(keyword "INTERFACE") endif() +CGAL_setup_CGAL_dependencies(CGAL ${keyword}) + +if(CGAL_HEADER_ONLY) + target_compile_definitions(CGAL INTERFACE CGAL_HEADER_ONLY=1) +endif() + +if(NOT CGAL_DISABLE_GMP) + get_dependency_version(GMP) + get_dependency_version(MPFR) +endif() + +message( STATUS "USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'" ) + message("libCGAL is configured") diff --git a/Installation/src/CMakeLists.txt b/Installation/src/CMakeLists.txt index da2b92f5bad..f9a8b35c9c3 100644 --- a/Installation/src/CMakeLists.txt +++ b/Installation/src/CMakeLists.txt @@ -64,6 +64,11 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES) add_library(${LIBRARY_NAME} INTERFACE) endif() + # Add an alias with the prefix `CGAL::`, so that consumer + # CMakeLists.txt can be the target like if it was an imported + # target. + add_library(CGAL::${LIBRARY_NAME} ALIAS ${LIBRARY_NAME}) + if(CGAL_AUTO_LINK_ENABLED) if (NOT CGAL_HEADER_ONLY) set_target_properties( ${LIBRARY_NAME} PROPERTIES @@ -81,7 +86,7 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES) endif() endif() - # if (NOT CGAL_HEADER_ONLY) + if (NOT CGAL_HEADER_ONLY) install(TARGETS ${LIBRARY_NAME} EXPORT ${LIBRARY_NAME}Exports RUNTIME DESTINATION "${CGAL_INSTALL_BIN_DIR}" LIBRARY DESTINATION "${CGAL_INSTALL_LIB_DIR}" @@ -89,15 +94,14 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES) install(EXPORT ${LIBRARY_NAME}Exports DESTINATION "${CGAL_INSTALL_CMAKE_DIR}" NAMESPACE CGAL::) - # endif() - - # We have to call configure_file twice to force double expansion of variables. - configure_file("${CGAL_MODULES_DIR}/CGALLibConfig.cmake.in" - "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY) - configure_file("${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" - "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY) - install(FILES "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" DESTINATION ${CGAL_INSTALL_CMAKE_DIR}) + # We have to call configure_file twice to force double expansion of variables. + configure_file("${CGAL_MODULES_DIR}/CGALLibConfig.cmake.in" + "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY) + configure_file("${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" + "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY) + install(FILES "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" DESTINATION ${CGAL_INSTALL_CMAKE_DIR}) + endif() endfunction() function( configure_component DIR COMPONENT ) @@ -209,9 +213,9 @@ CGAL_add_if_target(CGAL_Core) CGAL_add_if_target(CGAL_ImageIO) CGAL_add_if_target(CGAL_Qt5) -# if (NOT CGAL_HEADER_ONLY) +if (NOT CGAL_HEADER_ONLY) export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake") -# endif() +endif() message(STATUS "Sources for CGAL component libraries '${CGAL_CONFIGURED_LIBRARIES}' detected") diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index ca9a06d013b..ce85c54f412 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -46,11 +46,10 @@ if ( CGAL_FOUND ) endif() find_package( TBB QUIET ) - if( TBB_FOUND ) - include(${TBB_USE_FILE}) - list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES}) - endif() create_single_source_cgal_program( "test_TBB.cpp" ) + if(TBB_FOUND) + CGAL_target_use_TBB(test_TBB) + endif() create_link_to_program(CGAL) diff --git a/Kernel_23/doc/Kernel_23/CGAL/Cartesian.h b/Kernel_23/doc/Kernel_23/CGAL/Cartesian.h index 9d7ac821455..80c0005a8db 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Cartesian.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Cartesian.h @@ -26,8 +26,7 @@ All geometric objects in `Cartesian` are reference counted. */ template< typename FieldNumberType > -class Cartesian { -public: +struct Cartesian { /// \name Types /// @{ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Dimension.h b/Kernel_23/doc/Kernel_23/CGAL/Dimension.h index 7bede383919..6616e287548 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Dimension.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Dimension.h @@ -29,8 +29,7 @@ assert(dimension == 2); */ template< typename T, typename K = typename Kernel_traits::Kernel > -class Ambient_dimension { -public: +struct Ambient_dimension { /// \name Constants /// @{ @@ -84,8 +83,7 @@ std::cout << get_origin(Dimension_tag<2>())) << std::endl; */ template< typename int dim > -class Dimension_tag { -public: +struct Dimension_tag { /// \name Constants /// @{ @@ -126,8 +124,7 @@ std::cout << get_origin(Dynamic_dimension_tag())) << std::endl; */ -class Dynamic_dimension_tag { -public: +struct Dynamic_dimension_tag { /// @} @@ -158,8 +155,7 @@ assert(dimension == 0); */ template< typename T, typename K = typename Kernel_traits::Kernel > -class Feature_dimension { -public: +struct Feature_dimension { /// \name Constants /// @{ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Filtered_kernel.h b/Kernel_23/doc/Kernel_23/CGAL/Filtered_kernel.h index db21ada964e..5ef9d752f2d 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Filtered_kernel.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Filtered_kernel.h @@ -40,8 +40,7 @@ orientation(p,q,r); // exact */ template< typename CK > -class Filtered_kernel_adaptor { -public: +struct Filtered_kernel_adaptor { /// @} @@ -98,8 +97,7 @@ filters may be used for a few selected critical predicates. */ template< typename CK > -class Filtered_kernel { -public: +struct Filtered_kernel { /// \name Types /// @{ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Homogeneous.h b/Kernel_23/doc/Kernel_23/CGAL/Homogeneous.h index 433d5c48559..51f704c9d89 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Homogeneous.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Homogeneous.h @@ -26,8 +26,7 @@ This model of a kernel uses reference counting. */ template< typename RingNumberType > -class Homogeneous { -public: +struct Homogeneous { /// \name Types /// @{ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Kernel_traits.h b/Kernel_23/doc/Kernel_23/CGAL/Kernel_traits.h index 9bb8270ad6d..3f650d01399 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Kernel_traits.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Kernel_traits.h @@ -27,8 +27,7 @@ construct_segment(Point p, Point q) */ template< typename T > -class Kernel_traits { -public: +struct Kernel_traits { /// \name Types /// @{ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Simple_cartesian.h b/Kernel_23/doc/Kernel_23/CGAL/Simple_cartesian.h index c07aa377649..6d7da5105b0 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Simple_cartesian.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Simple_cartesian.h @@ -28,8 +28,7 @@ that copy objects intensively. */ template< typename FieldNumberType > -class Simple_cartesian { -public: +struct Simple_cartesian { /// \name Types /// @{ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Simple_homogeneous.h b/Kernel_23/doc/Kernel_23/CGAL/Simple_homogeneous.h index 6a8244560a3..5eb497c93d9 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Simple_homogeneous.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Simple_homogeneous.h @@ -28,8 +28,7 @@ that copy objects intensively, or slightly speed up others. */ template< typename RingNumberType > -class Simple_homogeneous { -public: +struct Simple_homogeneous { /// \name Types /// @{ diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_Result_of_kernel.h b/Kernel_23/test/Kernel_23/include/CGAL/_Result_of_kernel.h deleted file mode 100644 index 1664aaac31e..00000000000 --- a/Kernel_23/test/Kernel_23/include/CGAL/_Result_of_kernel.h +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) 2011 GeometryFactory (France). All rights reserved. -// All rights reserved. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; version 2.1 of the License. -// See the file LICENSE.LGPL distributed with CGAL. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-2.1 -// -// -// Author(s) : Philipp Moeller - -#ifndef CGAL_RESULT_OF_KERNEL_H -#define CGAL_RESULT_OF_KERNEL_H - -#include - -#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) && !defined(CGAL_CFG_NO_CPP0X_STATIC_ASSERT) - -#define CGAL_RESULT_OF_KERNEL 1 - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include - - -// Unfortunately this test is only an approximation. At this point -// cpp11::result_of behaves as C++11 result_of and we cannot force it -// back into an old mode thanks to the include guards. We instead use -// a TR1 implementation of result_of to compare the types. This is the -// best we can go for. - -namespace CGAL { - // avoid crashes with what we already have in namespace internal - namespace result_of_kernel { - // required for smooth wrapping of the functors - BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type) - BOOST_MPL_HAS_XXX_TRAIT_DEF(Rep) - - template - struct Lazy_is_same { - typedef boost::is_same type; - }; - - // trickery to get rid of the inequality that appears with the - // return_base_tag versions of construct calls - template, - typename - boost::mpl::eval_if< has_Rep, - Lazy_is_same, - boost::false_type >::type - >::value > - struct Rep_equal; - - template - struct Rep_equal : boost::true_type {}; - template - struct Rep_equal : boost::false_type {}; - } - - // This functor can wrap any DefaultConstructible functor. Iff there - // is a result_type typedef it needs to be forwarded. In all other - // cases cpp11::result_of is necessary to determine the return type. - template::value > - struct AnyFunctor; - - template - struct AnyFunctor { - typedef typename F::result_type result_type; - - template - auto operator()(Args&&... args) const -> typename std::result_of::type { - F f; - // check the equality of a c++03 std::tr1::result_of and a c++11 result_of - typedef typename std::result_of::type c11_return_type; - typedef typename F::result_type c03_return_type; - - static_assert((result_of_kernel::Rep_equal::value), - "Type difference between actual return type and cpp11::result_of<>::type"); - - return f(std::forward(args)...); - } - }; - - template - struct AnyFunctor { - template - struct result; - - template - struct result { - typedef typename cpp11::result_of::type type; - }; - - // same as above - template - auto operator()(Args&&... args) const -> typename std::result_of::type { - F f; - typedef typename std::result_of::type c11_return_type; - typedef typename std::tr1::result_of::type - >::type ... - )>::type c03_return_type; - - static_assert((result_of_kernel::Rep_equal::value), - "Type difference between actual return type and cpp11::result_of<>::type"); - - return f(std::forward(args)...); - } - }; - - // usual copy pasta from simple_cartesian and cartesian plus an - // template template parameter to inject the true base - template < typename RT_, typename FT_, typename Kernel_, template class Inject> - struct Result_of_base - : public Inject< RT_, FT_, Kernel_> - { - typedef RT_ RT; - typedef FT_ FT; - - // The mechanism that allows to specify reference-counting or not. - template < typename T > - struct Handle { typedef T type; }; - - template < typename Kernel2 > - struct Base { typedef Result_of_base Type; }; - }; - - // alias cartesian to something similar to Homogeneous. Requires gcc 4.7. - // NB. Kernel is either last of first argument to add a little more confusion. - - // template - // using Cartesian_base_3 = Cartesian_base; - - // hack instead - template - struct Cartesian_base_3 : public Cartesian_base { }; - - template < typename FT_, typename Kernel_ > - struct Result_of_cartesian_base : public Result_of_base - { - typedef Kernel_ K; - - #define CGAL_Kernel_pred(Y,Z) typedef CartesianKernelFunctors::Y Y; \ - Y Z() const { return Y(); } - #define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z) - - #include - }; - - template < typename RT_, typename FT_, typename Kernel_ > - struct Result_of_homogeneous_base : public Result_of_base - { - typedef Kernel_ K; - - #define CGAL_Kernel_pred(Y,Z) typedef HomogeneousKernelFunctors::Y Y; \ - Y Z() const { return Y(); } - #define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z) - - #include - }; - - template < typename FT_ > - struct Result_of_cartesian - : public Type_equality_wrapper< - Result_of_cartesian_base >, - Result_of_cartesian > - { - // this has to be delayed until here as AnyFunctor will - // instantiate its arguments and only here lookup for all the - // typedefs inside the functor will be possible - typedef Result_of_cartesian K; - #define CGAL_Kernel_pred(Y,Z) typedef AnyFunctor< CartesianKernelFunctors::Y > Y; \ - Y Z() const { return Y(); } - #define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z) - - #include - }; - - // same as above - template < typename RT_, typename FT_ > - struct Result_of_homogeneous - : public Type_equality_wrapper< - Result_of_homogeneous_base >, - Result_of_homogeneous > - { - typedef Result_of_homogeneous K; - #define CGAL_Kernel_pred(Y,Z) typedef AnyFunctor< HomogeneousKernelFunctors::Y > Y; \ - Y Z() const { return Y(); } - #define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z) - - #include - }; -} - -#endif /* C++11 GUARD */ -#endif /* CGAL_RESULT_OF_KERNEL_H */ diff --git a/Kernel_23/test/Kernel_23/test_result_of.cpp b/Kernel_23/test/Kernel_23/test_result_of.cpp deleted file mode 100644 index dac209511b0..00000000000 --- a/Kernel_23/test/Kernel_23/test_result_of.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2011 GeometryFactory (France). All rights reserved. -// All rights reserved. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; version 2.1 of the License. -// See the file LICENSE.LGPL distributed with CGAL. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-2.1 -// -// -// Author(s) : Philipp Moeller - -#include -#include -#include - -#include "CGAL/_Result_of_kernel.h" -#include "CGAL/_test_2.h" -#include "CGAL/_test_3.h" - -#include - -#include "CGAL/Precise_numbers.h" - -template -bool test(const K& k) { - return _test_2(k) && _test_3(k); -} - -int main() -{ -#if defined(CGAL_RESULT_OF_KERNEL) - typedef CGAL::Result_of_cartesian< CGAL::Quotient > A; - typedef CGAL::Result_of_homogeneous< Precise_integer, CGAL::Quotient > B; - - test( A() ); - test( B() ); -#endif - return 0; -} diff --git a/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h b/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h index 7d91973363e..ce9133544be 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h @@ -46,8 +46,7 @@ icc 15 work. */ template< typename DimensionTag > -class Epick_d { -public: +struct Epick_d { /*! represents a point in the Euclidean space \cgalModels `DefaultConstructible` diff --git a/Kinetic_data_structures/todo b/Kinetic_data_structures/TODO similarity index 100% rename from Kinetic_data_structures/todo rename to Kinetic_data_structures/TODO diff --git a/Kinetic_data_structures/archives/example/Kinetic_data_structures/Delaunay_triangulation_3_timing.cpp b/Kinetic_data_structures/archive/example/Kinetic_data_structures/Delaunay_triangulation_3_timing.cpp similarity index 100% rename from Kinetic_data_structures/archives/example/Kinetic_data_structures/Delaunay_triangulation_3_timing.cpp rename to Kinetic_data_structures/archive/example/Kinetic_data_structures/Delaunay_triangulation_3_timing.cpp diff --git a/Kinetic_data_structures/archives/example/Kinetic_data_structures/update_Delaunay_triangulation_2.cpp b/Kinetic_data_structures/archive/example/Kinetic_data_structures/update_Delaunay_triangulation_2.cpp similarity index 100% rename from Kinetic_data_structures/archives/example/Kinetic_data_structures/update_Delaunay_triangulation_2.cpp rename to Kinetic_data_structures/archive/example/Kinetic_data_structures/update_Delaunay_triangulation_2.cpp diff --git a/Kinetic_data_structures/archives/include/CGAL/Kinetic/Active_objects_set.h b/Kinetic_data_structures/archive/include/CGAL/Kinetic/Active_objects_set.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Kinetic/Active_objects_set.h rename to Kinetic_data_structures/archive/include/CGAL/Kinetic/Active_objects_set.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Kinetic/Exact_simulation_traits_1.h b/Kinetic_data_structures/archive/include/CGAL/Kinetic/Exact_simulation_traits_1.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Kinetic/Exact_simulation_traits_1.h rename to Kinetic_data_structures/archive/include/CGAL/Kinetic/Exact_simulation_traits_1.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Kinetic/Exact_simulation_traits_2.h b/Kinetic_data_structures/archive/include/CGAL/Kinetic/Exact_simulation_traits_2.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Kinetic/Exact_simulation_traits_2.h rename to Kinetic_data_structures/archive/include/CGAL/Kinetic/Exact_simulation_traits_2.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Kinetic/Exact_simulation_traits_3.h b/Kinetic_data_structures/archive/include/CGAL/Kinetic/Exact_simulation_traits_3.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Kinetic/Exact_simulation_traits_3.h rename to Kinetic_data_structures/archive/include/CGAL/Kinetic/Exact_simulation_traits_3.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Kinetic/Inexact_simulation_traits_1.h b/Kinetic_data_structures/archive/include/CGAL/Kinetic/Inexact_simulation_traits_1.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Kinetic/Inexact_simulation_traits_1.h rename to Kinetic_data_structures/archive/include/CGAL/Kinetic/Inexact_simulation_traits_1.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Kinetic/Inexact_simulation_traits_2.h b/Kinetic_data_structures/archive/include/CGAL/Kinetic/Inexact_simulation_traits_2.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Kinetic/Inexact_simulation_traits_2.h rename to Kinetic_data_structures/archive/include/CGAL/Kinetic/Inexact_simulation_traits_2.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Kinetic/Inexact_simulation_traits_3.h b/Kinetic_data_structures/archive/include/CGAL/Kinetic/Inexact_simulation_traits_3.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Kinetic/Inexact_simulation_traits_3.h rename to Kinetic_data_structures/archive/include/CGAL/Kinetic/Inexact_simulation_traits_3.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Kinetic/Interval_simulator_traits.h b/Kinetic_data_structures/archive/include/CGAL/Kinetic/Interval_simulator_traits.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Kinetic/Interval_simulator_traits.h rename to Kinetic_data_structures/archive/include/CGAL/Kinetic/Interval_simulator_traits.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Kinetic/Simulation_traits.h b/Kinetic_data_structures/archive/include/CGAL/Kinetic/Simulation_traits.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Kinetic/Simulation_traits.h rename to Kinetic_data_structures/archive/include/CGAL/Kinetic/Simulation_traits.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Polynomial/Default_filtering_traits.h b/Kinetic_data_structures/archive/include/CGAL/Polynomial/Default_filtering_traits.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Polynomial/Default_filtering_traits.h rename to Kinetic_data_structures/archive/include/CGAL/Polynomial/Default_filtering_traits.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Polynomial/Filtered_kernel.h b/Kinetic_data_structures/archive/include/CGAL/Polynomial/Filtered_kernel.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Polynomial/Filtered_kernel.h rename to Kinetic_data_structures/archive/include/CGAL/Polynomial/Filtered_kernel.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Polynomial/Lazy_upper_bound_root_stack.h b/Kinetic_data_structures/archive/include/CGAL/Polynomial/Lazy_upper_bound_root_stack.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Polynomial/Lazy_upper_bound_root_stack.h rename to Kinetic_data_structures/archive/include/CGAL/Polynomial/Lazy_upper_bound_root_stack.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Polynomial/Upper_bound_root_stack.h b/Kinetic_data_structures/archive/include/CGAL/Polynomial/Upper_bound_root_stack.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Polynomial/Upper_bound_root_stack.h rename to Kinetic_data_structures/archive/include/CGAL/Polynomial/Upper_bound_root_stack.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Polynomial/Upper_bound_root_stack_Descartes_traits.h b/Kinetic_data_structures/archive/include/CGAL/Polynomial/Upper_bound_root_stack_Descartes_traits.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Polynomial/Upper_bound_root_stack_Descartes_traits.h rename to Kinetic_data_structures/archive/include/CGAL/Polynomial/Upper_bound_root_stack_Descartes_traits.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Polynomial/Upper_bound_root_stack_filtered_Descartes_traits.h b/Kinetic_data_structures/archive/include/CGAL/Polynomial/Upper_bound_root_stack_filtered_Descartes_traits.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Polynomial/Upper_bound_root_stack_filtered_Descartes_traits.h rename to Kinetic_data_structures/archive/include/CGAL/Polynomial/Upper_bound_root_stack_filtered_Descartes_traits.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Updatable_Delaunay_triangulation_2.h b/Kinetic_data_structures/archive/include/CGAL/Updatable_Delaunay_triangulation_2.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Updatable_Delaunay_triangulation_2.h rename to Kinetic_data_structures/archive/include/CGAL/Updatable_Delaunay_triangulation_2.h diff --git a/Kinetic_data_structures/archives/include/CGAL/Updatable_Delaunay_triangulation_table_2.h b/Kinetic_data_structures/archive/include/CGAL/Updatable_Delaunay_triangulation_table_2.h similarity index 100% rename from Kinetic_data_structures/archives/include/CGAL/Updatable_Delaunay_triangulation_table_2.h rename to Kinetic_data_structures/archive/include/CGAL/Updatable_Delaunay_triangulation_table_2.h diff --git a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_2.h b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_2.h index cbd8907056b..cd9b78a0d34 100644 --- a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_2.h +++ b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_2.h @@ -13,7 +13,7 @@ The class `Kinetic::Delaunay_triangulation_event_log_visitor_2` provides a model */ -class Delaunay_triangulation_event_log_visitor_2 { +struct Delaunay_triangulation_event_log_visitor_2 { }; /* end Kinetic::Delaunay_triangulation_event_log_visitor_2 */ } /* end namespace Kinetic */ diff --git a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_3.h b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_3.h index 69ee4d3cd5b..e259972ca2c 100644 --- a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_3.h +++ b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_event_log_visitor_3.h @@ -14,7 +14,7 @@ The class `Kinetic::Delaunay_triangulation_event_log_visitor_3` provides a model */ -class Delaunay_triangulation_event_log_visitor_3 { +struct Delaunay_triangulation_event_log_visitor_3 { }; /* end Kinetic::Delaunay_triangulation_event_log_visitor_3 */ } /* end namespace Kinetic */ diff --git a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h index b8fad0ecd76..e29719cd845 100644 --- a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h +++ b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_recent_edges_visitor_2.h @@ -13,8 +13,7 @@ the most recent change. */ template< typename Triangulation > -class Delaunay_triangulation_recent_edges_visitor_2 { -public: +struct Delaunay_triangulation_recent_edges_visitor_2 { /// \name Creation /// @{ diff --git a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_visitor_base_2.h b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_visitor_base_2.h index 77c83ae7fd2..5436b0d67f1 100644 --- a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_visitor_base_2.h +++ b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_visitor_base_2.h @@ -13,8 +13,7 @@ want to implement a few methods from `Kinetic::DelaunayTriangulationVisitor_2`. */ -class Delaunay_triangulation_visitor_base_2 { -public: +struct Delaunay_triangulation_visitor_base_2 { /// \name Creation /// @{ diff --git a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_visitor_base_3.h b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_visitor_base_3.h index a790ccede4f..96a3e7341c6 100644 --- a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_visitor_base_3.h +++ b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Delaunay_triangulation_visitor_base_3.h @@ -13,8 +13,7 @@ want to implement a few methods from `Kinetic::DelaunayTriangulationVisitor_3`. */ -class Delaunay_triangulation_visitor_base_3 { -public: +struct Delaunay_triangulation_visitor_base_3 { /// \name Creation /// @{ diff --git a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Regular_triangulation_event_log_visitor_3.h b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Regular_triangulation_event_log_visitor_3.h index 4346c7b4e3f..2a9b6f8e1f2 100644 --- a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Regular_triangulation_event_log_visitor_3.h +++ b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Regular_triangulation_event_log_visitor_3.h @@ -13,7 +13,7 @@ The class `Kinetic::Regular_triangulation_event_log_visitor_3` provides a model */ -class Regular_triangulation_event_log_visitor_3 { +struct Regular_triangulation_event_log_visitor_3 { }; /* end Kinetic::Regular_triangulation_event_log_visitor_3 */ } /* end namespace Kinetic */ diff --git a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Regular_triangulation_visitor_base_3.h b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Regular_triangulation_visitor_base_3.h index 0de283cc32e..79247355342 100644 --- a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Regular_triangulation_visitor_base_3.h +++ b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Regular_triangulation_visitor_base_3.h @@ -13,8 +13,7 @@ want to implement a few methods from `Kinetic::RegularTriangulationVisitor_3`. */ -class Regular_triangulation_visitor_base_3 { -public: +struct Regular_triangulation_visitor_base_3 { /// \name Creation /// @{ diff --git a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Sort_event_log_visitor.h b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Sort_event_log_visitor.h index 1f5d4be9d1c..b068493ac51 100644 --- a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Sort_event_log_visitor.h +++ b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Sort_event_log_visitor.h @@ -13,7 +13,7 @@ The class `Kinetic::Sort_event_log_visitor` provides a model of */ -class Sort_event_log_visitor { +struct Sort_event_log_visitor { }; /* end Kinetic::Sort_event_log_visitor */ } /* end namespace Kinetic */ diff --git a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Sort_visitor_base.h b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Sort_visitor_base.h index 91f70eee064..ea87a6edd65 100644 --- a/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Sort_visitor_base.h +++ b/Kinetic_data_structures/doc/Kinetic_data_structures/CGAL/Kinetic/Sort_visitor_base.h @@ -13,8 +13,7 @@ want to implement a few methods from `Kinetic::SortVisitor`. */ -class Sort_visitor_base { -public: +struct Sort_visitor_base { /// \name Creation /// @{ diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 14f0e227b66..40b748a36ca 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -40,13 +40,12 @@ include(${CGAL_USE_FILE}) find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Svg) -find_package(OpenGL) find_package(QGLViewer) if ( NOT (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND - OPENGL_FOUND AND QGLVIEWER_FOUND) ) + QGLVIEWER_FOUND) ) - MESSAGE(STATUS "NOTICE: This demo requires CGAL, QGLViewer, OpenGL " + MESSAGE(STATUS "NOTICE: This demo requires CGAL, QGLViewer, " "and Qt5, and will not be compiled.") else() @@ -71,14 +70,12 @@ add_executable(Linear_cell_complex_3_demo typedefs.h import_moka.h ${uis} ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) -qt5_use_modules(Linear_cell_complex_3_demo Xml Script OpenGL Svg) add_to_cached_list(CGAL_EXECUTABLE_TARGETS Linear_cell_complex_3_demo) -target_link_libraries(Linear_cell_complex_3_demo ${CGAL_LIBRARIES} - ${CGAL_3RD_PARTY_LIBRARIES}) -target_link_libraries(Linear_cell_complex_3_demo ${QT_LIBRARIES} - ${QGLVIEWER_LIBRARIES} ) -target_link_libraries(Linear_cell_complex_3_demo ${OPENGL_gl_LIBRARY} - ${OPENGL_glu_LIBRARY} ) +target_link_libraries(Linear_cell_complex_3_demo PRIVATE + CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui Qt5::OpenGL + ${QGLVIEWER_LIBRARIES} ) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Linear_cell_complex_3_demo) endif() diff --git a/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.cpp b/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.cpp index 6c9fb51e49a..a9207f1c214 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.cpp +++ b/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.cpp @@ -154,7 +154,6 @@ void MainWindow::connectVolumeListHandlers() void MainWindow::update_operations_entries(bool show) { actionImportOFF->setEnabled(show); - actionAddOFF->setEnabled(show); actionImport3DTDS->setEnabled(show); actionCompute_Voronoi_3D->setEnabled(show); actionClear->setEnabled(show); @@ -247,7 +246,7 @@ void MainWindow::on_actionLoad_triggered () if (!fileName.isEmpty ()) { - load(fileName, true); + load(fileName, false); } } @@ -260,7 +259,7 @@ void MainWindow::on_actionImportOFF_triggered () if (!fileName.isEmpty ()) { - load_off (fileName, true); + load_off (fileName, false); } } @@ -273,7 +272,7 @@ void MainWindow::on_actionImportMoka_triggered() if (!fileName.isEmpty ()) { - load_moka(fileName, true); + load_moka(fileName, false); } } @@ -286,25 +285,12 @@ void MainWindow::on_actionImport3DTDS_triggered () if (!fileName.isEmpty ()) { - load_3DTDS (fileName, true); + load_3DTDS (fileName, false); statusBar ()->showMessage (QString ("Import 3DTDS file") + fileName, DELAY_STATUSMSG); } } -void MainWindow::on_actionAddOFF_triggered() -{ - QString fileName = QFileDialog::getOpenFileName (this, - tr ("Add OFF"), - "./off", - tr ("off files (*.off)")); - - if (!fileName.isEmpty ()) - { - load_off (fileName, false); - } -} - void MainWindow::load_depend_on_extension(const QString & fileName, bool clear) { QString ext = QFileInfo(fileName).suffix(); @@ -468,7 +454,7 @@ void MainWindow::load_moka(const QString & fileName, bool clear) #ifdef CGAL_PROFILE_LCC_DEMO timer.stop(); - std::cout<<"Time to load off "<showMessage (QString ("Load off file") + fileName, + statusBar ()->showMessage (QString ("Load moka file") + fileName, DELAY_STATUSMSG); else - statusBar ()->showMessage (QString ("Add off file") + fileName, + statusBar ()->showMessage (QString ("Add moka file") + fileName, DELAY_STATUSMSG); Q_EMIT (sceneChanged ()); } diff --git a/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.h b/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.h index 66b40a2f647..b42cee6ac09 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.h +++ b/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.h @@ -114,7 +114,6 @@ public Q_SLOTS: void on_actionSave_triggered(); void on_actionLoad_triggered(); void on_actionImportOFF_triggered(); - void on_actionAddOFF_triggered(); void on_actionImport3DTDS_triggered(); void on_actionImportMoka_triggered(); void on_actionCompute_Voronoi_3D_triggered(); @@ -148,12 +147,12 @@ public Q_SLOTS: void on_actionExtend_hidden_volumes_triggered(); // Other slots - void load_depend_on_extension(const QString& fileName, bool clear=true); - void load(const QString& fileName, bool clear=true); + void load_depend_on_extension(const QString& fileName, bool clear=false); + void load(const QString& fileName, bool clear=false); void save(const QString& fileName); - void load_off(const QString& fileName, bool clear=true); - void load_3DTDS(const QString& fileName, bool clear=true); - void load_moka(const QString& fileName, bool clear=true); + void load_off(const QString& fileName, bool clear=false); + void load_3DTDS(const QString& fileName, bool clear=false); + void load_moka(const QString& fileName, bool clear=false); void onSceneChanged(); diff --git a/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.ui b/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.ui index aad48e3f81f..d63b9d7c9b1 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.ui +++ b/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.ui @@ -44,7 +44,6 @@ - @@ -107,11 +106,6 @@ &Import OFF - - - Add &OFF - - &Quit diff --git a/Linear_cell_complex/demo/Linear_cell_complex/Viewer.cpp b/Linear_cell_complex/demo/Linear_cell_complex/Viewer.cpp index 2aa6a7ef98e..6eb833ab8d7 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/Viewer.cpp +++ b/Linear_cell_complex/demo/Linear_cell_complex/Viewer.cpp @@ -710,14 +710,14 @@ void Viewer::draw() color.setRgbF(0.2f, 0.2f, 0.7f); rendering_program_p_l.bind(); rendering_program_p_l.setAttributeValue(colorLocation,color); - ::glLineWidth(size_edges); + glLineWidth(size_edges); glDrawArrays(GL_LINES, 0, static_cast(pos_lines.size()/3)); rendering_program_p_l.release(); vao[2].release(); } if(vertices) { - ::glPointSize(size_points); + glPointSize(size_points); vao[3].bind(); attrib_buffers(this); color.setRgbF(.2f,.2f,.6f); @@ -751,23 +751,23 @@ void Viewer::init() setKeyDescription(Qt::Key_PageUp, "Decrease light (all colors, use shift/alt/ctrl for one rgb component)"); // Light default parameters - ::glLineWidth(size_edges); - ::glPointSize(size_points); - ::glEnable(GL_POLYGON_OFFSET_FILL); - ::glPolygonOffset(1.0f,1.0f); - ::glClearColor(1.0f,1.0f,1.0f,0.0f); - ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); + glLineWidth(size_edges); + glPointSize(size_points); + glEnable(GL_POLYGON_OFFSET_FILL); + glPolygonOffset(1.0f,1.0f); + glClearColor(1.0f,1.0f,1.0f,0.0f); + glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); - ::glEnable(GL_LIGHTING); + glEnable(GL_LIGHTING); - ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); - ::glShadeModel(GL_FLAT); - ::glDisable(GL_BLEND); - ::glDisable(GL_LINE_SMOOTH); - ::glDisable(GL_POLYGON_SMOOTH_HINT); - ::glBlendFunc(GL_ONE, GL_ZERO); - ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST); + glShadeModel(GL_FLAT); + glDisable(GL_BLEND); + glDisable(GL_LINE_SMOOTH); + glDisable(GL_POLYGON_SMOOTH_HINT); + glBlendFunc(GL_ONE, GL_ZERO); + glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST); compile_shaders(); } diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_min_items.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_min_items.h index edb8ee403d8..aa11b6e1b27 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_min_items.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_min_items.h @@ -32,8 +32,7 @@ struct Linear_cell_complex_min_items \sa `CGAL::Linear_cell_complex_for_generalized_map` */ -class Linear_cell_complex_min_items { -public: +struct Linear_cell_complex_min_items { /// @} diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_traits.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_traits.h index 5d8e9c258fd..c841b5a994d 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_traits.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_traits.h @@ -18,8 +18,7 @@ Note that the default argument used for `K` when d > 3 does not use exact */ template< typename d, typename K > -class Linear_cell_complex_traits : public K { -public: +struct Linear_cell_complex_traits : public K { /// \name Constants /// @{ diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLCCViewerQt.inc b/Linear_cell_complex/examples/Linear_cell_complex/CMakeBasicViewerQt.inc similarity index 61% rename from Linear_cell_complex/examples/Linear_cell_complex/CMakeLCCViewerQt.inc rename to Linear_cell_complex/examples/Linear_cell_complex/CMakeBasicViewerQt.inc index 467af4ff419..5dd94c1e7f9 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLCCViewerQt.inc +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeBasicViewerQt.inc @@ -1,9 +1,9 @@ -# This file must be included in your CMakeLists.txt to use cgal_map_viewer_qt.h. +# This file must be included in your CMakeLists.txt to use the basic viewer # You need to link the libraries in your executable by using -# TARGET_LINK_LIBRARIES( myexec ${MAP_VIEWER_LIBRARIES}) +# TARGET_LINK_LIBRARIES( myexec ${BASIC_VIEWER_LIBRARIES}) if ( NOT CGAL_FOUND OR NOT CGAL_Qt5_FOUND) - message(STATUS "NOTICE: Libraries for lcc_viewer not found " + message(STATUS "NOTICE: Libraries for basic viewer not found " "(CGAL, Qt5, QGLViewer).") endif( NOT CGAL_FOUND OR NOT CGAL_Qt5_FOUND) @@ -20,14 +20,14 @@ add_definitions(-DQT_NO_KEYWORDS) include_directories( ${QGLVIEWER_INCLUDE_DIR} ) add_definitions(${QGLVIEWER_DEFINITIONS}) -set (MAP_VIEWER_LIBRARIES ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} +set (BASIC_VIEWER_LIBRARIES ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY}) # ${OPENGL_glu_LIBRARY} -set(MAP_VIEWER_MODULES Xml OpenGL) +set(BASIC_VIEWER_MODULES Xml OpenGL) -ADD_DEFINITIONS("-DCGAL_LCC_USE_VIEWER -DCGAL_LCC_USE_QT") +ADD_DEFINITIONS("-DCGAL_USE_BASIC_VIEWER") message(STATUS "Libraries for lcc_viewer found. You need to link them " "in your executable by using " - "TARGET_LINK_LIBRARIES( myexec \${MAP_VIEWER_LIBRARIES})") + "TARGET_LINK_LIBRARIES( myexec \${BASIC_VIEWER_LIBRARIES})") -set(LCC_VIEWER true) +set(USE_BASIC_VIEWER true) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index 81738475373..0d26a50dbff 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -13,7 +13,7 @@ endif() # based on qt. Just uncomment the following two lines, plus the lines qt5_use_modules below # find_package(CGAL COMPONENTS Qt5) -# include("CMakeLCCViewerQt.inc") +# include("CMakeBasicViewerQt.inc") # If you don't want to visualize, use the following line (otherwise comment it) find_package(CGAL QUIET) @@ -43,21 +43,27 @@ if ( CGAL_FOUND ) add_executable(voronoi_2 voronoi_2.cpp) target_link_libraries(voronoi_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} - ${MAP_VIEWER_LIBRARIES}) -# qt5_use_modules(voronoi_2 ${MAP_VIEWER_MODULES}) + ${BASIC_VIEWER_LIBRARIES}) + if (USE_BASIC_VIEWER) + qt5_use_modules(voronoi_2 ${BASIC_VIEWER_MODULES}) + endif(USE_BASIC_VIEWER) add_executable(voronoi_3 voronoi_3.cpp) target_link_libraries(voronoi_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} - ${MAP_VIEWER_LIBRARIES}) -# qt5_use_modules(voronoi_3 ${MAP_VIEWER_MODULES}) + ${BASIC_VIEWER_LIBRARIES}) + if (USE_BASIC_VIEWER) + qt5_use_modules(voronoi_3 ${BASIC_VIEWER_MODULES}) + endif(USE_BASIC_VIEWER) + create_single_source_cgal_program( "gmap_linear_cell_complex_3.cpp" ) add_executable(linear_cell_complex_3_operations linear_cell_complex_3_operations.cpp) target_link_libraries(linear_cell_complex_3_operations ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} - ${MAP_VIEWER_LIBRARIES}) -# qt5_use_modules(linear_cell_complex_3_operations ${MAP_VIEWER_MODULES}) - + ${BASIC_VIEWER_LIBRARIES}) + if (USE_BASIC_VIEWER) + qt5_use_modules(linear_cell_complex_3_operations ${BASIC_VIEWER_MODULES}) + endif(USE_BASIC_VIEWER) else() diff --git a/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h b/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h new file mode 100644 index 00000000000..b992f7271b0 --- /dev/null +++ b/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h @@ -0,0 +1,1232 @@ +// Copyright (c) 2011 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// Author(s) : Guillaume Damiand + +#ifndef CGAL_BASIC_VIEWER_H +#define CGAL_BASIC_VIEWER_H + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define NB_VBO_BUFFERS 8 +#define NB_VAO_BUFFERS 4 + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel; +typedef Local_kernel::Point_3 Local_point; +typedef Local_kernel::Vector_3 Local_vector; + +//Vertex source code +const char vertex_source_mono[] = + { + "#version 120 \n" + "attribute highp vec4 vertex;\n" + "attribute highp vec3 normal;\n" + + "uniform highp mat4 mvp_matrix;\n" + "uniform highp mat4 mv_matrix; \n" + + "varying highp vec4 fP; \n" + "varying highp vec3 fN; \n" + "void main(void)\n" + "{\n" + " fP = mv_matrix * vertex; \n" + " fN = mat3(mv_matrix)* normal; \n" + " gl_Position = mvp_matrix * vertex;\n" + "}" + }; + +const char vertex_source_color[] = + { + "#version 120 \n" + "attribute highp vec4 vertex;\n" + "attribute highp vec3 normal;\n" + "attribute highp vec3 color;\n" + + "uniform highp mat4 mvp_matrix;\n" + "uniform highp mat4 mv_matrix; \n" + + "varying highp vec4 fP; \n" + "varying highp vec3 fN; \n" + "varying highp vec4 fColor; \n" + "void main(void)\n" + "{\n" + " fP = mv_matrix * vertex; \n" + " fN = mat3(mv_matrix)* normal; \n" + " fColor = vec4(color, 1.0); \n" + " gl_Position = mvp_matrix * vertex;\n" + "}" + }; + +//Vertex source code +const char fragment_source_mono[] = + { + "#version 120 \n" + "varying highp vec4 fP; \n" + "varying highp vec3 fN; \n" + "uniform highp vec4 color; \n" + "uniform vec4 light_pos; \n" + "uniform vec4 light_diff; \n" + "uniform vec4 light_spec; \n" + "uniform vec4 light_amb; \n" + "uniform float spec_power ; \n" + + "void main(void) { \n" + + " vec3 L = light_pos.xyz - fP.xyz; \n" + " vec3 V = -fP.xyz; \n" + + " vec3 N = normalize(fN); \n" + " L = normalize(L); \n" + " V = normalize(V); \n" + + " vec3 R = reflect(-L, N); \n" + " vec4 diffuse = max(dot(N,L), 0.0) * light_diff * color; \n" + " vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n" + + "gl_FragColor = light_amb*color + diffuse ; \n" + "} \n" + "\n" + }; + +const char fragment_source_color[] = + { + "#version 120 \n" + "varying highp vec4 fP; \n" + "varying highp vec3 fN; \n" + "varying highp vec4 fColor; \n" + "uniform vec4 light_pos; \n" + "uniform vec4 light_diff; \n" + "uniform vec4 light_spec; \n" + "uniform vec4 light_amb; \n" + "uniform float spec_power ; \n" + + "void main(void) { \n" + + " vec3 L = light_pos.xyz - fP.xyz; \n" + " vec3 V = -fP.xyz; \n" + + " vec3 N = normalize(fN); \n" + " L = normalize(L); \n" + " V = normalize(V); \n" + + " vec3 R = reflect(-L, N); \n" + " vec4 diffuse = max(dot(N,L), 0.0) * light_diff * fColor; \n" + " vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n" + + "gl_FragColor = light_amb*fColor + diffuse ; \n" + "} \n" + "\n" + }; + +//Vertex source code +const char vertex_source_p_l[] = + { + "#version 120 \n" + "attribute highp vec4 vertex;\n" + "uniform highp mat4 mvp_matrix;\n" + "void main(void)\n" + "{\n" + " gl_Position = mvp_matrix * vertex;\n" + "}" + }; +//Vertex source code +const char fragment_source_p_l[] = + { + "#version 120 \n" + "uniform highp vec4 color; \n" + "void main(void) { \n" + "gl_FragColor = color; \n" + "} \n" + "\n" + }; + +namespace internal { + template + void newell_single_step_3(const Point& p, const Point& q, Vector& n) + { + // Compute normal of the face by using Newell's method: for each edge PQ + // Nx += (Py - Qy) * (Pz + Qz); + // Ny += (Pz - Qz) * (Px + Qx); + // Nz += (Px - Qx) * (Py + Qy); + n = Vector(n.x()+((p.y()-q.y())*(p.z()+q.z())), + n.y()+((p.z()-q.z())*(p.x()+q.x())), + n.z()+((p.x()-q.x())*(p.y()+q.y()))); + } +} // End namespace internal + +template +typename K::Vector_3 compute_normal_of_face(const std::vector& points) +{ + typename K::Vector_3 normal(CGAL::NULL_VECTOR); + unsigned int nb = 0; + for (std::size_t i=0; i0); + return (typename K::Construct_scaled_vector_3()(normal, 1.0/nb)); +} + +class Basic_viewer : public QGLViewer, public QOpenGLFunctions_2_1 +{ + struct Vertex_info + { + Local_vector v; + }; + + struct Face_info + { + bool exist_edge[3]; + bool is_external; + bool is_process; + }; + + typedef CGAL::Triangulation_2_projection_traits_3 P_traits; + typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; + + typedef CGAL::Triangulation_face_base_with_info_2 Fb1; + + typedef CGAL::Constrained_triangulation_face_base_2 Fb; + typedef CGAL::Triangulation_data_structure_2 TDS; + // typedef CGAL::No_intersection_tag Itag; + typedef CGAL::Exact_predicates_tag Itag; + typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; + +public: + // Constructor/Destructor + Basic_viewer(const char* title="") : + QGLViewer(CGAL::Qt::createOpenGLContext()), + m_draw_vertices(true), + m_draw_edges(true), + m_draw_faces(true), + m_flatShading(true), + m_use_mono_color(false), + m_inverse_normal(false), + m_empty(true), + m_size_points(7.), + m_size_edges(3.1), + m_vertices_mono_color(51, 51, 178), + m_edges_mono_color(51, 51, 148), + m_faces_mono_color(180, 125, 200), + m_ambient_color(0.6f, 0.5f, 0.5f, 0.5f), + m_are_buffers_initialized(false), + m_face_started(false) + { + if (title[0]==0) + setWindowTitle("CGAL Basic Viewer"); + else + setWindowTitle(title); + + resize(500, 450); + + if ( is_empty() ) + { + bb=Local_point(CGAL::ORIGIN).bbox(); + bb=bb + Local_point(1,1,1).bbox(); // To avoid a warning from Qglviewer + } + } + + ~Basic_viewer() + { + for (int i=0; i& point_vector) + { + point_vector.push_back(p.x()); + point_vector.push_back(p.y()); + point_vector.push_back(p.z()); + + if (is_empty()) + { bb=p.bbox(); m_empty=false; } + else + { bb=bb+p.bbox(); } + } + + void add_color(const CGAL::Color& acolor, std::vector& color_vector) + { + color_vector.push_back((double)color_of_face.red()/(double)255); + color_vector.push_back((double)color_of_face.green()/(double)255); + color_vector.push_back((double)color_of_face.blue()/(double)255); + } + + void add_normal(const Local_vector& n, std::vector& normal_vector) + { + normal_vector.push_back(n.x()); + normal_vector.push_back(n.y()); + normal_vector.push_back(n.z()); + } + + void add_mono_point(const Local_point& p) + { add_point(p, arrays[POS_MONO_POINTS]); } + + void add_colored_point(const Local_point& p, const CGAL::Color& acolor) + { + add_point(p, arrays[POS_COLORED_POINTS]); + add_color(acolor, arrays[COLOR_POINTS]); + } + + void add_mono_segment(const Local_point& p1, const Local_point& p2) + { + add_point(p1, arrays[POS_MONO_SEGMENTS]); + add_point(p2, arrays[POS_MONO_SEGMENTS]); + } + + void add_colored_segment(const Local_point& p1, const Local_point& p2, + const CGAL::Color& acolor) + { + add_point(p1, arrays[POS_COLORED_SEGMENTS]); + add_point(p2, arrays[POS_COLORED_SEGMENTS]); + add_color(acolor, arrays[COLOR_SEGMENTS]); + } + + void face_begin() + { + if (m_face_started) + { + std::cerr<<"You cannot start a new face before to finish the previous one."<(points_of_face); + + if (points_of_face.size()==3) // Triangle: no need to triangulate + { + for (int i=0; i<3; ++i) + { + // The point + add_point(points_of_face[i], arrays[m_started_face_is_colored? + POS_COLORED_FACES: + POS_MONO_FACES]); + + // Its color + if (m_started_face_is_colored) + { add_color(color_of_face, arrays[COLOR_FACES]); } + + // Its flat normal + add_normal(normal, arrays[m_started_face_is_colored? + FLAT_NORMAL_COLORED_FACES: + FLAT_NORMAL_MONO_FACES]); + + // Its smoth normal (if given by the user) + if (vertex_normals_for_face.size()==3) + { // Here we have 3 vertex normals; we can use Gourod + add_normal(vertex_normals_for_face[i], arrays[m_started_face_is_colored? + SMOOTH_NORMAL_COLORED_FACES: + SMOOTH_NORMAL_MONO_FACES]); + } + else + { // Here user does not provide all vertex normals: we use face normal istead + // and thus we will not be able to use Gourod + add_normal(normal, arrays[m_started_face_is_colored? + SMOOTH_NORMAL_COLORED_FACES: + SMOOTH_NORMAL_MONO_FACES]); + } + } + } + // TODO CASE OF 4 POINTS ? PB HOW TO FIND (EASILY) THE TWO POINTS TO LINK ? + // else if (points_of_face.size()==4) + else + { // More than 3 points: we triangulate + try + { + P_traits cdt_traits(normal); + CDT cdt(cdt_traits); + + bool with_vertex_normal=(vertex_normals_for_face.size()==points_of_face.size()); + + // (1) We insert all the edges as contraint in the CDT. + typename CDT::Vertex_handle previous=NULL, first=NULL; + for (int i=0; iinfo().v=vertex_normals_for_face[i]; } + else + { vh->info().v=normal; } + + if(previous!=NULL && previous!=vh) + { cdt.insert_constraint(previous, vh); } + previous=vh; + } + + if (previous!=NULL && previous!=first) + cdt.insert_constraint(previous, first); + + // (2) We mark all external triangles + // (2.1) We initialize is_external and is_process values + for(typename CDT::All_faces_iterator fit = cdt.all_faces_begin(), + fitend = cdt.all_faces_end(); fit!=fitend; ++fit) + { + fit->info().is_external = true; + fit->info().is_process = false; + } + // (2.2) We check if the facet is external or internal + std::queue face_queue; + typename CDT::Face_handle face_internal = NULL; + if (cdt.infinite_vertex()->face()!=NULL) + face_queue.push(cdt.infinite_vertex()->face()); + while(! face_queue.empty() ) + { + typename CDT::Face_handle fh = face_queue.front(); + face_queue.pop(); + if(!fh->info().is_process) + { + fh->info().is_process = true; + for(int i=0; i<3; ++i) + { + if(!cdt.is_constrained(std::make_pair(fh, i))) + { + if (fh->neighbor(i)!=NULL) + face_queue.push(fh->neighbor(i)); + } + else if (face_internal==NULL) + { + face_internal = fh->neighbor(i); + } + } + } + } + + if ( face_internal!=NULL ) + face_queue.push(face_internal); + + while(! face_queue.empty() ) + { + typename CDT::Face_handle fh = face_queue.front(); + face_queue.pop(); + if(!fh->info().is_process) + { + fh->info().is_process = true; + fh->info().is_external = false; + for(int i=0; i<3; ++i) + { + if(!cdt.is_constrained(std::make_pair(fh, i))) + { + if (fh->neighbor(i)!=NULL) + face_queue.push(fh->neighbor(i)); + } + } + } + } + + // (3) Now we iterates on the internal faces to add the vertices to the + // positions and the normals to the appropriate vectors + for(typename CDT::Finite_faces_iterator ffit=cdt.finite_faces_begin(), + ffitend = cdt.finite_faces_end(); ffit!=ffitend; ++ffit) + { + if(!ffit->info().is_external) + { + for(int i=0; i<3; ++i) + { + // The point + add_point(ffit->vertex(i)->point(), arrays[m_started_face_is_colored? + POS_COLORED_FACES: + POS_MONO_FACES]); + + // Its color + if (m_started_face_is_colored) + { add_color(color_of_face, arrays[COLOR_FACES]); } + + // Its flat normal + add_normal(normal, arrays[m_started_face_is_colored? + FLAT_NORMAL_COLORED_FACES: + FLAT_NORMAL_MONO_FACES]); + + // Its smoth normal (if given by the user) + add_normal(ffit->vertex(i)->info().v, arrays[m_started_face_is_colored? + SMOOTH_NORMAL_COLORED_FACES: + SMOOTH_NORMAL_MONO_FACES]); + } + } + } + } + catch(...) + { // Triangulation crash: the face is not filled + std::cout<<"Catch: face not filled."<compileSourceCode(vertex_source_mono)) + { std::cerr<<"Compiling vertex source FAILED"<compileSourceCode(fragment_source_mono)) + { std::cerr<<"Compiling fragmentsource FAILED"<compileSourceCode(vertex_source_mono)) + { std::cerr<<"Compiling vertex source FAILED"<compileSourceCode(fragment_source_mono)) + { std::cerr<<"Compiling fragmentsource FAILED"<compileSourceCode(vertex_source_color)) + { std::cerr<<"Compiling vertex source FAILED"<compileSourceCode(fragment_source_color)) + { std::cerr<<"Compiling fragmentsource FAILED"<compileSourceCode(vertex_source_p_l)) + { std::cerr<<"Compiling vertex source FAILED"<compileSourceCode(fragment_source_p_l)) + { std::cerr<<"Compiling fragmentsource FAILED"<(arrays[POS_MONO_FACES].size()*sizeof(float))); + vertexLocation[vaon] = rendering_program_mono.attributeLocation("vertex"); + rendering_program_mono.bind(); + rendering_program_mono.enableAttributeArray(vertexLocation[vaon]); + rendering_program_mono.setAttributeBuffer(vertexLocation[vaon],GL_FLOAT,0,3); + rendering_program_mono.release(); + + buffers[bufn].release(); + ++bufn; + + // 3.1.2) normals of the mono faces + assert(bufn(arrays[FLAT_NORMAL_MONO_FACES].size()* + sizeof(float))); + } + else + { + buffers[bufn].allocate(arrays[SMOOTH_NORMAL_MONO_FACES].data(), + static_cast(arrays[SMOOTH_NORMAL_MONO_FACES].size()* + sizeof(float))); + } + normalsLocation = rendering_program_mono.attributeLocation("normal"); + rendering_program_mono.bind(); + rendering_program_mono.enableAttributeArray(normalsLocation); + rendering_program_mono.setAttributeBuffer(normalsLocation,GL_FLOAT,0,3); + rendering_program_mono.release(); + + buffers[bufn].release(); + ++bufn; + + vao[vaon].release(); + ++vaon; + + // 3.2) Color faces + assert(vaon(arrays[POS_COLORED_FACES].size()*sizeof(float))); + vertexLocation[vaon] = rendering_program_color.attributeLocation("vertex"); + rendering_program_color.bind(); + rendering_program_color.enableAttributeArray(vertexLocation[vaon]); + rendering_program_color.setAttributeBuffer(vertexLocation[vaon],GL_FLOAT,0,3); + rendering_program_color.release(); + + buffers[bufn].release(); + ++bufn; + + // 3.2.2) normals of the color faces + assert(bufn(arrays[FLAT_NORMAL_COLORED_FACES].size()* + sizeof(float))); + } + else + { + buffers[bufn].allocate(arrays[SMOOTH_NORMAL_COLORED_FACES].data(), + static_cast(arrays[SMOOTH_NORMAL_COLORED_FACES].size()* + sizeof(float))); + } + normalsLocation = rendering_program_color.attributeLocation("normal"); + rendering_program_color.bind(); + rendering_program_color.enableAttributeArray(normalsLocation); + rendering_program_color.setAttributeBuffer(normalsLocation,GL_FLOAT,0,3); + rendering_program_color.release(); + + buffers[bufn].release(); + ++bufn; + + // 3.2.3) colors of the faces + if (!m_use_mono_color) + { + assert(bufn(arrays[COLOR_FACES].size()*sizeof(float))); + colorsLocation = rendering_program_color.attributeLocation("color"); + rendering_program_color.bind(); + rendering_program_color.enableAttributeArray(colorsLocation); + rendering_program_color.setAttributeBuffer(colorsLocation,GL_FLOAT,0,3); + rendering_program_color.release(); + + buffers[bufn].release(); + ++bufn; + } + + vao[vaon].release(); + ++vaon; + + m_are_buffers_initialized = true; + } + + void attrib_buffers(QGLViewer* viewer) + { + QMatrix4x4 mvpMatrix; + QMatrix4x4 mvMatrix; + double mat[16]; + viewer->camera()->getModelViewProjectionMatrix(mat); + for(int i=0; i < 16; i++) + { + mvpMatrix.data()[i] = (float)mat[i]; + } + viewer->camera()->getModelViewMatrix(mat); + for(int i=0; i < 16; i++) + { + mvMatrix.data()[i] = (float)mat[i]; + } + // define material + QVector4D diffuse( 0.9f, + 0.9f, + 0.9f, + 0.9f ); + + QVector4D specular( 0.0f, + 0.0f, + 0.0f, + 1.0f ); + + QVector4D position((bb.xmax()-bb.xmin())/2, (bb.ymax()-bb.ymin())/2,bb.zmax(), 0.0 ); + GLfloat shininess = 1.0f; + + rendering_program_mono.bind(); + mvpLocation[0] = rendering_program_mono.uniformLocation("mvp_matrix"); + mvLocation = rendering_program_mono.uniformLocation("mv_matrix"); + lightLocation[0] = rendering_program_mono.uniformLocation("light_pos"); + lightLocation[1] = rendering_program_mono.uniformLocation("light_diff"); + lightLocation[2] = rendering_program_mono.uniformLocation("light_spec"); + lightLocation[3] = rendering_program_mono.uniformLocation("light_amb"); + lightLocation[4] = rendering_program_mono.uniformLocation("spec_power"); + + rendering_program_mono.setUniformValue(lightLocation[0], position); + rendering_program_mono.setUniformValue(lightLocation[1], diffuse); + rendering_program_mono.setUniformValue(lightLocation[2], specular); + rendering_program_mono.setUniformValue(lightLocation[3], m_ambient_color); + rendering_program_mono.setUniformValue(lightLocation[4], shininess); + rendering_program_mono.setUniformValue(mvpLocation[0], mvpMatrix); + rendering_program_mono.setUniformValue(mvLocation, mvMatrix); + + colorLocation1 = rendering_program_mono.uniformLocation("color"); + rendering_program_mono.release(); + + rendering_program_color.bind(); + mvpLocation[0] = rendering_program_color.uniformLocation("mvp_matrix"); + mvLocation = rendering_program_color.uniformLocation("mv_matrix"); + lightLocation[0] = rendering_program_color.uniformLocation("light_pos"); + lightLocation[1] = rendering_program_color.uniformLocation("light_diff"); + lightLocation[2] = rendering_program_color.uniformLocation("light_spec"); + lightLocation[3] = rendering_program_color.uniformLocation("light_amb"); + lightLocation[4] = rendering_program_color.uniformLocation("spec_power"); + + rendering_program_color.setUniformValue(lightLocation[0], position); + rendering_program_color.setUniformValue(lightLocation[1], diffuse); + rendering_program_color.setUniformValue(lightLocation[2], specular); + rendering_program_color.setUniformValue(lightLocation[3], m_ambient_color); + rendering_program_color.setUniformValue(lightLocation[4], shininess); + rendering_program_color.setUniformValue(mvpLocation[0], mvpMatrix); + rendering_program_color.setUniformValue(mvLocation, mvMatrix); + + if (m_use_mono_color) + { colorLocation2 = rendering_program_color.uniformLocation("color"); } + rendering_program_color.release(); + + /* rendering_program_p_l_.bind(); + mvpLocation[1] = rendering_program_p_l.uniformLocation("mvp_matrix"); + colorLocation = rendering_program_p_l.uniformLocation("color"); + rendering_program.setUniformValue(mvpLocation[1], mvpMatrix); + rendering_program_p_l.release();*/ + } + + virtual void draw() + { + glEnable(GL_DEPTH_TEST); + if(!m_are_buffers_initialized) + initialize_buffers(); + + QColor color; + + /* if(m_draw_vertices) + { + ::glPointSize(m_size_points); + vao[3].bind(); + attrib_buffers(this); + color.setRgbF((double)m_vertices_mono_color.red()/(double)255, + (double)m_vertices_mono_color.green()/(double)255, + (double)m_vertices_mono_color.blue()/(double)255); + rendering_program_p_l.bind(); + rendering_program_p_l.setAttributeValue(colorLocation,color); + // glDrawArrays(GL_POINTS, 0, static_cast(pos_points.size()/3)); + rendering_program_p_l.release(); + vao[3].release(); + } + + if(m_draw_edges) + { + vao[2].bind(); + attrib_buffers(this); + color.setRgbF((double)m_edges_mono_color.red()/(double)255, + (double)m_edges_mono_color.green()/(double)255, + (double)m_edges_mono_color.blue()/(double)255); + rendering_program_p_l.bind(); + rendering_program_p_l.setAttributeValue(colorLocation,color); + ::glLineWidth(m_size_edges); + // glDrawArrays(GL_LINES, 0, static_cast(pos_segments.size()/3)); + rendering_program_p_l.release(); + vao[2].release(); + }*/ + + if (m_draw_faces) + { + vao[0].bind(); + attrib_buffers(this); + rendering_program_mono.bind(); + color.setRgbF((double)m_faces_mono_color.red()/(double)255, + (double)m_faces_mono_color.green()/(double)255, + (double)m_faces_mono_color.blue()/(double)255); + rendering_program_mono.setUniformValue(colorLocation1,color); + glDrawArrays(GL_TRIANGLES, 0, static_cast(arrays[POS_MONO_FACES].size()/3)); + rendering_program_mono.release(); + vao[0].release(); + + vao[1].bind(); + attrib_buffers(this); + rendering_program_color.bind(); + if (m_use_mono_color) + { + color.setRgbF((double)m_faces_mono_color.red()/(double)255, + (double)m_faces_mono_color.green()/(double)255, + (double)m_faces_mono_color.blue()/(double)255); + rendering_program_color.setUniformValue(colorLocation2,color); + } + glDrawArrays(GL_TRIANGLES, 0, static_cast(arrays[POS_COLORED_FACES].size()/3)); + rendering_program_color.release(); + vao[1].release(); + } + } + + virtual void init() + { + // Restore previous viewer state. + restoreStateFromFile(); + initializeOpenGLFunctions(); + + // Define 'Control+Q' as the new exit shortcut (default was 'Escape') + setShortcut(EXIT_VIEWER, Qt::CTRL+Qt::Key_Q); + + // Add custom key description (see keyPressEvent). + setKeyDescription(Qt::Key_E, "Toggles edges display"); + setKeyDescription(Qt::Key_F, "Toggles faces display"); + setKeyDescription(Qt::Key_G, "Switch between flat/Gouraud shading display"); + setKeyDescription(Qt::Key_M, "Toggles mono color for all faces"); + setKeyDescription(Qt::Key_N, "Inverse direction of normals"); + setKeyDescription(Qt::Key_V, "Toggles vertices display"); + setKeyDescription(Qt::Key_Plus, "Increase size of edges"); + setKeyDescription(Qt::Key_Minus, "Decrease size of edges"); + setKeyDescription(Qt::Key_Plus+Qt::ShiftModifier, "Increase size of vertices"); + setKeyDescription(Qt::Key_Minus+Qt::ShiftModifier, "Decrease size of vertices"); + setKeyDescription(Qt::Key_PageDown, "Increase light (all colors, use shift/alt/ctrl for one rgb component)"); + setKeyDescription(Qt::Key_PageUp, "Decrease light (all colors, use shift/alt/ctrl for one rgb component)"); + + // Light default parameters + ::glLineWidth(m_size_edges); + ::glPointSize(m_size_points); + ::glEnable(GL_POLYGON_OFFSET_FILL); + ::glPolygonOffset(1.f,1.f); + ::glClearColor(1.0f,1.0f,1.0f,0.0f); + ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); + ::glEnable(GL_LIGHTING); + ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); + ::glShadeModel(GL_FLAT); + ::glDisable(GL_BLEND); + ::glEnable(GL_LINE_SMOOTH); + ::glDisable(GL_POLYGON_SMOOTH_HINT); + ::glBlendFunc(GL_ONE, GL_ZERO); + ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST); + + compile_shaders(); + + this->camera()->setSceneBoundingBox(qglviewer::Vec(bb.xmin(), + bb.ymin(), + bb.zmin()), + qglviewer::Vec(bb.xmax(), + bb.ymax(), + bb.zmax())); + + this->showEntireScene(); + } + + void negate_all_normals() + { + for (unsigned int k=BEGIN_NORMAL; kmodifiers(); + + if ((e->key()==Qt::Key_E) && (modifiers==Qt::NoButton)) + { + m_draw_edges=!m_draw_edges; + displayMessage(QString("Draw edges=%1.").arg(m_draw_edges?"true":"false")); + updateGL(); + } + else if ((e->key()==Qt::Key_F) && (modifiers==Qt::NoButton)) + { + m_draw_faces=!m_draw_faces; + displayMessage(QString("Draw faces=%1.").arg(m_draw_faces?"true":"false")); + updateGL(); + } + else if ((e->key()==Qt::Key_G) && (modifiers==Qt::NoButton)) + { + m_flatShading=!m_flatShading; + if (m_flatShading) + displayMessage("Flat shading."); + else + displayMessage("Gouraud shading."); + compile_shaders(); + initialize_buffers(); + updateGL(); + } + else if ((e->key()==Qt::Key_M) && (modifiers==Qt::NoButton)) + { + m_use_mono_color=!m_use_mono_color; + displayMessage(QString("Mono color=%1.").arg(m_use_mono_color?"true":"false")); + compile_shaders(); + initialize_buffers(); + updateGL(); + } + else if ((e->key()==Qt::Key_N) && (modifiers==Qt::NoButton)) + { + m_inverse_normal=!m_inverse_normal; + negate_all_normals(); + compile_shaders(); + initialize_buffers(); + displayMessage(QString("Inverse normal=%1.").arg(m_inverse_normal?"true":"false")); + updateGL(); + } + else if ((e->key()==Qt::Key_V) && (modifiers==Qt::NoButton)) + { + m_draw_vertices=!m_draw_vertices; + displayMessage(QString("Draw vertices=%1.").arg(m_draw_vertices?"true":"false")); + updateGL(); + } + else if ((e->key()==Qt::Key_Plus) && (modifiers==Qt::KeypadModifier)) + { + m_size_edges+=.5; + displayMessage(QString("Size of edges=%1.").arg(m_size_edges)); + updateGL(); + } + else if ((e->key()==Qt::Key_Minus) && (modifiers==Qt::KeypadModifier)) + { + if (m_size_edges>.5) m_size_edges-=.5; + displayMessage(QString("Size of edges=%1.").arg(m_size_edges)); + updateGL(); + } + else if ((e->key()==Qt::Key_Plus) && (modifiers==(Qt::ShiftModifier|Qt::KeypadModifier))) + { + m_size_points+=.5; + displayMessage(QString("Size of points=%1.").arg(m_size_points)); + updateGL(); + } + else if ((e->key()==Qt::Key_Minus) && (modifiers==(Qt::ShiftModifier|Qt::KeypadModifier))) + { + if (m_size_points>.5) m_size_points-=.5; + displayMessage(QString("Size of points=%1.").arg(m_size_points)); + updateGL(); + } + else if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::NoButton)) + { + m_ambient_color.setX(m_ambient_color.x()+.1); + if (m_ambient_color.x()>1.) m_ambient_color.setX(1.); + m_ambient_color.setY(m_ambient_color.x()+.1); + if (m_ambient_color.y()>1.) m_ambient_color.setY(1.); + m_ambient_color.setZ(m_ambient_color.x()+.1); + if (m_ambient_color.z()>1.) m_ambient_color.setZ(1.); + displayMessage(QString("Light color=(%1 %2 %3)."). + arg(m_ambient_color.x()).arg(m_ambient_color.y()).arg(m_ambient_color.z())); + updateGL(); + } + else if ((e->key()==Qt::Key_PageDown) && (modifiers==Qt::NoButton)) + { + m_ambient_color.setX(m_ambient_color.x()-.1); + if (m_ambient_color.x()<0.) m_ambient_color.setX(0.); + m_ambient_color.setY(m_ambient_color.y()-.1); + if (m_ambient_color.y()<0.) m_ambient_color.setY(0.); + m_ambient_color.setZ(m_ambient_color.z()-.1); + if (m_ambient_color.z()<0.) m_ambient_color.setZ(0.); + displayMessage(QString("Light color=(%1 %2 %3)."). + arg(m_ambient_color.x()).arg(m_ambient_color.y()).arg(m_ambient_color.z())); + updateGL(); + } + else if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::ShiftModifier)) + { + m_ambient_color.setX(m_ambient_color.x()+.1); + if (m_ambient_color.x()>1.) m_ambient_color.setX(1.); + displayMessage(QString("Light color=(%1 %2 %3)."). + arg(m_ambient_color.x()).arg(m_ambient_color.y()).arg(m_ambient_color.z())); + updateGL(); + } + else if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::AltModifier)) + { + m_ambient_color.setY(m_ambient_color.y()+.1); + if (m_ambient_color.y()>1.) m_ambient_color.setY(1.); + displayMessage(QString("Light color=(%1 %2 %3)."). + arg(m_ambient_color.x()).arg(m_ambient_color.y()).arg(m_ambient_color.z())); + updateGL(); + } + else if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::ControlModifier)) + { + m_ambient_color.setZ(m_ambient_color.z()+.1); + if (m_ambient_color.z()>1.) m_ambient_color.setZ(1.); + displayMessage(QString("Light color=(%1 %2 %3)."). + arg(m_ambient_color.x()).arg(m_ambient_color.y()).arg(m_ambient_color.z())); + updateGL(); + } + else if ((e->key()==Qt::Key_PageDown) && (modifiers==Qt::ShiftModifier)) + { + m_ambient_color.setX(m_ambient_color.x()-.1); + if (m_ambient_color.x()<0.) m_ambient_color.setX(0.); + displayMessage(QString("Light color=(%1 %2 %3)."). + arg(m_ambient_color.x()).arg(m_ambient_color.y()).arg(m_ambient_color.z())); + updateGL(); + } + else if ((e->key()==Qt::Key_PageDown) && (modifiers==Qt::AltModifier)) + { + m_ambient_color.setY(m_ambient_color.y()-.1); + if (m_ambient_color.y()<0.) m_ambient_color.setY(0.); + displayMessage(QString("Light color=(%1 %2 %3)."). + arg(m_ambient_color.x()).arg(m_ambient_color.y()).arg(m_ambient_color.z())); + updateGL(); + } + else if ((e->key()==Qt::Key_PageDown) && (modifiers==Qt::ControlModifier)) + { + m_ambient_color.setZ(m_ambient_color.z()-.1); + if (m_ambient_color.z()<0.) m_ambient_color.setZ(0.); + displayMessage(QString("Light color=(%1 %2 %3)."). + arg(m_ambient_color.x()).arg(m_ambient_color.y()).arg(m_ambient_color.z())); + updateGL(); + } + else + QGLViewer::keyPressEvent(e); + } + + virtual QString helpString() const + { + QString text("

    C G A L B a s i c V i e w e r

    "); + text += "Use the mouse to move the camera around the object. "; + text += "You can respectively revolve around, zoom and translate with " + "the three mouse buttons. "; + text += "Left and middle buttons pressed together rotate around the " + "camera view direction axis

    "; + text += "Pressing Alt and one of the function keys " + "(F1..F12) defines a camera keyFrame. "; + text += "Simply press the function key again to restore it. " + "Several keyFrames define a "; + text += "camera path. Paths are saved when you quit the application " + "and restored at next start.

    "; + text += "Press F to display the frame rate, A for the " + "world axis, "; + text += "Alt+Return for full screen mode and Control+S " + "to save a snapshot. "; + text += "See the Keyboard tab in this window for a complete " + "shortcut list.

    "; + text += "Double clicks automates single click actions: A left button " + "double click aligns the closer axis with the camera (if close enough). "; + text += "A middle button double click fits the zoom of the camera and " + "the right button re-centers the scene.

    "; + text += "A left button double click while holding right button pressed " + "defines the camera Revolve Around Point. "; + text += "See the Mouse tab and the documentation web pages for " + "details.

    "; + text += "Press Escape to exit the viewer."; + return text; + } + +private: + bool m_draw_vertices; + bool m_draw_edges; + bool m_draw_faces; + bool m_flatShading; + bool m_use_mono_color; + bool m_inverse_normal; + bool m_empty; + + double m_size_points; + double m_size_edges; + + CGAL::Color m_vertices_mono_color; + CGAL::Color m_edges_mono_color; + CGAL::Color m_faces_mono_color; + QVector4D m_ambient_color; + + bool m_are_buffers_initialized; + CGAL::Bbox_3 bb; + + //Shaders elements + int vertexLocation[NB_VAO_BUFFERS]; + int normalsLocation; + int mvpLocation[2]; + int mvLocation; + int colorLocation1; + int colorLocation2; + int lightLocation[5]; + + enum + { POS_MONO_POINTS=0, + POS_COLORED_POINTS, + POS_MONO_SEGMENTS, + POS_COLORED_SEGMENTS, + POS_MONO_FACES, + POS_COLORED_FACES, + BEGIN_NORMAL, + SMOOTH_NORMAL_MONO_FACES=BEGIN_NORMAL, + FLAT_NORMAL_MONO_FACES, + SMOOTH_NORMAL_COLORED_FACES, + FLAT_NORMAL_COLORED_FACES, + END_NORMAL, + COLOR_POINTS=END_NORMAL, + COLOR_SEGMENTS, + COLOR_FACES, + LAST_INDEX + }; + + std::vector arrays[LAST_INDEX]; + + QGLBuffer buffers[NB_VBO_BUFFERS]; + QOpenGLVertexArrayObject vao[NB_VAO_BUFFERS]; + int colorsLocation; + + QOpenGLShaderProgram rendering_program_mono; + QOpenGLShaderProgram rendering_program_color; + QOpenGLShaderProgram rendering_program_p_l_mono; + QOpenGLShaderProgram rendering_program_p_l_color; + + // Local variables, used when we started a new face. + bool m_face_started; + bool m_started_face_is_colored; + std::vector points_of_face; + std::vector vertex_normals_for_face; + CGAL::Color color_of_face; +}; + +#endif // CGAL_BASIC_VIEWER_H diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_operations.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_operations.cpp index 64a2002ddba..e5646197f9b 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_operations.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_operations.cpp @@ -3,7 +3,7 @@ #include /* If you want to use a viewer, you can use qglviewer. */ -#ifdef CGAL_LCC_USE_QT +#ifdef CGAL_USE_BASIC_VIEWER #include "linear_cell_complex_3_viewer_qt.h" #endif @@ -54,9 +54,9 @@ void run_test() lcc.template sew<3>(lcc.template opposite<2>(lcc.next(dh1)), lcc.other_orientation(lcc.template opposite<2>(lcc.previous(dh3)))); -#ifdef CGAL_LCC_USE_VIEWER +#ifdef CGAL_USE_BASIC_VIEWER display_lcc(lcc); -#endif // CGAL_LCC_USE_VIEWER +#endif // CGAL_USE_BASIC_VIEWER lcc.insert_cell_1_in_cell_2(lcc.next(dh1), Alpha1::run(lcc, lcc.previous(dh1))); @@ -75,9 +75,9 @@ void run_test() lcc.display_characteristics(std::cout) << ", valid=" << lcc.is_valid() << std::endl; -#ifdef CGAL_LCC_USE_VIEWER +#ifdef CGAL_USE_BASIC_VIEWER display_lcc(lcc); -#endif // CGAL_LCC_USE_VIEWER +#endif // CGAL_USE_BASIC_VIEWER } diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h index 53a231a104c..4e6d5e37077 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_viewer_qt.h @@ -21,32 +21,11 @@ #ifndef CGAL_LCC_3_VIEWER_QT_H #define CGAL_LCC_3_VIEWER_QT_H -#include -#include -#include -#include -#include -#include -#include -#include -#include - +#include "basic_viewer.h" #include #include -#include -#include -#include -#include -#include -#include #include -#include -#include - -#define NB_VBO_BUFFERS 8 -#define NB_VAO_BUFFERS 4 - typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel; typedef Local_kernel::Point_3 Local_point; typedef Local_kernel::Vector_3 Local_vector; @@ -63,137 +42,18 @@ struct DefaultColorFunctor // Here dh is the smaller dart of its face CGAL::Random random(alcc.darts().index(dh)); - return CGAL::Color(random.get_int(0,256), - random.get_int(0,256), - random.get_int(0,256)); + CGAL::Color res; + do + { + res=CGAL::Color(random.get_int(0,256), + random.get_int(0,256), + random.get_int(0,256)); + } + while(res.red()==255 && res.green()==255 && res.blue()==255); + return res; } }; -//Vertex source code -const char vertex_source_mono[] = - { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "attribute highp vec3 normal;\n" - - "uniform highp mat4 mvp_matrix;\n" - "uniform highp mat4 mv_matrix; \n" - - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" - "void main(void)\n" - "{\n" - " fP = mv_matrix * vertex; \n" - " fN = mat3(mv_matrix)* normal; \n" - " gl_Position = mvp_matrix * vertex;\n" - "}" - }; - -const char vertex_source_multi[] = - { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "attribute highp vec3 normal;\n" - "attribute highp vec3 color;\n" - - "uniform highp mat4 mvp_matrix;\n" - "uniform highp mat4 mv_matrix; \n" - - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" - "varying highp vec4 fColor; \n" - "void main(void)\n" - "{\n" - " fP = mv_matrix * vertex; \n" - " fN = mat3(mv_matrix)* normal; \n" - " fColor = vec4(color, 1.0); \n" - " gl_Position = mvp_matrix * vertex;\n" - "}" - }; - -//Vertex source code -const char fragment_source_mono[] = - { - "#version 120 \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" - "uniform highp vec4 color; \n" - "uniform vec4 light_pos; \n" - "uniform vec4 light_diff; \n" - "uniform vec4 light_spec; \n" - "uniform vec4 light_amb; \n" - "uniform float spec_power ; \n" - - "void main(void) { \n" - - " vec3 L = light_pos.xyz - fP.xyz; \n" - " vec3 V = -fP.xyz; \n" - - " vec3 N = normalize(fN); \n" - " L = normalize(L); \n" - " V = normalize(V); \n" - - " vec3 R = reflect(-L, N); \n" - " vec4 diffuse = max(dot(N,L), 0.0) * light_diff * color; \n" - " vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n" - - "gl_FragColor = light_amb*color + diffuse ; \n" - "} \n" - "\n" - }; - -const char fragment_source_multi[] = - { - "#version 120 \n" - "varying highp vec4 fP; \n" - "varying highp vec3 fN; \n" - "varying highp vec4 fColor; \n" - "uniform vec4 light_pos; \n" - "uniform vec4 light_diff; \n" - "uniform vec4 light_spec; \n" - "uniform vec4 light_amb; \n" - "uniform float spec_power ; \n" - - "void main(void) { \n" - - " vec3 L = light_pos.xyz - fP.xyz; \n" - " vec3 V = -fP.xyz; \n" - - " vec3 N = normalize(fN); \n" - " L = normalize(L); \n" - " V = normalize(V); \n" - - " vec3 R = reflect(-L, N); \n" - " vec4 diffuse = max(dot(N,L), 0.0) * light_diff * fColor; \n" - " vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n" - - "gl_FragColor = light_amb*fColor + diffuse ; \n" - "} \n" - "\n" - }; - -//Vertex source code -const char vertex_source_p_l[] = - { - "#version 120 \n" - "attribute highp vec4 vertex;\n" - "uniform highp mat4 mvp_matrix;\n" - "void main(void)\n" - "{\n" - " gl_Position = mvp_matrix * vertex;\n" - "}" - }; -//Vertex source code -const char fragment_source_p_l[] = - { - "#version 120 \n" - "uniform highp vec4 color; \n" - "void main(void) { \n" - "gl_FragColor = color; \n" - "} \n" - "\n" - }; - template struct Geom_utils; @@ -207,14 +67,6 @@ struct Geom_utils Local_point get_point(const LCC& lcc, typename LCC::Dart_const_handle dh) { return converter(lcc.point(dh)); } - Local_vector get_facet_normal(const LCC& lcc, - typename LCC::Dart_const_handle dh) - { - Local_vector n = converter(CGAL::compute_normal_of_cell_2(lcc,dh)); - n = n/(CGAL::sqrt(n*n)); - return n; - } - Local_vector get_vertex_normal(const LCC& lcc, typename LCC::Dart_const_handle dh) { @@ -240,346 +92,38 @@ struct Geom_utils Local_point get_point(const LCC& lcc, typename LCC::Dart_const_handle dh) { return get_point(lcc, lcc.vertex_attribute(dh)); } - Local_vector get_facet_normal(const LCC&, typename LCC::Dart_const_handle) - { - Local_vector n(0,1,0); - return n; - } - Local_vector get_vertex_normal(const LCC&, typename LCC::Dart_const_handle) { - Local_vector n(0,1,0); + Local_vector n(0,-1,0); return n; } protected: CGAL::Cartesian_converter converter; }; -template -CGAL::Bbox_3 bbox(const LCC& lcc) -{ - CGAL::Bbox_3 bb; - Geom_utils geomutils; - - typename LCC::Vertex_attribute_range::const_iterator - it=lcc.vertex_attributes().begin(), itend=lcc.vertex_attributes().end(); - if ( it!=itend ) - { - bb = geomutils.get_point(lcc, it).bbox(); - for( ++it; it!=itend; ++it) - { - bb = bb + geomutils.get_point(lcc, it).bbox(); - } - } - - return bb; -} - +// Viewer class for LCC template -class SimpleLCCViewerQt : public QGLViewer, public QOpenGLFunctions_2_1 +class SimpleLCCViewerQt : public Basic_viewer { + typedef Basic_viewer Base; typedef typename LCC::Dart_const_handle Dart_const_handle; - - struct Vertex_info - { - Dart_const_handle dh; - Local_vector v; - }; - - struct Face_info - { - bool exist_edge[3]; - bool is_external; - bool is_process; - }; - - typedef CGAL::Triangulation_2_projection_traits_3 P_traits; - typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; - - typedef CGAL::Triangulation_face_base_with_info_2 Fb1; - - typedef CGAL::Constrained_triangulation_face_base_2 Fb; - typedef CGAL::Triangulation_data_structure_2 TDS; - // typedef CGAL::No_intersection_tag Itag; - typedef CGAL::Exact_predicates_tag Itag; - typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; - + public: - // Constructor/Destructor - SimpleLCCViewerQt(const LCC& alcc) : - QGLViewer(CGAL::Qt::createOpenGLContext()), + /// Construct the viewer. + /// @param alcc the lcc to view + /// @param title the title of the window + /// @param anofaces if true, do not draw faces (faces are not computed; this can be + /// usefull for very big LCC where this time could be long) + SimpleLCCViewerQt(const LCC& alcc, const char* title="", bool anofaces=false) : + Base(title), lcc(alcc), - wireframe(false), - flatShading(true), - edges(true), - vertices(true), - mono(false), - inverse_normal(false), - size_points(7.), - size_edges(3.1), - ambient(0.6f, 0.5f, 0.5f, 0.5f), - are_buffers_initialized(false) + m_nofaces(anofaces) { - setWindowTitle("3D lcc viewer"); - resize(500, 450); - - QGLFormat newFormat = this->format(); - newFormat.setSampleBuffers(true); - newFormat.setSamples(16); - this->setFormat(newFormat); -} - - ~SimpleLCCViewerQt() - { - for (int i=0; icompileSourceCode(vertex_source_mono)) - { - std::cerr<<"Compiling vertex source FAILED"<compileSourceCode(vertex_source_multi)) - { - std::cerr<<"Compiling vertex source FAILED"<compileSourceCode(fragment_source_mono)) - { - std::cerr<<"Compiling fragmentsource FAILED"<compileSourceCode(fragment_source_multi)) - { - std::cerr<<"Compiling fragmentsource FAILED"<compileSourceCode(vertex_source_p_l)) - { - std::cerr<<"Compiling vertex source FAILED"<compileSourceCode(fragment_source_p_l)) - { - std::cerr<<"Compiling fragmentsource FAILED"<(pos_facets.size()*sizeof(float))); - vertexLocation[vaon] = rendering_program.attributeLocation("vertex"); - rendering_program.bind(); - rendering_program.enableAttributeArray(vertexLocation[vaon]); - rendering_program.setAttributeBuffer(vertexLocation[vaon],GL_FLOAT,0,3); - rendering_program.release(); - - buffers[bufn].release(); - ++bufn; - - //normals of the facets - assert(bufn(flat_normals.size()*sizeof(float))); - normalsLocation = rendering_program.attributeLocation("normal"); - rendering_program.bind(); - rendering_program.enableAttributeArray(normalsLocation); - rendering_program.setAttributeBuffer(normalsLocation,GL_FLOAT,0,3); - rendering_program.release(); - - buffers[bufn].release(); - ++bufn; - - if (!mono) - { - //colors of the facets - assert(bufn(colors.size()*sizeof(float))); - colorsLocation = rendering_program.attributeLocation("color"); - rendering_program.bind(); - rendering_program.enableAttributeArray(colorsLocation); - rendering_program.setAttributeBuffer(colorsLocation,GL_FLOAT,0,3); - rendering_program.release(); - - buffers[bufn].release(); - ++bufn; - } - - vao[vaon].release(); - ++vaon; - - assert(vaon(pos_facets.size()*sizeof(float))); - vertexLocation[vaon] = rendering_program.attributeLocation("vertex"); - rendering_program.bind(); - rendering_program.enableAttributeArray(vertexLocation[vaon]); - rendering_program.setAttributeBuffer(vertexLocation[vaon],GL_FLOAT,0,3); - rendering_program.release(); - - buffers[bufn].release(); - ++bufn; - - //normals of the facets - assert(bufn(smooth_normals.size()*sizeof(float))); - normalsLocation = rendering_program.attributeLocation("normal"); - rendering_program.bind(); - rendering_program.enableAttributeArray(normalsLocation); - rendering_program.setAttributeBuffer(normalsLocation,GL_FLOAT,0,3); - rendering_program.release(); - - buffers[bufn].release(); - ++bufn; - - if (!mono) - { - //colors of the facets - assert(bufn(colors.size()*sizeof(float))); - colorsLocation = rendering_program.attributeLocation("color"); - rendering_program.bind(); - rendering_program.enableAttributeArray(colorsLocation); - rendering_program.setAttributeBuffer(colorsLocation,GL_FLOAT,0,3); - buffers[bufn].release(); - - rendering_program.release(); - ++bufn; - } - - vao[vaon].release(); - ++vaon; - - //The lines - assert(vaon(pos_lines.size()*sizeof(float))); - vertexLocation[vaon] = rendering_program_p_l.attributeLocation("vertex"); - rendering_program_p_l.bind(); - rendering_program_p_l.enableAttributeArray(vertexLocation[vaon]); - rendering_program_p_l.setAttributeBuffer(vertexLocation[vaon],GL_FLOAT,0,3); - rendering_program_p_l.release(); - - buffers[bufn].release(); - ++bufn; - - vao[vaon].release(); - ++vaon; - - //The points - assert(vaon(pos_points.size()*sizeof(float))); - vertexLocation[vaon] = rendering_program_p_l.attributeLocation("vertex"); - rendering_program_p_l.bind(); - rendering_program_p_l.enableAttributeArray(vertexLocation[vaon]); - rendering_program_p_l.setAttributeBuffer(vertexLocation[vaon],GL_FLOAT,0,3); - rendering_program_p_l.release(); - - buffers[bufn].release(); - ++bufn; - - vao[vaon].release(); - ++vaon; - - are_buffers_initialized = true; - } - + void compute_face(Dart_const_handle dh) { // We fill only closed faces. @@ -593,252 +137,56 @@ protected: } while(cur!=dh); - double r=0.; - double g=0.; - double b=0.; - CGAL::Color c=ColorFunctor::run(lcc, dh); - r=(double)c.red()/(double)255; - g=(double)c.green()/(double)255; - b=(double)c.blue()/(double)255; - - //compute flat normals - Local_vector normal = geomutils.get_facet_normal(lcc, dh); - normal = normal/(CGAL::sqrt(normal*normal)); - if (inverse_normal) normal=normal*-1; - - if (lcc.next(lcc.next(lcc.next(dh)))!=dh) - { - try - { - P_traits cdt_traits(normal); - CDT cdt(cdt_traits); - - // Iterates on the vector of facet handles - typename CDT::Vertex_handle previous = NULL, first = NULL; - cur=dh; - do - { - typename CDT::Vertex_handle vh = cdt.insert(geomutils.get_point(lcc, cur)); - if(first==NULL) - { first=vh; } - vh->info().v = geomutils.get_vertex_normal(lcc, cur); - if (inverse_normal) vh->info().v=vh->info().v*-1; - - if(previous!=NULL && previous!=vh) - { cdt.insert_constraint(previous, vh); } - previous=vh; - cur=lcc.next(cur); - } - while(cur!=dh); - - if (previous!=NULL) - cdt.insert_constraint(previous, first); - - // sets mark is_external - for(typename CDT::All_faces_iterator fit = cdt.all_faces_begin(), - fitend = cdt.all_faces_end(); fit!=fitend; ++fit) - { - fit->info().is_external = true; - fit->info().is_process = false; - } - //check if the facet is external or internal - std::queue face_queue; - typename CDT::Face_handle face_internal = NULL; - face_queue.push(cdt.infinite_vertex()->face()); - while(! face_queue.empty() ) - { - typename CDT::Face_handle fh = face_queue.front(); - face_queue.pop(); - if(!fh->info().is_process) - { - fh->info().is_process = true; - for(int i = 0; i <3; ++i) - { - if(!cdt.is_constrained(std::make_pair(fh, i))) - { - face_queue.push(fh->neighbor(i)); - } - else if (face_internal==NULL) - { - face_internal = fh->neighbor(i); - } - } - } - } - if ( face_internal!=NULL ) - face_queue.push(face_internal); - - while(! face_queue.empty() ) - { - typename CDT::Face_handle fh = face_queue.front(); - face_queue.pop(); - if(!fh->info().is_process) - { - fh->info().is_process = true; - fh->info().is_external = false; - for(int i = 0; i <3; ++i) - { - if(!cdt.is_constrained(std::make_pair(fh, i))) - { - face_queue.push(fh->neighbor(i)); - } - } - } - } - - //iterates on the internal faces to add the vertices to the positions - //and the normals to the appropriate vectors - for(typename CDT::Finite_faces_iterator ffit = cdt.finite_faces_begin(), - ffitend = cdt.finite_faces_end(); ffit != ffitend; ++ffit) - { - if(!ffit->info().is_external) - { - flat_normals.push_back(normal.x()); - flat_normals.push_back(normal.y()); - flat_normals.push_back(normal.z()); - - flat_normals.push_back(normal.x()); - flat_normals.push_back(normal.y()); - flat_normals.push_back(normal.z()); - - flat_normals.push_back(normal.x()); - flat_normals.push_back(normal.y()); - flat_normals.push_back(normal.z()); - - smooth_normals.push_back(ffit->vertex(0)->info().v.x()); - smooth_normals.push_back(ffit->vertex(0)->info().v.y()); - smooth_normals.push_back(ffit->vertex(0)->info().v.z()); - - smooth_normals.push_back(ffit->vertex(1)->info().v.x()); - smooth_normals.push_back(ffit->vertex(1)->info().v.y()); - smooth_normals.push_back(ffit->vertex(1)->info().v.z()); - - smooth_normals.push_back(ffit->vertex(2)->info().v.x()); - smooth_normals.push_back(ffit->vertex(2)->info().v.y()); - smooth_normals.push_back(ffit->vertex(2)->info().v.z()); - - pos_facets.push_back(ffit->vertex(0)->point().x()); - pos_facets.push_back(ffit->vertex(0)->point().y()); - pos_facets.push_back(ffit->vertex(0)->point().z()); - - pos_facets.push_back(ffit->vertex(1)->point().x()); - pos_facets.push_back(ffit->vertex(1)->point().y()); - pos_facets.push_back(ffit->vertex(1)->point().z()); - - pos_facets.push_back(ffit->vertex(2)->point().x()); - pos_facets.push_back(ffit->vertex(2)->point().y()); - pos_facets.push_back(ffit->vertex(2)->point().z()); - - colors.push_back(r);colors.push_back(g);colors.push_back(b); - colors.push_back(r);colors.push_back(g);colors.push_back(b); - colors.push_back(r);colors.push_back(g);colors.push_back(b); - } - } - } - catch(...) - { // Triangulation crash: the face is not filled - } - } + if (c.red()<60 || c.green()<60 || c.blue()<60) + mono_face_begin(); else + colored_face_begin(c); + + cur=dh; + do { - colors.push_back(r);colors.push_back(g);colors.push_back(b); - colors.push_back(r);colors.push_back(g);colors.push_back(b); - colors.push_back(r);colors.push_back(g);colors.push_back(b); - - flat_normals.push_back(normal.x()); - flat_normals.push_back(normal.y()); - flat_normals.push_back(normal.z()); - - flat_normals.push_back(normal.x()); - flat_normals.push_back(normal.y()); - flat_normals.push_back(normal.z()); - - flat_normals.push_back(normal.x()); - flat_normals.push_back(normal.y()); - flat_normals.push_back(normal.z()); - - //compute Smooth normals - cur=dh; - do - { - Local_vector normal = geomutils.get_vertex_normal(lcc, cur); - normal = normal/(CGAL::sqrt(normal*normal)); - if (inverse_normal) normal=normal*-1; - - smooth_normals.push_back(normal.x()); - smooth_normals.push_back(normal.y()); - smooth_normals.push_back(normal.z()); - - Local_point p = geomutils.get_point(lcc, cur); - pos_facets.push_back(p.x()); - pos_facets.push_back(p.y()); - pos_facets.push_back(p.z()); - cur=lcc.next(cur); - } - while(cur!=dh); + add_point_in_face(geomutils.get_point(lcc, cur), + geomutils.get_vertex_normal(lcc, cur)); + cur=lcc.next(cur); } + while(cur!=dh); + + face_end(); } void compute_edge(Dart_const_handle dh) { - Local_point p = geomutils.get_point(lcc, dh); + Local_point p1 = geomutils.get_point(lcc, dh); Dart_const_handle d2 = lcc.other_extremity(dh); if ( d2!=NULL ) { Local_point p2 = geomutils.get_point(lcc, d2); - pos_lines.push_back(p.x()); - pos_lines.push_back(p.y()); - pos_lines.push_back(p.z()); - - pos_lines.push_back(p2.x()); - pos_lines.push_back(p2.y()); - pos_lines.push_back(p2.z()); + add_mono_segment(p1, p2); } } void compute_vertex(Dart_const_handle dh, bool& empty) { - Local_point p = geomutils.get_point(lcc, dh); - pos_points.push_back(p.x()); - pos_points.push_back(p.y()); - pos_points.push_back(p.z()); - - if ( empty ) - { - bb = p.bbox(); - empty = false; - } - else - bb = bb + p.bbox(); + Local_point p = geomutils.get_point(lcc, dh); + add_mono_point(p); } void compute_elements() { - pos_facets.clear(); - flat_normals.clear(); - smooth_normals.clear(); - pos_lines.clear(); - pos_points.clear(); - colors.clear(); + clear(); - if ( lcc.is_empty() ) - { - bb = Local_point(CGAL::ORIGIN).bbox(); - bb = bb + Local_point(1,1,1).bbox(); // To avoid a warning from Qglviewer - return; - } - unsigned int markfaces = lcc.get_new_mark(); unsigned int markedges = lcc.get_new_mark(); unsigned int markvertices = lcc.get_new_mark(); bool empty = true; + for (typename LCC::Dart_range::const_iterator it=lcc.darts().begin(), - itend=lcc.darts().end(); it!=itend; ++it ) + itend=lcc.darts().end(); it!=itend; ++it ) { - if ( !lcc.is_marked(it, markfaces) ) + if ( !m_nofaces && !lcc.is_marked(it, markfaces) ) { compute_face(it); CGAL::mark_cell(lcc, it, markfaces); @@ -862,432 +210,30 @@ protected: lcc.free_mark(markvertices); } - void attrib_buffers(QGLViewer* viewer) - { - QMatrix4x4 mvpMatrix; - QMatrix4x4 mvMatrix; - double mat[16]; - viewer->camera()->getModelViewProjectionMatrix(mat); - for(int i=0; i < 16; i++) - { - mvpMatrix.data()[i] = (float)mat[i]; - } - viewer->camera()->getModelViewMatrix(mat); - for(int i=0; i < 16; i++) - { - mvMatrix.data()[i] = (float)mat[i]; - } - // define material - QVector4D diffuse( 0.9f, - 0.9f, - 0.9f, - 0.9f ); - - QVector4D specular( 0.0f, - 0.0f, - 0.0f, - 1.0f ); - - QVector4D position((bb.xmax()-bb.xmin())/2, (bb.ymax()-bb.ymin())/2,bb.zmax(), 0.0 ); - GLfloat shininess = 1.0f; - - rendering_program.bind(); - mvpLocation[0] = rendering_program.uniformLocation("mvp_matrix"); - mvLocation = rendering_program.uniformLocation("mv_matrix"); - lightLocation[0] = rendering_program.uniformLocation("light_pos"); - lightLocation[1] = rendering_program.uniformLocation("light_diff"); - lightLocation[2] = rendering_program.uniformLocation("light_spec"); - lightLocation[3] = rendering_program.uniformLocation("light_amb"); - lightLocation[4] = rendering_program.uniformLocation("spec_power"); - - rendering_program.setUniformValue(lightLocation[0], position); - rendering_program.setUniformValue(lightLocation[1], diffuse); - rendering_program.setUniformValue(lightLocation[2], specular); - rendering_program.setUniformValue(lightLocation[3], ambient); - rendering_program.setUniformValue(lightLocation[4], shininess); - rendering_program.setUniformValue(mvpLocation[0], mvpMatrix); - rendering_program.setUniformValue(mvLocation, mvMatrix); - - if (mono) - colorLocation2 = rendering_program.uniformLocation("color"); - - rendering_program.release(); - - rendering_program_p_l.bind(); - mvpLocation[1] = rendering_program_p_l.uniformLocation("mvp_matrix"); - colorLocation = rendering_program_p_l.uniformLocation("color"); - rendering_program.setUniformValue(mvpLocation[1], mvpMatrix); - rendering_program_p_l.release(); - } - - virtual void draw() - { - glEnable(GL_DEPTH_TEST); - if(!are_buffers_initialized) - initialize_buffers(); - - QColor color; - if ( !wireframe ) - { - if(flatShading) - { - vao[0].bind(); - attrib_buffers(this); - rendering_program.bind(); - if (mono) - { - CGAL::Color c=ColorFunctor::run(lcc, NULL); - color.setRgbF((double)c.red()/(double)255, - (double)c.green()/(double)255, - (double)c.blue()/(double)255); - rendering_program.setUniformValue(colorLocation2,color); - } - glDrawArrays(GL_TRIANGLES, 0, static_cast(pos_facets.size()/3)); - rendering_program.release(); - vao[0].release(); - } - else - { - vao[1].bind(); - attrib_buffers(this); - rendering_program.bind(); - if (mono) - { - CGAL::Color c=ColorFunctor::run(lcc, NULL); - color.setRgbF((double)c.red()/(double)255, - (double)c.green()/(double)255, - (double)c.blue()/(double)255); - rendering_program.setUniformValue(colorLocation2,color); - } - glDrawArrays(GL_TRIANGLES, 0, static_cast(pos_facets.size()/3)); - rendering_program.release(); - vao[1].release(); - } - } - if(edges) - { - vao[2].bind(); - attrib_buffers(this); - color.setRgbF(0.2f, 0.2f, 0.7f); - rendering_program_p_l.bind(); - rendering_program_p_l.setAttributeValue(colorLocation,color); - ::glLineWidth(size_edges); - glDrawArrays(GL_LINES, 0, static_cast(pos_lines.size()/3)); - rendering_program_p_l.release(); - vao[2].release(); - } - if(vertices) - { - ::glPointSize(size_points); - vao[3].bind(); - attrib_buffers(this); - color.setRgbF(.2f,.2f,.6f); - rendering_program_p_l.bind(); - rendering_program_p_l.setAttributeValue(colorLocation,color); - glDrawArrays(GL_POINTS, 0, static_cast(pos_points.size()/3)); - rendering_program_p_l.release(); - vao[3].release(); - } - } - - virtual void init() - { - // Restore previous viewer state. - restoreStateFromFile(); - - // Define 'Control+Q' as the new exit shortcut (default was 'Escape') - setShortcut(EXIT_VIEWER, Qt::CTRL+Qt::Key_Q); - - // Add custom key description (see keyPressEvent). - setKeyDescription(Qt::Key_W, "Toggles wire frame display"); - setKeyDescription(Qt::Key_F, "Toggles flat shading display"); - setKeyDescription(Qt::Key_E, "Toggles edges display"); - setKeyDescription(Qt::Key_V, "Toggles vertices display"); - setKeyDescription(Qt::Key_M, "Toggles mono color for all faces"); - setKeyDescription(Qt::Key_N, "Inverse direction of normals"); - setKeyDescription(Qt::Key_Plus, "Increase size of edges"); - setKeyDescription(Qt::Key_Minus, "Decrease size of edges"); - setKeyDescription(Qt::Key_Plus+Qt::ShiftModifier, "Increase size of vertices"); - setKeyDescription(Qt::Key_Minus+Qt::ShiftModifier, "Decrease size of vertices"); - setKeyDescription(Qt::Key_PageDown, "Increase light (all colors, use shift/alt/ctrl for one rgb component)"); - setKeyDescription(Qt::Key_PageUp, "Decrease light (all colors, use shift/alt/ctrl for one rgb component)"); - - // Light default parameters - ::glLineWidth(size_edges); - ::glPointSize(size_points); - ::glEnable(GL_POLYGON_OFFSET_FILL); - ::glPolygonOffset(1.f,1.f); - ::glClearColor(1.0f,1.0f,1.0f,0.0f); - ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); - - ::glEnable(GL_LIGHTING); - - ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); - - ::glShadeModel(GL_FLAT); - ::glDisable(GL_BLEND); - ::glEnable(GL_LINE_SMOOTH); - ::glDisable(GL_POLYGON_SMOOTH_HINT); - ::glBlendFunc(GL_ONE, GL_ZERO); - ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST); - - initializeOpenGLFunctions(); - compile_shaders(); - compute_elements(); - - this->camera()->setSceneBoundingBox(qglviewer::Vec(bb.xmin(), - bb.ymin(), - bb.zmin()), - qglviewer::Vec(bb.xmax(), - bb.ymax(), - bb.zmax())); - - this->showEntireScene(); - } - - void keyPressEvent(QKeyEvent *e) + virtual void keyPressEvent(QKeyEvent *e) { const Qt::KeyboardModifiers modifiers = e->modifiers(); - - if ((e->key()==Qt::Key_W) && (modifiers==Qt::NoButton)) - { - wireframe = !wireframe; - if (wireframe) - { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - displayMessage("Wireframe."); - } - else - { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - displayMessage("Filled faces."); - } - updateGL(); - } - else if ((e->key()==Qt::Key_F) && (modifiers==Qt::NoButton)) - { - flatShading = !flatShading; - if (flatShading) - displayMessage("Flat shading."); - else - displayMessage("Gouraud shading."); - updateGL(); - } - else if ((e->key()==Qt::Key_E) && (modifiers==Qt::NoButton)) - { - edges = !edges; - displayMessage(QString("Draw edges=%1.").arg(edges?"true":"false")); - updateGL(); - } - else if ((e->key()==Qt::Key_V) && (modifiers==Qt::NoButton)) - { - vertices = !vertices; - displayMessage(QString("Draw vertices=%1.").arg(vertices?"true":"false")); - updateGL(); - } - else if ((e->key()==Qt::Key_M) && (modifiers==Qt::NoButton)) - { - mono = !mono; - initialize_buffers(); - compile_shaders(); - displayMessage(QString("Mono color=%1.").arg(mono?"true":"false")); - updateGL(); - } - else if ((e->key()==Qt::Key_N) && (modifiers==Qt::NoButton)) - { - inverse_normal = !inverse_normal; - compute_elements(); - initialize_buffers(); - compile_shaders(); - displayMessage(QString("Inverse normal=%1.").arg(inverse_normal?"true":"false")); - updateGL(); - } - else if ((e->key()==Qt::Key_Plus) && (modifiers==Qt::KeypadModifier)) - { - size_edges+=.5; - displayMessage(QString("Size of edges=%1.").arg(size_edges)); - updateGL(); - } - else if ((e->key()==Qt::Key_Minus) && (modifiers==Qt::KeypadModifier)) - { - if (size_edges>.5) size_edges-=.5; - displayMessage(QString("Size of edges=%1.").arg(size_edges)); - updateGL(); - } - else if ((e->key()==Qt::Key_Plus) && (modifiers==(Qt::ShiftModifier|Qt::KeypadModifier))) - { - size_points+=.5; - displayMessage(QString("Size of points=%1.").arg(size_points)); - updateGL(); - } - else if ((e->key()==Qt::Key_Minus) && (modifiers==(Qt::ShiftModifier|Qt::KeypadModifier))) - { - if (size_points>.5) size_points-=.5; - displayMessage(QString("Size of points=%1.").arg(size_points)); - updateGL(); - } - else if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::NoButton)) - { - ambient.setX(ambient.x()+.1); - if (ambient.x()>1.) ambient.setX(1.); - ambient.setY(ambient.x()+.1); - if (ambient.y()>1.) ambient.setY(1.); - ambient.setZ(ambient.x()+.1); - if (ambient.z()>1.) ambient.setZ(1.); - displayMessage(QString("Light color=(%1 %2 %3)."). - arg(ambient.x()).arg(ambient.y()).arg(ambient.z())); - updateGL(); - } - else if ((e->key()==Qt::Key_PageDown) && (modifiers==Qt::NoButton)) - { - ambient.setX(ambient.x()-.1); - if (ambient.x()<0.) ambient.setX(0.); - ambient.setY(ambient.y()-.1); - if (ambient.y()<0.) ambient.setY(0.); - ambient.setZ(ambient.z()-.1); - if (ambient.z()<0.) ambient.setZ(0.); - displayMessage(QString("Light color=(%1 %2 %3)."). - arg(ambient.x()).arg(ambient.y()).arg(ambient.z())); - updateGL(); - } - else if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::ShiftModifier)) - { - ambient.setX(ambient.x()+.1); - if (ambient.x()>1.) ambient.setX(1.); - displayMessage(QString("Light color=(%1 %2 %3)."). - arg(ambient.x()).arg(ambient.y()).arg(ambient.z())); - updateGL(); - } - else if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::AltModifier)) - { - ambient.setY(ambient.y()+.1); - if (ambient.y()>1.) ambient.setY(1.); - displayMessage(QString("Light color=(%1 %2 %3)."). - arg(ambient.x()).arg(ambient.y()).arg(ambient.z())); - updateGL(); - } - else if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::ControlModifier)) - { - ambient.setZ(ambient.z()+.1); - if (ambient.z()>1.) ambient.setZ(1.); - displayMessage(QString("Light color=(%1 %2 %3)."). - arg(ambient.x()).arg(ambient.y()).arg(ambient.z())); - updateGL(); - } - else if ((e->key()==Qt::Key_PageDown) && (modifiers==Qt::ShiftModifier)) - { - ambient.setX(ambient.x()-.1); - if (ambient.x()<0.) ambient.setX(0.); - displayMessage(QString("Light color=(%1 %2 %3)."). - arg(ambient.x()).arg(ambient.y()).arg(ambient.z())); - updateGL(); - } - else if ((e->key()==Qt::Key_PageDown) && (modifiers==Qt::AltModifier)) - { - ambient.setY(ambient.y()-.1); - if (ambient.y()<0.) ambient.setY(0.); - displayMessage(QString("Light color=(%1 %2 %3)."). - arg(ambient.x()).arg(ambient.y()).arg(ambient.z())); - updateGL(); - } - else if ((e->key()==Qt::Key_PageDown) && (modifiers==Qt::ControlModifier)) - { - ambient.setZ(ambient.z()-.1); - if (ambient.z()<0.) ambient.setZ(0.); - displayMessage(QString("Light color=(%1 %2 %3)."). - arg(ambient.x()).arg(ambient.y()).arg(ambient.z())); - updateGL(); - } - else - QGLViewer::keyPressEvent(e); + Base::keyPressEvent(e); } - - virtual QString helpString() const - { - QString text("

    L C C V i e w e r

    "); - text += "Use the mouse to move the camera around the object. "; - text += "You can respectively revolve around, zoom and translate with " - "the three mouse buttons. "; - text += "Left and middle buttons pressed together rotate around the " - "camera view direction axis

    "; - text += "Pressing Alt and one of the function keys " - "(F1..F12) defines a camera keyFrame. "; - text += "Simply press the function key again to restore it. " - "Several keyFrames define a "; - text += "camera path. Paths are saved when you quit the application " - "and restored at next start.

    "; - text += "Press F to display the frame rate, A for the " - "world axis, "; - text += "Alt+Return for full screen mode and Control+S " - "to save a snapshot. "; - text += "See the Keyboard tab in this window for a complete " - "shortcut list.

    "; - text += "Double clicks automates single click actions: A left button " - "double click aligns the closer axis with the camera (if close enough). "; - text += "A middle button double click fits the zoom of the camera and " - "the right button re-centers the scene.

    "; - text += "A left button double click while holding right button pressed " - "defines the camera Revolve Around Point. "; - text += "See the Mouse tab and the documentation web pages for " - "details.

    "; - text += "Press Escape to exit the viewer."; - return text; - } - -private: +protected: const LCC& lcc; - - bool wireframe; - bool flatShading; - bool edges; - bool vertices; - bool mono; - bool inverse_normal; - - double size_points; - double size_edges; - - QVector4D ambient; - - bool are_buffers_initialized; - - //Shaders elements - int vertexLocation[NB_VAO_BUFFERS]; - int normalsLocation; - int mvpLocation[2]; - int mvLocation; - int colorLocation; - int colorLocation2; - int lightLocation[5]; - - std::vector pos_points; - std::vector pos_lines; - std::vector pos_facets; - std::vector smooth_normals; - std::vector flat_normals; - std::vector colors; - - QGLBuffer buffers[NB_VBO_BUFFERS]; - QOpenGLVertexArrayObject vao[NB_VAO_BUFFERS]; - int colorsLocation; - - QOpenGLShaderProgram rendering_program; - QOpenGLShaderProgram rendering_program_p_l; - - CGAL::Bbox_3 bb; + bool m_nofaces; Geom_utils geomutils; }; + template -void display_lcc(const LCC& alcc) +void display_lcc(const LCC& alcc, + const char* title="", + bool nofill=false) { int argc=1; const char* argv[2]={"lccviewer","\0"}; QApplication app(argc,const_cast(argv)); - SimpleLCCViewerQt mainwindow(alcc); + SimpleLCCViewerQt mainwindow(alcc, title, nofill); mainwindow.show(); app.exec(); diff --git a/Linear_cell_complex/examples/Linear_cell_complex/voronoi_2.cpp b/Linear_cell_complex/examples/Linear_cell_complex/voronoi_2.cpp index 7045b188ab1..43ac93a3327 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/voronoi_2.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/voronoi_2.cpp @@ -7,7 +7,7 @@ #include /* If you want to use a viewer, you can use qglviewer. */ -#ifdef CGAL_LCC_USE_QT +#ifdef CGAL_USE_BASIC_VIEWER #include "linear_cell_complex_3_viewer_qt.h" #endif @@ -57,9 +57,9 @@ void display_voronoi(LCC_2& alcc, Dart_handle adart) << alcc.is_valid() << std::endl; -#ifdef CGAL_LCC_USE_VIEWER +#ifdef CGAL_USE_BASIC_VIEWER display_lcc(alcc); -#endif // CGAL_LCC_USE_VIEWER +#endif // CGAL_USE_BASIC_VIEWER } template diff --git a/Linear_cell_complex/examples/Linear_cell_complex/voronoi_3.cpp b/Linear_cell_complex/examples/Linear_cell_complex/voronoi_3.cpp index 9506bb8e9fc..28bf93b0f12 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/voronoi_3.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/voronoi_3.cpp @@ -6,7 +6,7 @@ #include /* If you want to use a viewer, you can use one qglviewer. */ -#ifdef CGAL_LCC_USE_QT +#ifdef CGAL_USE_BASIC_VIEWER #include "linear_cell_complex_3_viewer_qt.h" #endif @@ -60,9 +60,9 @@ void display_voronoi(LCC_3& alcc, Dart_handle adart) << alcc.is_valid() << std::endl; -#ifdef CGAL_LCC_USE_VIEWER +#ifdef CGAL_USE_BASIC_VIEWER display_lcc(alcc); -#endif // CGAL_LCC_USE_VIEWER +#endif // CGAL_USE_BASIC_VIEWER } template diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h index d46dc9956f7..be80039d8e5 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h @@ -367,7 +367,7 @@ namespace CGAL { // Get the dart of the i-cell attribute associated with the given dart template - Dart_handle & dart(Dart_handle adart) + Dart_handle dart(Dart_handle adart) { CGAL_assertion( adart!=NULL ); CGAL_assertion( attribute(adart)!=NULL ); diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h index 385faced906..8d727c0870b 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h @@ -359,7 +359,7 @@ namespace CGAL { // Get the dart of the i-cell attribute associated with the given dart template - Dart_handle & dart(Dart_handle adart) + Dart_handle dart(Dart_handle adart) { CGAL_assertion( adart!=NULL ); CGAL_assertion( attribute(adart)!=NULL ); diff --git a/Linear_cell_complex/include/CGAL/boost/graph/cgal_bgl_graph_io.h b/Linear_cell_complex/include/CGAL/boost/graph/cgal_bgl_graph_io.h deleted file mode 100644 index 7168853a003..00000000000 --- a/Linear_cell_complex/include/CGAL/boost/graph/cgal_bgl_graph_io.h +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) 2015 GeometryFactory (France). All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; either version 3 of the License, -// or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0+ -// -// -// Author(s) : Andreas Fabri - -#ifndef CGAL_BOOST_GRAPH_IO_H -#define CGAL_BOOST_GRAPH_IO_H - -#include // In first to avoid bug #12534 for boost 1.62 (?) -#include -#include -#include -#include -#include -#include -#include -#include - -namespace CGAL { - -template -typename boost::graph_traits::degree_size_type -degree(typename boost::graph_traits::face_descriptor f, - const FaceGraph& g) -{ - typename boost::graph_traits::degree_size_type res=0; - - typename boost::graph_traits::halfedge_descriptor - hdinit=halfedge(f, g), hd=hdinit; - - do - { - ++res; - hd=next(hd, g); - } - while(hd!=hdinit); - - return res; -} - -/*! - \ingroup PkgBGLIOFct - writes the graph `g` in the OFF format. - \sa Overloads of this function for specific models of the concept `FaceGraph`. - - */ -template -bool write_off(std::ostream& os, - const FaceGraph& g) -{ - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef typename boost::graph_traits::vertices_size_type vertices_size_type; - typedef typename boost::graph_traits::faces_size_type faces_size_type; - - typename boost::property_map::const_type vpm = get(CGAL::vertex_point,g); - vertices_size_type nv = static_cast(std::distance(vertices(g).first, vertices(g).second)); - faces_size_type nf = static_cast(std::distance(faces(g).first, faces(g).second)); - - os << "OFF\n" << nv << " " << nf << " 0\n"; - boost::container::flat_map reindex; - int n = 0; - BOOST_FOREACH(vertex_descriptor v, vertices(g)){ - os << get(vpm,v) << '\n'; - reindex[v]=n++; - } - - BOOST_FOREACH(face_descriptor f, faces(g)){ - os << degree(f,g); - BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f,g),g)){ - os << " " << reindex[v]; - } - os << '\n'; - } - return os.good(); -} - - -/*! - \ingroup PkgBGLIOFct - writes the graph `g` in the OFF format. - \sa Overloads of this function for specific models of the concept `FaceGraph`. - - */ -template -bool write_off(const char* fname, - const FaceGraph& g) -{ - std::ofstream out(fname); - if(out.good()){ - return write_off(out,g); - } - return false; -} - - - namespace internal { namespace read_off_tools { - - inline bool is_whitespace(const std::string& s) - { - for(unsigned int i=0; i < s.size(); i++){ - if(s[i] != ' ' && s[i] != '\t'){ - return false; - } - } - return true; - } - -inline std::string next_non_comment(std::istream& is) -{ - std::string line; - do { - std::getline(is, line); - }while(line[0] == '#' || is_whitespace(line)); - return line; -} - - } - } // namespace internal - - -/*! - \ingroup PkgBGLIOFct - reads the graph `g` from data in the OFF format. Ignores comment lines which start with a hash, and lines with whitespace. - \sa Overloads of this function for specific models of the concept `FaceGraph`. - \pre The data must represent a 2-manifold - \attention The graph `g` is not cleared, and the data from the stream are added. - - */ -template -bool read_off(std::istream& is, - FaceGraph& g) -{ - using namespace internal::read_off_tools; - - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::vertices_size_type vertices_size_type; - typedef typename boost::graph_traits::faces_size_type faces_size_type; - - typedef typename boost::property_map::type Vpm; - typedef typename boost::property_traits::value_type Point_3; - Vpm vpm = get(CGAL::vertex_point,g); - vertices_size_type nv, nvf; - faces_size_type nf; - int ignore; - - std::string line = next_non_comment(is); - { - std::istringstream iss(line); - std::string off; - iss >> off; - CGAL_assertion(off=="OFF" || off=="COFF"); - } - line = next_non_comment(is); - { - std::istringstream iss(line); - iss >> nv >> nf >> ignore; - } - - std::vector vertices(nv); - Point_3 p; - for(vertices_size_type i=0; i < nv; i++){ - line = next_non_comment(is); - std::istringstream iss(line); - iss >> p; - vertices[i] = add_vertex(g); - put(vpm,vertices[i],p); - } - - for(faces_size_type i=0; i < nf; i++){ - line = next_non_comment(is); - std::istringstream iss(line); - iss >> nvf; - std::vector face(nvf); - for(vertices_size_type j = 0; j < nvf; j++){ - faces_size_type fvi; - iss >> fvi; - face[j] = vertices[fvi]; - } - Euler::add_face(face,g); - } - return true; -} - - -/*! - \ingroup PkgBGLIOFct - reads the graph `g` from data in the OFF format. Ignores comment lines which start with a hash, and lines with whitespace. - \sa Overloads of this function for specific models of the concept `FaceGraph`. - \pre The data must represent a 2-manifold - \attention The graph `g` is not cleared, and the data from the stream are added. - - */ -template -bool read_off(const char* fname, - FaceGraph& g) -{ - std::ifstream in(fname); - if(in.good()){ - return read_off(in, g); - } - return false; -} - - -} // namespace CGAL - -#endif // CGAL_BOOST_GRAPH_IO_H diff --git a/Linear_cell_complex/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h b/Linear_cell_complex/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h index a6de5e62e46..0f86130aeff 100644 --- a/Linear_cell_complex/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h +++ b/Linear_cell_complex/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h @@ -33,7 +33,7 @@ #include #include -#include // TODO update path when small feature generic load off will be accepted +#include #include #include @@ -285,6 +285,21 @@ in_degree(typename boost::graph_traits::vertex_descriptor v, const CGAL_LCC_TYPE& lcc) { return degree(v, lcc); } +CGAL_LCC_TEMPLATE_ARGS +typename boost::graph_traits::degree_size_type +degree(typename boost::graph_traits::face_descriptor f, + const CGAL_LCC_TYPE& lcc) + +{ + typename boost::graph_traits::degree_size_type degree=0; + for (typename CGAL_LCC_TYPE::template Dart_of_cell_range<2>::const_iterator + it=lcc.template darts_of_cell<2>(f->dart()).begin(), + itend=lcc.template darts_of_cell<2>(f->dart()).end(); + it!=itend; ++it) + { ++degree; } + return degree; +} + CGAL_LCC_TEMPLATE_ARGS typename boost::graph_traits::vertex_descriptor source(typename boost::graph_traits::halfedge_descriptor h, diff --git a/Maintenance/svn_server/hooks/Mail/Sender/CType/Ext.pm b/Maintenance/svn_server/hooks/Mail/Sender/CType/Ext.pm deleted file mode 100644 index 957e9929d74..00000000000 --- a/Maintenance/svn_server/hooks/Mail/Sender/CType/Ext.pm +++ /dev/null @@ -1,208 +0,0 @@ -package Mail::Sender; -%Mail::Sender::CTypes = -( -#------------------------------------------ -'HTML', "text/html", -'HTM', "text/html", -'STM', "text/html", -'SHTML', "text/html", -'TXT', "text/plain", -'PREF', "text/plain", -'AIS', "text/plain", -'RTX', "text/richtext", -'TSV', "text/tab-separated-values", -'NFO', "text/warez-info", -'ETX', "text/x-setext", -'SGML', "text/x-sgml", -'SGM', "text/x-sgml", -'TALK', "text/x-speech", -'CGI', "text/plain", # we want these two as text files -'PL', "text/plain", # and not application/x-httpd-cgi -#----------------------------------------- -'COD', "image/cis-cod", -'FID', "image/fif", -'GIF', "image/gif", -'ICO', "image/ico", -'IEF', "image/ief", -'JPEG', "image/jpeg", -'JPG', "image/jpeg", -'JPE', "image/jpeg", -'PNG', "image/png", -'TIF', "image/tiff", -'TIFF', "image/tiff", -'MCF', "image/vasa", -'RAS', "image/x-cmu-raster", -'CMX', "image/x-cmx", -'PCD', "image/x-photo-cd", -'PNM', "image/x-portable-anymap", -'PBM', "image/x-portable-bitmap", -'PGM', "image/x-portable-graymap", -'PPM', "image/x-portable-pixmap", -'RGB', "image/x-rgb", -'XBM', "image/x-xbitmap", -'XPM', "image/x-xpixmap", -'XWD', "image/x-xwindowdump", -#------------------------------------------ -'EXE', "application/octet-stream", -'BIN', "application/octet-stream", -'DMS', "application/octet-stream", -'LHA', "application/octet-stream", -'CLASS', "application/octet-stream", -'DLL', "application/octet-stream", -'AAM', "application/x-authorware-map", -'AAS', "application/x-authorware-seg", -'AAB', "application/x-authorware-bin", -'VMD', "application/vocaltec-media-desc", -'VMF', "application/vocaltec-media-file", -'ASD', "application/astound", -'ASN', "application/astound", -'DWG', "application/autocad", -'DSP', "application/dsptype", -'DFX', "application/dsptype", -'EVY', "application/envoy", -'SPL', "application/futuresplash", -'IMD', "application/immedia", -'HQX', "application/mac-binhex40", -'CPT', "application/mac-compactpro", -'DOC', "application/msword", -'ODA', "application/oda", -'PDF', "application/pdf", -'AI', "application/postscript", -'EPS', "application/postscript", -'PS', "application/postscript", -'PPT', "application/powerpoint", -'RTF', "application/rtf", -'APM', "application/studiom", -'XAR', "application/vnd.xara", -'ANO', "application/x-annotator", -'ASP', "application/x-asap", -'CHAT', "application/x-chat", -'BCPIO', "application/x-bcpio", -'VCD', "application/x-cdlink", -'TGZ', "application/x-compressed", -'Z', "application/x-compress", -'CPIO', "application/x-cpio", -'PUZ', "application/x-crossword", -'CSH', "application/x-csh", -'DCR', "application/x-director", -'DIR', "application/x-director", -'DXR', "application/x-director", -'FGD', "application/x-director", -'DVI', "application/x-dvi", -'LIC', "application/x-enterlicense", -'EPB', "application/x-epublisher", -'FAXMGR', "application/x-fax-manager", -'FAXMGRJOB', "application/x-fax-manager-job", -'FM', "application/x-framemaker", -'FRAME', "application/x-framemaker", -'FRM', "application/x-framemaker", -'MAKER', "application/x-framemaker", -'GTAR', "application/x-gtar", -'GZ', "application/x-gzip", -'HDF', "application/x-hdf", -'INS', "application/x-insight", -'INSIGHT', "application/x-insight", -'INST', "application/x-install", -'IV', "application/x-inventor", -'JS', "application/x-javascript", -'SKP', "application/x-koan", -'SKD', "application/x-koan", -'SKT', "application/x-koan", -'SKM', "application/x-koan", -'LATEX', "application/x-latex", -'LICMGR', "application/x-licensemgr", -'MAIL', "application/x-mailfolder", -'MIF', "application/x-mailfolder", -'NC', "application/x-netcdf", -'CDF', "application/x-netcdf", -'SDS', "application/x-onlive", -'SGI-LPR', "application/x-sgi-lpr", -'SH', "application/x-sh", -'SHAR', "application/x-shar", -'SWF', "application/x-shockwave-flash", -'SPRITE', "application/x-sprite", -'SPR', "application/x-sprite", -'SIT', "application/x-stuffit", -'SV4CPIO', "application/x-sv4cpio", -'SV4CRC', "application/x-sv4crc", -'TAR', "application/x-tar", -'TARDIST', "application/x-tardist", -'TCL', "application/x-tcl", -'TEX', "application/x-tex", -'TEXINFO', "application/x-texinfo", -'TEXI', "application/x-texinfo", -'T', "application/x-troff", -'TR', "application/x-troff", -'TROFF', "application/x-troff", -'MAN', "application/x-troff-man", -'ME', "application/x-troff-me", -'MS', "application/x-troff-ms", -'TVM', "application/x-tvml", -'TVM', "application/x-tvml", -'USTAR', "application/x-ustar", -'SRC', "application/x-wais-source", -'WKZ', "application/x-wingz", -'ZIP', "application/x-zip-compressed", -'ZTARDIST', "application/x-ztardist", -#-------------------------------------