Commit Graph

34 Commits

Author SHA1 Message Date
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 88ef561715 Fix the call to Q_INIT_RESOURCE
For resources that are shipped by the CGAL_Qt4 library, one need to call
CGAL_QT4_INIT_RESOURCES, a macro that calls CGAL_Qt4_init_resources
(exported by the CGAL_Qt4 DLL)
2011-10-11 09:51:29 +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 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
Andreas Fabri cfc69020a5 const QString& -> QString 2010-08-23 10:37:11 +00:00
Andreas Fabri 76eac30b99 Add static_cast 2010-06-25 07:39:10 +00:00
Sébastien Loriot 63ca9795b3 move missing file
rm void directory
2010-05-20 16:32:36 +00:00
Andreas Fabri 84f71661c9 step N for moving the 3D Alpha Shape demo 2010-04-08 16:04:44 +00:00
Andreas Fabri 2a30ec09c7 step N-1 for moving the 3D Alpha Shape demo 2010-04-08 16:03:16 +00:00
Andreas Fabri 082667ba2c Get the old demo out of the way 2010-04-08 15:58:15 +00:00
Andreas Fabri 3ca3002436 Renamed data files so that they can be read by the demo 2008-12-15 15:06:33 +00:00
Laurent Rineau f10a590672 Mass-remove vcproj files. 2008-10-21 09:21:22 +00:00
Laurent Rineau fc6a3d9990 Remove that CMakeLists.txt. The auto-generated one will be sufficient. 2008-10-02 08:37:04 +00:00
Andreas Fabri 6188beb113 remove alpha_shapes_3 2008-09-29 19:00:19 +00:00
Laurent Rineau a5941f81cf Alpha_shapes_3/demo needs a submitted/commited CMakeLists.txt. 2008-06-30 11:29:53 +00:00
Fernando Cacciola f93437ca22 Removed *unmodified* auto-generated CMakeLists.txt (now created by create_internal_release) 2008-05-05 14:01:55 +00:00
Fernando Cacciola b704509dcf Examples/Demos/Test CMake scripts updated 2008-03-05 21:14:02 +00:00
Fernando Cacciola a659cd852a Added project() and conditional test for CGAL_DIR 2008-02-14 15:42:36 +00:00
Fernando Cacciola 14043c43a0 Replaced CGALROOT by CGAL_DIR (the latters is used by CMake automatically) 2008-02-08 17:47:21 +00:00
Fernando Cacciola afddfc4fca CMake scripts for demos/examples/test added 2008-02-06 19:06:24 +00:00
Andreas Fabri ea71b8eaa1 .C ->.cpp and autolinking 2007-04-11 13:59:20 +00:00
Joachim Reichel 704933f79a replace obsolete variable CGAL_WINDOW_LDFLAGS by CGAL_LDFLAGS 2007-03-11 09:57:31 +00:00
Sylvain Pion b2630cd7e1 Apply trailing whites-spaces and leadgin+trailing empty-lines cleanups
to demo/**/*.h and .cpp.
2007-03-10 16:55:12 +00:00
Andreas Fabri 083c2b007b changed .C to .cpp in examples 2006-07-09 19:01:37 +00:00
Sylvain Pion 5f8d18ffd4 Uniformize '# CGAL_MAKEFILE' line. 2006-05-20 07:52:02 +00:00
Laurent Saboret e42659d1a4 Fixed svn:executable, svn:keywords and svn:eol-style properties of the whole trunk 2006-05-04 09:15:26 +00:00
Andreas Fabri cdf3a90818 upgrade to VC7.3 and fixes 2006-04-26 20:47:38 +00:00
Joachim Reichel 7a2fec4821 renamed {demo,examples}/Makefile to {demo,examples}/makefile to avoid
being matched by "Makefile" in dont_submit
2006-03-17 18:00:59 +00:00
Sylvain Pion 51545d677b - Rename Data/ directories to data/ for homogeneity. 2006-03-11 22:21:10 +00:00
Andreas Fabri d3c9bf2e4a Changed names of examples and demos 2006-03-09 09:56:28 +00:00
Laurent Saboret db6a8f948c Change CVS keywords to SVN style 2006-02-16 14:30:13 +00:00
Laurent Saboret 1aad55d4cb Change CVS keywords to SVN style 2006-02-14 10:08:15 +00:00
Laurent Saboret f95e742de3 Move packages to trunk root 2006-02-14 08:58:13 +00:00