diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index b02303fa6af..2674b63e66b 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -356,10 +356,10 @@ public: const OuterFunctor& outer) : _inner(inner), _outer(outer) {} - Unary_compose(const Unary_compose& other) - : _inner(other._inner), _outer(other._outer) {} + Unary_compose(const Unary_compose& other) = default; + Unary_compose& operator=(const Unary_compose& other) = default; - Unary_compose() : _inner(::boost::none),_outer(::boost::none) {} + Unary_compose() : _inner(::boost::none),_outer(::boost::none) {} typedef typename InnerFunctor::argument_type argument_type; typedef typename OuterFunctor::result_type result_type; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h index f1f45aab56c..974e26d0a57 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h @@ -1147,8 +1147,8 @@ public: Bitstream_descartes() : Base(new Rep()) {} //! Copy constructor - Bitstream_descartes(const Self& other) : Base(static_cast(other)) - {} + Bitstream_descartes(const Self& other) = default; + Bitstream_descartes& operator=(const Self& other) = default; /*! * \brief Constructor for a polynomial \c f diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h index d78d50acfd0..50ae06acee9 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h @@ -436,6 +436,9 @@ public: friend class CGAL::internal::Bitstream_descartes_E08_tree; friend class CGAL::internal::Bitstream_descartes_E08_tree_rep; + Bitstream_descartes_E08_node(const Self&) = default; + Self& operator= (const Self&) = delete; + private: // "node data" (set individually in subdivision) Integer lower_num_, upper_num_; // TODO use lower_num_, width_num_ instead @@ -466,8 +469,6 @@ private: log_eps_ = n.log_eps_; log_C_eps_ = n.log_C_eps_; } - - Self& operator= (const Self&) = delete; }; // struct Bitstream_descartes_E08_node diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index 869b758cb12..9d1084414cd 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -525,6 +525,9 @@ public: friend class internal::Bitstream_descartes_rndl_tree; friend class internal::Bitstream_descartes_rndl_tree_rep; + Bitstream_descartes_rndl_node(const Self&) = default; + Self& operator= (const Self&) = delete; + private: // "node data" (set individually in subdivision) Integer lower_num_, upper_num_; // TODO use lower_num_, width_num_ instead @@ -557,8 +560,6 @@ private: log_eps_ = n.log_eps_; log_C_eps_ = n.log_C_eps_; } - - Self& operator= (const Self&)=delete; }; // struct Bitstream_descartes_rndl_node diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 28ee5079fdb..aa09f590126 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -354,7 +354,7 @@ include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake) cgal_setup_module_path() -if(RUNNING_CGAL_AUTO_TEST) +if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) message(STATUS "Operating system:") execute_process( COMMAND uname -a @@ -392,7 +392,7 @@ if(MSVC) uniquely_add_flags(CGAL_CXX_FLAGS "/fp:except-") uniquely_add_flags(CGAL_CXX_FLAGS "/bigobj") # Use /bigobj by default - if(RUNNING_CGAL_AUTO_TEST) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) set(CMAKE_CXX_WARNING_LEVEL 2 CACHE STRING "MSVC C++ compiler warning level" FORCE) @@ -445,7 +445,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) if(GCC_FOUND) - if(RUNNING_CGAL_AUTO_TEST) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) uniquely_add_flags(CGAL_CXX_FLAGS "-Wall") # Remove -g from the relevant CMAKE_CXX_FLAGS. This will also # propagate to the rest of the tests, since we overwrite those @@ -482,7 +482,7 @@ message("== Generate version files (DONE) ==\n") # #-------------------------------------------------------------------------------------------------- -if(CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST) +if(CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) message("== Set up flags ==") # Ugly hack to be compatible with current CGAL testsuite process (as of @@ -1256,4 +1256,4 @@ if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) if(Qt5_FOUND) message(STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'") endif()#Qt5_FOUND -endif()#RUNNING_CGAL_AUTO_TEST +endif()#RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE diff --git a/Installation/cmake/modules/CGAL_Common.cmake b/Installation/cmake/modules/CGAL_Common.cmake index 92de4630099..ce99da6489e 100644 --- a/Installation/cmake/modules/CGAL_Common.cmake +++ b/Installation/cmake/modules/CGAL_Common.cmake @@ -4,7 +4,7 @@ option(CGAL_DEV_MODE "Activate the CGAL developers mode. See https://github.com/CGAL/cgal/wiki/CGAL_DEV_MODE" $ENV{CGAL_DEV_MODE}) -if(RUNNING_CGAL_AUTO_TEST) +if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) # Just to avoid a warning from CMake if that variable is set on the command line... endif() diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 59e846b89d2..827b8e3d11b 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -147,7 +147,7 @@ function(CGAL_setup_CGAL_dependencies target) "-features=extensions;-library=stlport4;-D_GNU_SOURCE") target_link_libraries(${target} INTERFACE "-library=stlport4") elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - if ( RUNNING_CGAL_AUTO_TEST ) + if ( RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) target_compile_options(${target} INTERFACE "-Wall") endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3) diff --git a/Installation/cmake/modules/CGAL_SetupFlags.cmake b/Installation/cmake/modules/CGAL_SetupFlags.cmake index 514ad5c58c8..3693e29724e 100644 --- a/Installation/cmake/modules/CGAL_SetupFlags.cmake +++ b/Installation/cmake/modules/CGAL_SetupFlags.cmake @@ -46,7 +46,7 @@ uniquely_add_flags( CMAKE_EXE_LINKER_FLAGS_DEBUG ${CGAL_EXE_LINKER_FLAGS_DE # Set a default build type if none is given if ( NOT CMAKE_BUILD_TYPE ) - if( RUNNING_CGAL_AUTO_TEST ) + if( RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Debug ) else () typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Release ) diff --git a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake index 5909d3fc525..9710c8dbd90 100644 --- a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake +++ b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake @@ -90,7 +90,7 @@ function(CGAL_run_at_the_end_of_configuration variable access value current_list if(DEFINED CMAKE_BUILD_TYPE AND ( NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "Debug") ) set(keyword WARNING) set(type warning) - if(RUNNING_CGAL_AUTO_TEST) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) # No warning in the CMake test suite, but a status message set(keyword) set(type notice) diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 4d44ca90219..43449b85e51 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -13,7 +13,7 @@ if(NOT USE_CGAL_FILE_INCLUDED) set(USE_CGAL_FILE_INCLUDED 1) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Common.cmake) - if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) + if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupFlags.cmake) else() include(${CMAKE_CURRENT_LIST_DIR}/CGAL_display_flags.cmake) diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index 6edefb1810f..6f72b2cc2e4 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -89,7 +89,7 @@ if (NOT CGAL_DATA_DIR) if (EXISTS "${CMAKE_SOURCE_DIR}/../../data") set(CGAL_DATA_DIR "${CMAKE_SOURCE_DIR}/../../data") else() - if(CGAL_TEST_SUITE) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) message(WARNING "CGAL_DATA_DIR cannot be deduced, set the variable CGAL_DATA_DIR to set the default value of CGAL::data_file_path()") endif() endif() @@ -195,7 +195,7 @@ cgal_setup_module_path() set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) include(${CGAL_MODULES_DIR}/CGAL_target_use_TBB.cmake) -if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) +if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) # Do not use -isystem for CGAL include paths set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) endif() diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h index b4b057ef2d0..59b5f208021 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h @@ -35,10 +35,8 @@ public: { } - AABB_segment_2_primitive(const AABB_segment_2_primitive &primitive) - { - m_it = primitive.id(); - } + AABB_segment_2_primitive(const AABB_segment_2_primitive& primitive) = default; + AABB_segment_2_primitive& operator=(const AABB_segment_2_primitive& primitive) = default; const Id &id() const { diff --git a/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h b/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h index 4a38ac41754..cef97636549 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h @@ -30,10 +30,8 @@ class SNC_SM_explorer : public SMCDEC { public: SNC_SM_explorer(const Base& E) : Base(E) {} - Self& operator=(const Self& E) { - Base::operator=(E); - return *this; - } + SNC_SM_explorer(const Self& E) = default; + Self& operator=(const Self& E) = default; }; } //namespace CGAL diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index 429941be991..fcc66c9ad6b 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -500,6 +500,7 @@ void FPU_set_cw (FPU_CW_t cw) { #ifdef CGAL_ALWAYS_ROUND_TO_NEAREST + CGAL_USE(cw); CGAL_assertion(cw == CGAL_FE_TONEAREST); #else CGAL_IA_SETFPCW(cw); @@ -511,6 +512,7 @@ FPU_CW_t FPU_get_and_set_cw (FPU_CW_t cw) { #ifdef CGAL_ALWAYS_ROUND_TO_NEAREST + CGAL_USE(cw); CGAL_assertion(cw == CGAL_FE_TONEAREST); return CGAL_FE_TONEAREST; #else diff --git a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h index fa78978a4dd..8887bc4164b 100644 --- a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h +++ b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h @@ -47,7 +47,8 @@ public: typedef typename Traits::Point_2 Point_2; using internal::vector< Rotation_tree_node_2 >::push_back; - using internal::vector< Rotation_tree_node_2 >::back; + using internal::vector< Rotation_tree_node_2 >::back; + using internal::vector< Rotation_tree_node_2 >::erase; class Greater { typename Traits::Less_xy_2 less; @@ -78,7 +79,7 @@ public: Greater greater (traits.less_xy_2_object()); Equal equal; std::sort(this->begin(), this->end(), greater); - std::unique(this->begin(), this->end(),equal); + this->erase(std::unique(this->begin(), this->end(),equal), this->end()); // front() is the point with the largest x coordinate diff --git a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt index f6b0e9c045b..db5531c9454 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt @@ -17,7 +17,7 @@ find_package( COMPONENTS OpenGL Script Svg OPTIONAL_COMPONENTS ScriptTools WebSockets) -if(RUNNING_CGAL_AUTO_TEST) +if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) if(Qt5_FOUND) include(${CGAL_USE_FILE}) endif() diff --git a/STL_Extension/include/CGAL/Handle.h b/STL_Extension/include/CGAL/Handle.h index 4fa3a17286b..07fb7748e21 100644 --- a/STL_Extension/include/CGAL/Handle.h +++ b/STL_Extension/include/CGAL/Handle.h @@ -122,7 +122,7 @@ class Handle int refs() const noexcept { return PTR->count.load(std::memory_order_relaxed); } - Id_type id() const noexcept { return PTR - static_cast(0); } + Id_type id() const noexcept { return std::distance(static_cast(0), PTR); } bool identical(const Handle& h) const noexcept { return PTR == h.PTR; } diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index e395ab3c76f..ea9a964c8a3 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1283,6 +1283,8 @@ template < typename D, typename V = std::tuple<>, typename O = std::tuple<> > struct Derivator { typedef Derivator Self; + Derivator() = default; + Derivator(const Self&) = default; Self& operator=(const Self&) = delete; template void tuple_dispatch(const Tuple&) @@ -1296,6 +1298,8 @@ struct Derivator, std::tuple > typedef Derivator, std::tuple > Self; typedef Derivator, std::tuple > Base; + Derivator() = default; + Derivator(const Self&) = default; Self& operator=(const Self&) = delete; using Base::operator=; diff --git a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt index c59acf0e24a..782b87fd820 100644 --- a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Set_movable_separability_2_Tests) -if(RUNNING_CGAL_AUTO_TEST) +if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) # Just to avoid a warning from CMake when that variable is set on the command line... endif() if(CGAL_DIR) diff --git a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt index aab8a082853..6f74259ab17 100644 --- a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt @@ -11,7 +11,7 @@ if(CGAL_ImageIO_FOUND) create_single_source_cgal_program("mesh_an_implicit_function.cpp") else() - if(RUNNING_CGAL_AUTO_TEST) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) # Just to avoid a warning from CMake if that variable is set on the command line... endif() diff --git a/Three/doc/Three/Three.txt b/Three/doc/Three/Three.txt index dc4baa546c4..82f85f40736 100644 --- a/Three/doc/Three/Three.txt +++ b/Three/doc/Three/Three.txt @@ -392,7 +392,7 @@ Notice that an external plugin will not be automatically loaded in the Polyhedro \section example Examples -All the examples are de-activated in the cmake list outside of our testsuite. To tesr them, one must add `-DRUNNING_CGAL_AUTO_TEST=ON` to the cmake call. +All the examples are de-activated in the cmake list outside of our testsuite. To test them, one must add `-DCGAL_TEST_SUITE=ON` to the cmake call. \subsection example1 Creating a Basic Plugin \cgalExample{Three_examples/Basic_plugin.cpp}