Disable CGAL_Core if void* is size 8 (ie 64 bits).

This commit is contained in:
Laurent Rineau 2010-03-19 14:15:25 +00:00
parent 0e76060908
commit 0bda1d5591
3 changed files with 16 additions and 8 deletions

View File

@ -4,6 +4,10 @@ Release notes of CGAL.
CGAL 3.7 offers the following improvements and new functionality :
x General
- The configuration of CGAL libraries now requires CMake>=2.6.
x Triangulations and Delaunay Triangulations
x.y 2D Triangulations

View File

@ -5,7 +5,7 @@
# ${CMAKE_BINARY_DIR} or ${CMAKE_BINARY_DIR}.
project(CGAL)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
# This allows else(), endif(), etc... (without repeating the expression)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
@ -273,6 +273,17 @@ add_config_flag( CGAL_USE_MPFR )
add_config_flag( CGAL_USE_GMPXX )
add_config_flag( CGAL_USE_LEDA )
# Disable CORE if the architecture is 64 bits.
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
message(STATUS "Detected 64bit architecture, disable CGAL_Core")
set(CGAL_USE_CORE 0)
set(CGAL_NO_CORE ON)
else()
set(CGAL_USE_CORE ${CGAL_USE_GMP})
endif()
add_config_flag( CGAL_USE_CORE )
if ( RUNNING_CGAL_AUTO_TEST AND MSVC )
file( APPEND "${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h" "#include <CGAL/Testsuite/vc_debug_hook.h>\n\n" )
endif()

View File

@ -188,13 +188,6 @@ using std::min;
using std::max;
#endif
//-------------------------------------------------------------------//
// Is CORE usable ?
#ifdef CGAL_USE_GMP
# define CGAL_USE_CORE CGAL_USE_GMP
#endif
//-------------------------------------------------------------------//
// Is Geomview usable ?
#if !defined(_MSC_VER) && !defined(__MINGW32__)