Commit Graph

211 Commits

Author SHA1 Message Date
Laurent Rineau 3c6640bf59 Merge pull request #1436 from lrineau/CGAL-new_cmake-GF
Renewal of CMake scripts: header-only, ctest, CMake>=3.1

# Conflicts:
#	Installation/config/testfiles/CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp
2017-12-05 18:20:05 +01:00
Laurent Rineau 21b9a2177d Do not use the CGAL-components syntax for GMP, MPFR, MPFI, and RS3 2017-11-23 17:06:46 +01:00
Sébastien Loriot 72cda50a5e fix incorrect LGPL version tags 2017-11-12 10:17:52 +01:00
Sébastien Loriot 0698f79aff add SPDX identifier for files under the LGPL-3+ license 2017-11-12 10:17:50 +01:00
Laurent Rineau 3e0ab881c1 Merge pull request #1584 from afabri/Installation-compute_dependencies-GF
Make Algebraic_kernel_d independent from CGAL/Arr_enum.h
2016-10-20 09:47:42 +02:00
Andreas Fabri b87b4a6031 Use Box_parameter_space_2 in the testprogram 2016-10-18 08:39:56 +02:00
Andreas Fabri 82d72949af what did I do 2016-10-13 10:36:17 +02:00
Andreas Fabri 21209d97b2 CGAL_USE_TYPE() to avoid warnings 2016-10-13 10:19:10 +02:00
Sébastien Loriot 7e2ee496de update project name of cmake scripts of tests 2016-09-08 00:26:37 +02:00
Andreas Fabri 1b0f79c870 #ifdef cyclic.cpp 2016-01-29 14:21:28 +01:00
Andreas Fabri 87f67d99df Add a reduced program that illustrates the cyclic leak 2016-01-27 17:25:36 +01:00
Laurent Rineau f9917c487e CMake 2.8.11 2015-07-13 12:36:43 +02:00
Sébastien Loriot d164633493 remove REQUIRED keyword 2015-07-07 11:23:46 +02:00
Laurent Rineau 36d8b5bd18 Convert source files encoding to utf-8
All non-ASCII files should be encoded in UTF-8. So far, the ZSH script
`Scripts/developer_scripts/detect_wrong_encoding` detects wrong encoding
in source/header files of include/, src/, and doc/.
2014-08-01 11:20:13 +02:00
Laurent Rineau a8ff620f3f Fix the remaining warnings on my platform
That was mostly "unused locally defined typedefs".
2014-04-01 14:50:51 +02:00
Laurent Rineau afc7b8f777 Fix warnings (unused local typedef) 2014-04-01 14:49:49 +02:00
Laurent Rineau 6330632723 Fix various warnings about unused variables/types 2014-01-10 13:25:23 +01:00
Laurent Rineau 972befcc01 Merge branch 'CGAL-fix_io_bad-lrineau'
Fix the uses of std::basic_ios::bad() across the whole CGAL code, and
use fail() instead.

Tested in CGAL-4.4-Ic-84.
2014-01-09 17:52:46 +01:00
Laurent Rineau 19ecf8e545 Trivial fix of a warning 2014-01-06 15:59:30 +01:00
Luis Peñaranda cad0a49f30 Revert "avoid more -Wall warnings in g++ 4.7"
This reverts commit ed04ff7c18. Basically,
I changed in the reverted commit the assert() by CGAL_assertion(), and
added some CGAL_assertion_code().
2014-01-03 10:53:46 -03:00
Luis Peñaranda 77da387fe5 Test correctly inexact coefficient types.
The algebraic structure tests are performed following the exactness of
the coefficient type (it was assumed before that the type was exact). If
it is inexact, the polynomial traits are not tested to avoid wrong
errors.
2014-01-01 11:40:24 -03:00
Luis Peñaranda 352b029aab fixed years-old bug in tests
The bug came from assuming that the bound type was exact. Now, the
algebraic structure of the bound type can be correctly tested.
2013-12-30 23:53:16 -03:00
Laurent Rineau 269ae1ca61 Fix the uses of std::basic_ios::bad(), and use fail() instead.
bad() implies fail() but std::basic_ios::operator! is actually equivalent
to std::basic_ios::fail(), not bad().

For example,
    std::ifstream is(argv[1]);
    if (is.bad()) {
is probably wrong because, in case the file does not exist, only the failbit it set,
and not the badbit.

Other example:
   double x;
   is >> x;
If the stream 'is' does not contains a string that can represent a double,
then failbit is set (and maybe the eofbit if the stream is actually too
short), but not the badbit.

bad() can be used, in case fail() returned true, to discriminate between a
I/O error and a logical error.

See:
  http://en.cppreference.com/w/cpp/io/basic_ios/operator_bool
  http://en.cppreference.com/w/cpp/io/ios_base/iostate
2013-12-12 16:13:40 +01:00
Luis Peñaranda 25718cf66b avoid some warnings with -Wunused-local-typedefs
also added the ability to log test time
2013-11-26 00:54:00 -02:00
Luis Peñaranda 112385eef0 added rational kernel
Given that the integer kernel works like a charm, I put the rational
one.
2013-11-23 02:44:59 -02:00
Luis Peñaranda ed04ff7c18 avoid more -Wall warnings in g++ 4.7 2013-11-23 01:12:25 -02:00
Luis Peñaranda dd5a60d1af avoid one more warning 2013-11-23 00:23:44 -02:00
Luis Peñaranda 7f47236d30 avoided some warnings with -Wunused-local-typedefs 2013-11-22 01:44:43 -02:00
Luis Peñaranda 1d81d04fb4 fixed test program, which made testsuite fail 2013-11-20 12:05:13 -02:00
Luis Peñaranda b9a3922f0f Revert "uncommented a test which did not pass in the past"
This reverts commit 3f08a80977.
2013-11-20 12:04:54 -02:00
Luis Peñaranda 3f08a80977 uncommented a test which did not pass in the past 2013-11-19 18:10:54 -02:00
Luis Peñaranda fa7e46cf13 updated main test and removed other obsolete tests 2013-11-19 16:11:59 -02:00
Laurent Rineau 75067bd072 Fix several I/O issues with Apple-clang-3.2 and its libc++ 2013-10-11 16:12:02 +02:00
Laurent Rineau 67a3824cec Change permissions of files created by Andreas 2013-10-04 16:57:11 +02:00
Andreas Fabri f37d2940b6 split one testcase as VC++ suffers from a combinatorial explosion 2013-09-25 15:04:35 +02:00
Sébastien Loriot 9fcf46e11a replace CGAL_[kernel/qpe/triangulation/]_assertion by assert in tests
this should be the case, following our guidelines.

using:
find */test/* -name '*.[hc]*' | xargs sed -i 's/CGAL_assertion/assert/g'
2013-03-21 10:50:55 +01:00
Andreas Fabri 4bbc6ddd39 static_casts, switching to size_t, comparing a pointer with NULL to avoid warnings 2013-02-15 09:27:15 +01:00
Andreas Fabri 28b5b64347 no need for a variable for the exception 2013-02-12 19:17:36 +01:00
Laurent Rineau 51ea960be6 Fix warnings about unused types or variables. 2013-02-08 16:50:02 +01:00
Sébastien Loriot 82b2ebc865 apply the cpp0x namespace renaming in all files 2012-12-19 11:33:17 +01:00
Eric Berberich 177fa5f3ed reduce running time
at some point we need to allow expensive tests
2012-09-27 21:47:48 +00:00
Eric Berberich 6fe1a41fa3 for approximation there were too few tests and some were not correct
Alex and I improved the tests for approximation of algebraic reals:
- more polynomials (with small and large constant and quadratic coefficient)
- added a root really close to zero
- test all roots of polynomial
- added many precisions (including exotic ones)
Known issue: RS kernel has problem with prec = 8
2012-09-21 14:07:30 +00:00
Laurent Rineau 2db4effa7e CMake: Fix the handling of cmake_policy
That is a followup-to my commit last year:
  | ------------------------------------------------------------------------
  | r63198 | lrineau | 2011-04-28 19:45:22 +0200 (Thu, 28 Apr 2011) | 5 lines
  | 
  | Try to fix my last revision about cmake_policy, with CMake-2.6.x
  | 
  | CMake gives an error if one tries to use cmake_policy(VERSION x.y.z) if
  | x.y.z is greater than the current CMake version.
  | 
  | ------------------------------------------------------------------------

The following check:
  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
is useless just after a call to:
 cmake_minimum_required(VERSION 2.6.2)



The script used to fix that was:


#!/usr/bin/env perl

$replacement=<<'END';
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
  cmake_policy(VERSION 2.8.4)
else()
  cmake_policy(VERSION 2.6)
endif()
END

while(<>) {
    if(/if\("\${CMAKE_MAJOR_VERSION}.\${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6\)/) {
        while(<>) {
            if(/^endif\(\)/) {
                print "$replacement";
                while(<>) {
                    print;
                }
                exit 0
            }
        }
    }
    print;
}
2012-08-22 12:35:03 +00:00
Laurent Rineau acf789673e Bad ordering of MPFI and RS3: MPFI can be removed. 2012-08-02 10:32:33 +00:00
Eric Berberich 4a01a46f44 RS3 suffices
the problem was in handling of CGAL_UseRS(3).cmake
2012-07-05 18:32:25 +00:00
Eric Berberich f39a7b7658 use RS, too 2012-07-05 18:06:04 +00:00
Eric Berberich 230919c8d6 remove compiler warnings in tests 2012-07-05 09:50:20 +00:00
Eric Berberich b5a4e941fd the mandatory libs need an particular order, and we simplify with a macro 2012-06-29 09:24:19 +00:00
Eric Berberich 3fde316a6c added CGAL_ENABLE_PRECONFIG (the default value has to be determined) 2012-06-20 11:16:17 +00:00
Eric Berberich 832c6c02e7 merge from next; installation.tex got major changes 2012-01-23 13:54:58 +00:00
Eric Berberich 0bfb5e8afb fixed 2012-01-11 01:51:45 +00:00
Eric Berberich 66bc1cef1e merge from next 2012-01-09 12:42:00 +00:00
Sébastien Loriot 91a5327fa8 change LGPLv2 -> LGPLv3 2011-10-10 13:48:25 +00:00
Guillaume Damiand a29c905ee0 Replace BOOST_STATIC_ASSERT by CGAL_static_assertion. 2011-08-31 14:30:07 +00:00
Laurent Rineau 369498d1e5 Cancel revision 64607. There had been a problem with the branch.
| ------------------------------------------------------------------------
  | r64607 | efif | 2011-07-05 17:27:04 +0200 (Tue, 05 Jul 2011) | 1 line
  | 
  | Merged feature-branch Aos_2-new_functors-tau into next
  | ------------------------------------------------------------------------
2011-07-06 11:11:58 +00:00
Laurent Rineau 92684e10a0 Modify the CMakeLists.txt so that the test result is blue without RS. 2011-06-09 10:54:57 +00:00
Laurent Rineau 3c02e07b23 Try to fix my last revision about cmake_policy, with CMake-2.6.x
CMake gives an error if one tries to use cmake_policy(VERSION x.y.z) if
x.y.z is greater than the current CMake version.
2011-04-28 17:45:22 +00:00
Laurent Rineau c97205f085 Global handling of CMake policies (second part)
We declare 
  cmake_minimum_required(VERSION 2.6.2)
but we also use
  cmake_policy(VERSION 2.8.4)
to declare that our CMake scripts are OK with all the defaults of CMake policies
as of CMake-2.8.4. That shuts down the warnings of CMake-2.8.4.

That way, we no longer need any declaration of specific policies.

Those two lines must be present and maintained in all our CMakeLists.txt
files (the one for the libraries, and also the one for examples and demos,
and maybe tests).
2011-04-28 10:55:56 +00:00
Laurent Rineau 0631943153 Uniform capitalization in our CMake script: use lowercase for commands 2011-04-28 10:36:18 +00:00
Laurent Rineau ca5c92e034 Global maintenance of CMakeLists.txt: CMake minimal version is -2.6.2
The documentation of CGAL says that the minimal version of CMake must be
CMake-2.6.2.
  - change cmake_minimum_required to VERSION 2.6.2
  - no longer any need for the policy CMP0003 (was for 2.4.x)
  - no longer any need for CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS (was for 2.4)
2011-04-27 17:58:27 +00:00
Luis Peñaranda 021dba06ed separated isolator from the rest of the algebraic kernel 2011-04-14 14:18:31 +00:00
Eric Berberich f6b14f653c fixed accuracy issue for non-exact bound types 2011-04-13 15:38:57 +00:00
Eric Berberich 4abf752d83 added rs_isolator 2011-04-13 13:44:14 +00:00
Luis Peñaranda 55e074e55f added RS-based univariate isolator 2011-04-13 13:05:45 +00:00
Eric Berberich 7137d242cd removed weird includes 2011-04-08 23:11:41 +00:00
Luis Peñaranda 0aae365f09 updated my mail address 2011-03-22 10:11:01 +00:00
Michael Kerber f84868f7b1 Merged candidate package into trunk 2010-06-28 16:40:05 +00:00
Luis Peñaranda 5c19b80354 updated i/o test and removed old files 2010-04-01 11:27:49 +00:00
Luis Peñaranda 3c8e884480 updated test programs 2010-04-01 11:26:15 +00:00
Luis Peñaranda 3b4006f577 removed old test files and protected the rest from compiling when RS is not
present by means of #ifdef's
2010-03-31 12:52:26 +00:00
Luis Peñaranda 74769da2dd copied the full AK_RS tests from the candidates branch 2010-03-31 12:47:13 +00:00
Luis Peñaranda 10e1624178 -added support for the new version of RS
-fixed some minor bugs
-now the kernel uses directly the extremely fast RS refinement function
-updated the generic kernel tests accordingly
2009-12-19 23:49:05 +00:00
Luis Peñaranda fde525e773 corrected constness, fixed minor bugs and added generic tests (it remains
to test the algebraic_1 explicit interoperability)
2009-12-15 14:18:22 +00:00
Luis Peñaranda 0d85ad4c49 adapted tests and examples to the new cmake scripts that detect and
configure RS
2009-12-11 11:22:11 +00:00
Luis Peñaranda 52a5f417d1 moved Algebraic_kernel_d to the trunk 2009-12-10 15:53:43 +00:00
Michael Hemmer aa4dcf9b6f moved Algebraic_kernel_d to experimental 2009-06-29 15:13:59 +00:00
Michael Hemmer d3a60789b8 fix names of functor_name_object member functions 2009-06-29 07:38:45 +00:00
Michael Hemmer b1ade2c201 test for Real_embeddable_extension
so far for Integer and Bigfloat
2009-04-27 14:31:50 +00:00
Michael Hemmer 5515409d0b add include of Sqrt_extension.h since it is used 2009-04-27 12:46:11 +00:00
Michael Hemmer ad7600a0ce mv to experimental package 2009-04-23 13:09:22 +00:00
Eric Berberich f83707f601 move to exp branch 2009-02-10 13:44:25 +00:00
Sylvain Pion 35ccbe2d49 Remove svn:executable property on *.dat *.cpp *.nix files 2009-01-03 13:36:50 +00:00
Sylvain Pion fbd55f6da0 Remove svn:executable property on *.h files 2009-01-03 13:33:23 +00:00
Michael Kerber cb2fe127ab Solve_2 now also handles vertical lines 2008-10-28 09:13:03 +00:00
Eric Berberich b33fb37345 improved coding 2008-10-21 16:32:14 +00:00
Eric Berberich 8d313efb5a added test for new functor 2008-10-21 12:58:18 +00:00
Eric Berberich f0ff8f2a53 added test for algebraic surface 2008-10-07 14:51:59 +00:00
Michael Kerber 9327968428 Uses Polynomial_type_generator and Polynomial-rebinds now 2008-09-23 14:26:13 +00:00
Michael Hemmer f3408d8958 rename RET::Sign RET::Sgn
rename PT::Derivative PT::Differentiate
2008-09-18 16:17:16 +00:00
Michael Hemmer 3374faacba adopted changes to Bitstream Descartes 2008-09-05 08:24:07 +00:00
Michael Hemmer c19132f8ae test more types 2008-08-19 09:47:07 +00:00
Michael Kerber 4ae7324780 Minor corrections to make the tests and demos work 2008-08-13 15:16:46 +00:00
Michael Kerber 16d1dfd610 Added tests from Bitstream_descartes_bfs into Bitstream_descartes 2008-08-13 14:21:03 +00:00
Michael Kerber a25b4cd452 removed some Bitstream-variants that are no longer in use 2008-08-13 14:03:20 +00:00
Michael Kerber 1c7a01a792 Adapted tests 2008-08-13 11:01:44 +00:00
Michael Kerber 0fd3d55d22 Moved files from directory Bitstream_descartes_at_x into main direcory of Algebraci_curve_kernel 2008-08-13 10:50:03 +00:00
Michael Kerber 828837247a Bitstream_descartes_bfs renamed to Bitstream_descartes, replaces Bitstream_descartes in Algebraic_kernel_d subfolder 2008-08-12 16:29:01 +00:00
Michael Hemmer 1360cb9e0e square_free_factorization -> square_free_factorize
----------
added Joachim von zur Gathen and J\"urgen Gerhard, 
Modern Computer Algebra, Cambridge University Press, 1999
2008-08-08 09:00:24 +00:00
Michael Hemmer 54b431ecee relaxed test due to use of quadratic refinement 2008-08-08 08:04:26 +00:00
Michael Hemmer db2d2744b7 wrap up 2008-08-07 08:15:50 +00:00