Ignore:
Timestamp:
Sep 8, 2016, 3:24:31 PM (3 years ago)
Author:
lindanl
Message:

Add NVPTX Arch to the framework. Fix directory bug in make check.

File:
1 edited

Legend:

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

    r5109 r5151  
    3939add_definitions( ${LLVM_DEFINITIONS} )
    4040
     41option(ENABLE_CUDA_COMPILE "Compiling with CUDA")
     42set(CUDA_LIB "")
     43if(ENABLE_CUDA_COMPILE)
     44  find_package(CUDA)
     45  if(CUDA_FOUND)
     46    set(CUDA_INCLUDE ${CUDA_INCLUDE} "/usr/local/cuda-7.5/include")
     47    include_directories(${CUDA_INCLUDE})
     48    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCUDA_ENABLED")
     49    SET(CUDA_LIB "cuda")
     50  endif(CUDA_FOUND)
     51endif()
     52
    4153# Let's suppose we want to build a JIT compiler with support for
    4254# binary code (no interpreter):
    43 llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES mcjit native IRReader Linker) # ipo
     55set(LLVM_ALL_TARGETS AArch64 AMDGPU ARM BPF CppBackend Hexagon Mips MSP430 NVPTX PowerPC Sparc SystemZ X86 XCore)
     56llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES ${LLVM_ALL_TARGETS} mcjit native IRReader Linker)
    4457
    4558message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION} in ${LLVM_ROOT_DIR}")
     
    5568SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_BOOST")
    5669
    57 SET(IDISA_SRC IDISA/idisa_builder.cpp IDISA/idisa_avx_builder.cpp IDISA/idisa_i64_builder.cpp IDISA/idisa_sse_builder.cpp IDISA/idisa_target.cpp)
     70SET(IDISA_SRC IDISA/idisa_builder.cpp IDISA/idisa_avx_builder.cpp IDISA/idisa_i64_builder.cpp IDISA/idisa_sse_builder.cpp IDISA/idisa_nvptx_builder.cpp IDISA/idisa_target.cpp)
    5871
    5972SET(PABLO_SRC pablo/pabloAST.cpp pablo/ps_if.cpp pablo/ps_while.cpp pablo/function.cpp pablo/codegenstate.cpp pablo/builder.cpp pablo/symbol_generator.cpp pablo/printer_pablos.cpp pablo/pablo_toolchain.cpp pablo/passes/flattenif.cpp)
     
    132145target_link_libraries(wc ${Boost_LIBRARIES})
    133146
    134 target_link_libraries (icgrep UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES})
    135 #target_link_libraries (symtbl UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES})
    136 target_link_libraries (u8u16 UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES})
    137 target_link_libraries (wc UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES})
     147target_link_libraries (icgrep UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${CUDA_LIB})
     148#target_link_libraries (symtbl UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${CUDA_LIB})
     149target_link_libraries (u8u16 UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${CUDA_LIB})
     150target_link_libraries (wc UCDlib PabloADT RegExpCompiler CCADT CodeGen ${REQ_LLVM_LIBRARIES} ${CUDA_LIB})
    138151
    139152IF(ENABLE_MULTIPLEXING)
     
    209222  NAME abc_test
    210223  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../QA
    211   COMMAND ./run_abc ../icgrep-build/icgrep)
     224  COMMAND ./run_abc ${CMAKE_BINARY_DIR}/icgrep)
    212225
    213226add_custom_target (abc_test
Note: See TracChangeset for help on using the changeset viewer.