Ignore:
Timestamp:
Sep 1, 2014, 1:11:04 AM (5 years ago)
Author:
linmengl
Message:

auto detect LLVM version in CMakeList.txt; add #ifdef blocks

File:
1 edited

Legend:

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

    r4096 r4118  
    3838llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES mcjit native)
    3939
     40message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
    4041
    4142add_library(PabloADT pe_advance.cpp  pe_all.cpp  pe_and.cpp pe_call.cpp pe_charclass.cpp  pe_matchstar.cpp pe_scanthru.cpp pe_not.cpp  pe_or.cpp  pe_pabloe.cpp  pe_sel.cpp  pe_var.cpp  pe_xor.cpp ps_assign.cpp  ps_if.cpp  ps_pablos.cpp  ps_while.cpp printer_pablos.cpp)
     
    5859set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++0x -O3 -msse2")
    5960
     61# detect LLVM version and add compiler flags.
     62if (${LLVM_PACKAGE_VERSION} MATCHES "3.4")
     63  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DUSE_LLVM_3_4")
     64elseif (${LLVM_PACKAGE_VERSION} MATCHES "3.5")
     65  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DUSE_LLVM_3_5")
     66endif(${LLVM_PACKAGE_VERSION} MATCHES "3.4")
     67
    6068add_test(
    6169  NAME greptest
Note: See TracChangeset for help on using the changeset viewer.