Ignore:
Timestamp:
Oct 17, 2016, 8:21:23 PM (3 years ago)
Author:
faldebey
Message:

Improved syntax for LLVM-3.6 and LLVM-3.7 macros

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/CMakeLists.txt

    r5185 r5196  
    182182
    183183# detect LLVM version and add compiler flags.
    184 IF (${LLVM_PACKAGE_VERSION} MATCHES "3.5")
    185   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LLVM_3_5")
     184SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_VERSION_major=${LLVM_VERSION_MAJOR} -DLLVM_VERSION_MINOR=${LLVM_VERSION_MINOR}")
     185IF (${LLVM_VERSION_MAJOR} EQUAL 3)
     186  IF (${LLVM_VERSION_MINOR} EQUAL 6)
     187    message(STATUS "Found LLVM ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
     188    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LLVM_3_6")
     189  ELSEIF (${LLVM_VERSION_MINOR} EQUAL 7)
     190    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LLVM_3_7")
     191  ENDIF()
    186192ENDIF()
    187193
Note: See TracChangeset for help on using the changeset viewer.