Commit Graph

128 Commits

Author SHA1 Message Date
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