CGAL_GeneratorSpecificSettings.cmake 1.75 KB
Newer Older
1 2 3
if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED )
  set( CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED 1 )
 
Jan Möbius's avatar
Jan Möbius committed
4 5
  message( STATUS "Targetting ${CMAKE_GENERATOR}")
  
6
  if ( MSVC )
Jan Möbius's avatar
Jan Möbius committed
7
    message( STATUS "Target build enviroment supports auto-linking" )
8 9 10
    set(CGAL_AUTO_LINK_ENABLED TRUE)
  endif()

Jan Möbius's avatar
Jan Möbius committed
11 12 13 14 15 16 17
  if     ( MSVC15 )
    set(CGAL_TOOLSET "vc150")
    message( STATUS "Using VC15 compiler." )
  elseif ( MSVC14 )
    set(CGAL_TOOLSET "vc140")
    message( STATUS "Using VC14 compiler." )
  elseif ( MSVC12 )
18
    set(CGAL_TOOLSET "vc120")
Jan Möbius's avatar
Jan Möbius committed
19 20 21 22 23 24 25 26
    message( STATUS "Using VC12 compiler." )
  elseif ( MSVC11 )
    set(CGAL_TOOLSET "vc110")
    message( STATUS "Using VC11 compiler." )
  elseif ( MSVC10 )
    set(CGAL_TOOLSET "vc100")
    message( STATUS "Using VC10 compiler." )
  elseif ( MSVC90 )
27
    set(CGAL_TOOLSET "vc90")
Jan Möbius's avatar
Jan Möbius committed
28 29
    message( STATUS "Using VC90 compiler." )
  elseif ( MSVC80 )
30
    set(CGAL_TOOLSET "vc80")
Jan Möbius's avatar
Jan Möbius committed
31
    message( STATUS "Using VC80 compiler." )
32 33
  elseif ( MSVC71 )
    set(CGAL_TOOLSET "vc71")
Jan Möbius's avatar
Jan Möbius committed
34 35 36
    message( STATUS "Using VC71 compiler." )
  else()
    message( STATUS "Using ${CMAKE_CXX_COMPILER} compiler." )
37 38 39 40 41 42 43
  endif()

  
  # From james Bigler, in the cmake users list.
  IF (APPLE)
    exec_program(uname ARGS -v  OUTPUT_VARIABLE DARWIN_VERSION)
    string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
Jan Möbius's avatar
Jan Möbius committed
44
    message(STATUS "DARWIN_VERSION=${DARWIN_VERSION}")
45
    if (DARWIN_VERSION GREATER 8)
Jan Möbius's avatar
Jan Möbius committed
46
       message(STATUS "Mac Leopard detected")
47 48 49 50 51 52
      set(CGAL_APPLE_LEOPARD 1)
    endif()
  endif()
  
  if ( NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." )
    set(HAS_CFG_INTDIR TRUE CACHE INTERNAL "Generator uses intermediate configuration directory" )
Jan Möbius's avatar
Jan Möbius committed
53
    message( STATUS "Generator uses intermediate configuration directory: ${CMAKE_CFG_INTDIR}" )
54 55 56
  endif()

endif()