From 0bda1d5591d19dca9120f6e69fd2e25087b5b0f6 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 19 Mar 2010 14:15:25 +0000 Subject: [PATCH] Disable CGAL_Core if void* is size 8 (ie 64 bits). --- Installation/CHANGES | 4 ++++ Installation/CMakeLists.txt | 13 ++++++++++++- Installation/include/CGAL/config.h | 7 ------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Installation/CHANGES b/Installation/CHANGES index f64f25623db..6efc7475263 100644 --- a/Installation/CHANGES +++ b/Installation/CHANGES @@ -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 diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 069a3eea522..a4703a381a5 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -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 \n\n" ) endif() diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 424714b072f..378a3a73ca0 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -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__)