Changeset 2905


Ignore:
Timestamp:
Feb 5, 2010, 1:24:32 PM (15 years ago)
Author:
mloskot
Message:

Fixed CMake version comparison to disable platform.h (#317)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r2902 r2905  
    1414project(geos)
    1515cmake_minimum_required(VERSION 2.6)
     16
     17if(NOT CMAKE_VERSION)
     18    set(CMAKE_VERSION "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}")
     19endif()
    1620
    1721# Location of custom CMake modules with macros used by GEOS
     
    218222
    219223if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h)
    220   if (${CMAKE_VERSION} VERSION_LESS "2.8.0")
     224  message(STATUS "Disabling existing ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h")
     225
     226  if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
    221227    file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h)
     228    set(PH_RESULT "removed")
    222229  else()
    223230    file(RENAME
    224231      ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h
    225232      ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h.disabled)
    226   endif()
     233      set(PH_RESULT "renamed")
     234  endif()
     235
     236  message(STATUS "Disabling existing ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h - ${PH_RESULT}")
    227237endif()
    228238
     
    267277#################################################################################
    268278# DEBUG settings - TODO: make a summary
     279
     280message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
     281
    269282#message(STATUS "XXX: CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}")
    270283#message(STATUS "XXX: CMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}")
Note: See TracChangeset for help on using the changeset viewer.