Changeset 19779


Ignore:
Timestamp:
10/24/19 13:39:20 (5 years ago)
Author:
tbretz
Message:
Enforce at least cmake 3.0 (cmake 2.8.12 fails), gcc 4.4.7 (known to work on SL6.10 if root compiles with it) and clang 3.8 (known to work in Ubuntu 16.04 if root compiles with it)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/CMakeLists.txt

    r19777 r19779  
    22# ************ cmake **************
    33# *********************************
    4 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
     4CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR)
    55CMAKE_POLICY(SET CMP0043 NEW)
    66CMAKE_POLICY(SET CMP0048 NEW)
     
    2929#CHECK_TYPE_SIZE("int"   SIZEOF_INT)
    3030
    31 
    32 
    3331# *********************************
    3432# ************ Project ************
     
    4240
    4341INCLUDE(GNUInstallDirs)
     42
     43IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     44    IF (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4.7 OR
     45        CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4.7)
     46        MESSAGE(FATAL_ERROR "gcc/g++: at least version 4.4.7 required!")
     47    ENDIF()
     48ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     49    IF (CMAKE_C_COMPILER_VERSION VERSION_LESS 3.8 OR
     50        CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8)
     51        MESSAGE(FATAL_ERROR "clang/clang++: at least version 3.8 required!")
     52    ENDIF()
     53ELSE()
     54    MESSAGE(WARNING "You are using an unsupported compiler! Compilation has only been tested only with clang and GCC.")
     55ENDIF()
    4456
    4557# ======== For config.h.in =========
Note: See TracChangeset for help on using the changeset viewer.