From a429b26316502a97c80ea6c8a0b552e31f936fe3 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 19 Mar 2012 14:26:17 +0000 Subject: [PATCH] Cherry-pick that revision from /branches/features/Mesh_3-parallel-cjamin/ | ------------------------------------------------------------------------ | r68020 | cjamin | 2012-03-12 18:27:30 +0100 (Mon, 12 Mar 2012) | 1 line | | To be able to build CGAL on MSVC11 | ------------------------------------------------------------------------ It adapts CGAL CMake scripts and CGAL auto-link headers to MSVC2011. Thanks to Clement Jamin, from Inria, for the patch. --- .../cmake/modules/CGAL_GeneratorSpecificSettings.cmake | 5 ++++- Installation/cmake/modules/FindBoost.cmake | 4 +++- Installation/include/CGAL/auto_link/auto_link.h | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake b/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake index 1c859fc9f1e..2fa0169d5b9 100644 --- a/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake +++ b/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake @@ -8,7 +8,10 @@ if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED ) set(CGAL_AUTO_LINK_ENABLED TRUE) endif() - if ( MSVC10 ) + if ( MSVC11 ) + set(CGAL_TOOLSET "vc110") + message( STATUS "Using VC11 compiler." ) + elseif ( MSVC10 ) set(CGAL_TOOLSET "vc100") message( STATUS "Using VC10 compiler." ) elseif ( MSVC90 ) diff --git a/Installation/cmake/modules/FindBoost.cmake b/Installation/cmake/modules/FindBoost.cmake index fbdde88c8ab..7ae9e373ca0 100644 --- a/Installation/cmake/modules/FindBoost.cmake +++ b/Installation/cmake/modules/FindBoost.cmake @@ -566,7 +566,9 @@ ELSE (_boost_IN_CACHE) # NOTE: this is not perfect yet, if you experience any issues # please report them and use the Boost_COMPILER variable # to work around the problems. - if (MSVC10) + if (MSVC11) + SET (_boost_COMPILER "-vc110") + elseif (MSVC10) SET (_boost_COMPILER "-vc100") elseif (MSVC90) SET (_boost_COMPILER "-vc90") diff --git a/Installation/include/CGAL/auto_link/auto_link.h b/Installation/include/CGAL/auto_link/auto_link.h index bf9d33889e9..cb98f6a38e7 100644 --- a/Installation/include/CGAL/auto_link/auto_link.h +++ b/Installation/include/CGAL/auto_link/auto_link.h @@ -155,11 +155,16 @@ CGAL_VERSION: Defined in // vc90: # define CGAL_LIB_TOOLSET "vc90" -#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1600) +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1600) // vc10: # define CGAL_LIB_TOOLSET "vc100" +#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) + + // vc11: +# define CGAL_LIB_TOOLSET "vc110" + #elif defined(__BORLANDC__) // CBuilder 6: