Commit Graph

129 Commits

Author SHA1 Message Date
Maxime Gimeno 1a76a04931 Add a macro to customize deprecation warnings. 2016-06-02 15:45:20 +02:00
Sebastien Loriot 6c88ccaeab Merge pull request #663 from afabri/CGAL-rename_cfg-GF
Fix macro name
2016-01-25 08:45:38 +01:00
Sébastien Loriot 551b3fa24d Merge remote-tracking branch 'cgal/releases/CGAL-4.7-branch' into HEAD 2016-01-25 08:29:55 +01:00
Laurent Rineau 235b601b73 Fix a bug in Boost.Config<1.57 with gcc>=5.0
`BOOST_HAS_VARIADIC_TMPL` and `BOOST_NO_CXX11_VARIADIC_TEMPLATES` can be
wrong, with Boost-1.57 and gcc>=5.0.

Fixes the following warnings with gcc>=5.0 in C++98 mode:
> CGAL-4.8-Ic-106/include/CGAL/array.h:78:31: warning: variadic templates only available with -std=c++11 or -std=gnu++11
> template< typename T, typename... Args >
>                               ^
> CGAL-4.8-Ic-106/include/CGAL/array.h:80:28: warning: variadic templates only available with -std=c++11 or -std=gnu++11
> cpp11::array< T, 1 + sizeof...(Args) >
>                            ^
> CGAL-4.8-Ic-106/include/CGAL/array.h:81:42: warning: variadic templates only available with -std=c++11 or -std=gnu++11
>  make_array(const T & t, const Args & ... args)
>                                           ^
2016-01-25 08:28:06 +01:00
Andreas Fabri 567f027484 Fix macro name 2016-01-21 11:32:48 +01:00
Sebastien Loriot 155dba5e96 Merge pull request #641 from lrineau/Installation-do_not_use_deprecated_macros_from_Boost_Config-lrineau
Boost.Config: check both deprecated name and new names (Boost>=1.50)
2016-01-21 09:25:57 +01:00
Sebastien Loriot a5ab3281d5 Merge pull request #642 from lrineau/Install-add_CGAL_CAN_USE_CXX11_ATOMIC-lrineau
Add <CGAL/atomic.h> and CGAL_CAN_USE_CXX11_ATOMIC
2016-01-21 09:25:39 +01:00
Laurent Rineau a32ba4b0af Boost.Config>=1.56 defines BOOST_NO_CXX11_HDR_ATOMIC 2016-01-15 18:46:46 +01:00
Laurent Rineau 68c6941cbb Add <CGAL/atomic.h> and CGAL_CAN_USE_CXX11_ATOMIC
- Change the way the macros `CGAL_CAN_USE_CXX11_THREAD_LOCAL` and
  `CGAL_CAN_USE_CXX11_MUTEX` are defined, so that other compilers are
  also supported.

- Add the macro `CGAL_CAN_USE_CXX11_ATOMIC` and the header
  `<CGAL/atomic.h>`.
2016-01-15 18:26:44 +01:00
Laurent Rineau 65cad196df Check both deprecated name and new names (Boost>=1.50)
The deprecated names may be removed from future versions of Boost, and
we do not want our C++11 support be dropped for users using newest
versions of Boost.
2016-01-15 17:47:45 +01:00
Sebastien Loriot 4e9448cb9e Merge pull request #451 from GilesBathgate/throwing-destructors
Introduces a CGAL_destructor_assertion macro.
2016-01-14 14:08:10 +01:00
Giles Bathgate f0ac236713 Introduces a GCAL_NO_ASSERTIONS_BOOL macro
This macro is always defined. Its value will be true when assertions are defined
and false when assertions are not defined. This macro can then be used in place
of a true false constant, such as is needed for CGAL_NOEXCEPT.
2016-01-08 20:31:59 +00:00
Sebastien Loriot 2b49997c7e Merge pull request #493 from afabri/CGLAL-thread_local_storage-GF
Remove boost thread dependency
2016-01-04 16:49:26 +01:00
Giles Bathgate ab7b34846e Use boost detection of CXX11 noexcept keyword.
BOOST_NO_NOEXCEPT and BOOST_NO_CXX11_NOEXCEPT provide a more
convenient way of determining whether the CXX11 noexcept keyword
is available.

See: http://www.boost.org/doc/libs/1_50_0/libs/config/doc/html/boost_config/boost_macro_reference.html
2015-12-10 10:54:36 +00:00
Andreas Fabri dd17f1ad5d Set BOOST_PARAMETER_MAX_ARITY to the needed value in the concerned packages 2015-12-01 17:05:53 +01:00
Sebastien Loriot b5546cb802 Merge pull request #486 from lrineau/Installation-visual_leak_detector-lrineau
Enable the use of Visual Leak Detector in CGAL
2015-11-26 14:30:14 +01:00
Giles Bathgate 3a725499ad Introduces CGAL_NOEXCEPT macro.
This macro is available for future compatibility with c++11, which
by default marks destructors noexcept(true). Some destructors
in CGAL do throw exceptions an so should be marked noexcept(false).
Since noexcept is not available in c++0x and below the macro is
disabled when CGAL_CXX11 is not defined since it is not required.
2015-11-23 16:47:59 +00:00
Andreas Fabri 2ce8b07ec0 Define BOOST_PARAMETER_MAX_ARITY in <CGAL/config.h>
This macro has to be larger than the default value
and it must be set before including <boost/parameter.hpp>

Instead of setting it to 12 in the packages that
need it, we do this in <CGAL/config.h> and produce
an error if a user has set it to a value < 12
2015-11-16 11:21:31 +01:00
Andreas Fabri 6b2c4dd7c6 Merge branch 'CGLAL-thread_local_storage-GF-old' into CGLAL-thread_local_storage-GF 2015-11-09 14:26:42 +01:00
Volodymyr Boichentsov f06bea8d8d fixed boost endianness check 2015-10-09 09:26:00 +01:00
Volodymyr Boichentsov 64cceb7bb4 revert back arch's define check 2015-10-08 07:26:09 +01:00
Volodymyr Boichentsov ee8d3d7fa3 added endianness check with boost
added few more arch's
added include for `<OpenGLES/ES2/gl.h>` header for ios
2015-10-07 22:43:08 +01:00
Andreas Fabri ca54af03c2 Use <mutex> starting with Visual 2012 and g++ 4.8 with std=c++11 2015-10-05 12:19:13 +02:00
Andreas Fabri a14cf913e9 WIP: In Lazy.h we now have a single macro for boost and c++11 thread 2015-09-11 14:54:11 +02:00
Andreas Fabri aa649eccc9 bug fix 2015-09-11 08:58:32 +02:00
Andreas Fabri 434e66a0f1 move detection of that the keyword threadlocal can be used from Mpzf.h to config.h 2015-09-10 12:44:52 +02:00
Andreas Fabri bf975ead95 No longer forward declare struct std:hash 2015-08-23 14:30:54 +02:00
Andreas Fabri 5db9675db8 Add #defines to trick moc 2015-01-19 17:54:26 +01:00
Jane Tournois 6b6af12353 fix the BOOST_JOIN parse error in demos
somehow, boost/random.hpp includes boost/type_traits/has_binary_operator.hpp,
and the "parse error" happens in this file (as said in the bug report)

Also update the link to the official Qt bug report
2014-12-11 12:17:44 +01:00
Andreas Fabri 9b0a59972f Support for LEDA_numbers on Windows
trivial fix for master (and approved by the Release Manager)
2014-08-07 14:16:38 +02:00
Laurent Rineau 865eee70f7 Support LEDA with thread-support
If one use a library of LEDA that support threads, without setting
LEDA_MULTI_THREAD, then one can get segfaults when creating new LEDA
objects.
2014-08-04 15:53:58 +02:00
Sébastien Loriot 2aadba50d7 Merge branch 'BGL-redesign_final-GF'
Introduces a redesign of the CGAL extension of the BGL API

Successfully tested in CGAL-4.5-Ic-90
Approved by the Release Manager

Conflicts:
	Surface_mesh_segmentation/test/Surface_mesh_segmentation/test_compute_sdf_values_and_segment_exact_rational.cpp
2014-07-08 19:45:16 +02:00
Andreas Fabri c726cedbbb As BOOST_NO_CXX11_RANGE_BASED_FOR has been introduced with Boost 1.51
we need a CGAL macro
2014-07-03 09:24:20 +02:00
Marc Glisse 897f585f12 Merge branch 'Kernel_d-rewrite-glisse-old' into Kernel_d-rewrite-glisse
Need the Interval_nt/long interoperability for Eigen.
2014-05-07 18:41:17 +02:00
Laurent Rineau cf5d6e041e Use pragmas to fix warnings 2014-04-10 20:06:04 +02:00
Marc Glisse 1241b2f14f Use boost::int128_type instead of __int128. This makes __extension__
useless, hence removed.
2014-03-13 17:06:43 +01:00
Marc Glisse b257e85427 Rework test for __int128 availability. 2014-03-13 16:50:22 +01:00
Marc Glisse 09f3db2025 define CGAL_CXX11. 2014-03-12 14:07:47 +01:00
Laurent Rineau d8c4aa09df Merge branch 'Number_types-sse2fabs-GF'
Use SSE2 to implement CGAL::abs(double), with MSVC.

Tested in CGAL-4.4-Ic-119.
2014-02-17 16:21:13 +01:00
Sébastien Loriot cae96035cb work around a bug of MSVC2013 for initializer lists
http://connect.microsoft.com/VisualStudio/feedback/details/792161/constructor-initializer-list-does-not-support-braced-init-list-form
2014-02-13 17:45:53 +01:00
Andreas Fabri fccd75b4c5 Use a more specific test for switching to SSE2 for fabs 2014-01-31 16:18:48 +01:00
Andreas Fabri c1f46dc382 As std::fabs is slow on Windows, we switch to an implementation using sse2.
This version is already in CGAL, but it is protected with an #ifdef
So this commit consists of a #define for VC++
2014-01-15 16:35:14 +01:00
Andreas Fabri 2860662f77 Merge branch 'Installation-visual_leak_detector-lrineauTMP' into Installation-visual_leak_detector-lrineau 2013-11-19 14:46:39 +01:00
Marc Glisse b53de35ff6 Work around Boost changing the name of their macros every other release.
Work around Microsoft defining min/max as macros.
2013-11-01 14:46:20 +01:00
Laurent Rineau 3ac5e524a2 Fix a trivial parsing bug in CGAL_assume
A warning of clang showed me my mistake:

In file included from /no-raid/home/lrineau/CGAL/CGAL-4.4-I-10/cmake/platforms/x86-64_Linux-Fedora18_llvm-clang-with-g++-4.7/test/Kinetic_data_structures/timings.cpp:14:
In file included from /no-raid/home/lrineau/CGAL/CGAL-4.4-I-10/include/CGAL/Kinetic/Delaunay_triangulation_3.h:32:
In file included from /no-raid/home/lrineau/CGAL/CGAL-4.4-I-10/include/CGAL/Delaunay_triangulation_3.h:31:
In file included from /no-raid/home/lrineau/CGAL/CGAL-4.4-I-10/include/CGAL/Triangulation_3.h:37:
/no-raid/home/lrineau/CGAL/CGAL-4.4-I-10/include/CGAL/Triangulation_data_structure_3.h:938:7: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
      CGAL_assume(index_v_in_n0 <= 1);
      ^                         ~~
/no-raid/home/lrineau/CGAL/CGAL-4.4-I-10/include/CGAL/assertions.h:86:29: note: expanded from macro 'CGAL_assume'
#    define CGAL_assume(EX) CGAL_ASSUME(EX)
                            ^
/no-raid/home/lrineau/CGAL/CGAL-4.4-I-10/include/CGAL/config.h:334:30: note: expanded from macro 'CGAL_ASSUME'
#  define CGAL_ASSUME(EX) if(!EX) { __builtin_unreachable(); }
                             ^
Trivial bug-fix.
2013-10-29 15:49:19 +01:00
Laurent Rineau ea6e24200c Allow the use of Visual Leak Detector
See the small feature [[Small features/Visual_Leak_Detector]] in CGAL
developers wiki:
  https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Visual_Leak_Detector

See also:
  http://vld.codeplex.com/
2013-09-11 12:25:01 +02:00
Laurent Rineau 1da90b4b8c Do not use __builtin_unreachable in strict-ansi mode 2013-03-19 17:18:12 +01:00
Laurent Rineau 220ddbf6b2 New macro CGAL_GCC_VERSION to help preprocessor conditionals on gcc version
And use it in <CGAL/refine_mesh_3.h>
2013-02-27 19:58:02 +01:00
Laurent Rineau 3f894697bc New macros CGAL_assume(EX) and CGAL_assume_code(CODE)
CGAL_assume(EX) is like CGAL_assertion, but is not disabled in release
mode. In debug mode, it is similar to CGAL_assertion(). In release mode, it
uses builtins of the compilateur, like the MSVC __assume or the g++/clang
__builtin_unreachable to give an hint to the compiler that some situation
in the code cannot happen.
2013-02-20 18:34:15 +01:00
Philipp Möller 1720fd845c No isfinite on MSVC
The advertisement is lying about what is implemented in cmath.
2013-02-15 10:48:23 +01:00