Changeset 19790


Ignore:
Timestamp:
10/24/19 20:41:51 (5 years ago)
Author:
tbretz
Message:
Compatibility down to cmake 3.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/CMakeLists.txt

    r19783 r19790  
    22# ************ cmake **************
    33# *********************************
    4 CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR)
     4CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR)
    55CMAKE_POLICY(SET CMP0043 NEW)
    66CMAKE_POLICY(SET CMP0048 NEW)
     7
     8# TARGET_SOURCES requires v3.1
    79
    810# Enable debug symbols by default
     
    4850    ENDIF()
    4951ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    50     SET(CLANG_MIN 3.8)
    51     IF (CMAKE_C_COMPILER_VERSION VERSION_LESS 3.8 OR
    52         CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8)
     52    SET(CLANG_MIN 3.5)
     53    IF (CMAKE_C_COMPILER_VERSION VERSION_LESS CLANG_MIN OR
     54        CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_MIN)
    5355        MESSAGE(FATAL_ERROR "\n  clang/clang++ ${CLANG_MIN} or higher is required.\n  You are running version ${CMAKE_C_COMPILER_VERSION}/${CMAKE_CXX_COMPILER_VERSION}.")
    5456    ENDIF()
     
    235237#      ^~~~~~~~~~~~~~~
    236238
    237 IF(ROOT_VERSION VERSION_GREATER_EQUAL 6.18 AND ROOT_VERSION VERSION_LESS 6.19)
     239IF(NOT ROOT_VERSION VERSION_LESS 6.18 AND ROOT_VERSION VERSION_LESS 6.19)
    238240   SET(CMAKE_CXX_FLAGS
    239241       "${CMAKE_CXX_FLAGS} -Wno-cast-align")
Note: See TracChangeset for help on using the changeset viewer.