Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. # This file allows users to call find_package(Polly) and pick up our targets.
  2.  
  3. # Compute the installation prefix from this LLVMConfig.cmake file location.
  4. get_filename_component(POLLY_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
  5. get_filename_component(POLLY_INSTALL_PREFIX "${POLLY_INSTALL_PREFIX}" PATH)
  6. get_filename_component(POLLY_INSTALL_PREFIX "${POLLY_INSTALL_PREFIX}" PATH)
  7. get_filename_component(POLLY_INSTALL_PREFIX "${POLLY_INSTALL_PREFIX}" PATH)
  8.  
  9. set(LLVM_VERSION 16.0.6)
  10. find_package(LLVM ${LLVM_VERSION} EXACT REQUIRED CONFIG
  11.              HINTS "${POLLY_INSTALL_PREFIX}/lib/cmake/llvm")
  12.  
  13. set(Polly_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
  14. set(Polly_BUNDLED_ISL ON)
  15. set(Polly_ENABLE_GPGPU_CODEGEN OFF)
  16.  
  17. set(Polly_DEFINITIONS ${LLVM_DEFINITIONS})
  18. set(Polly_INCLUDE_DIRS ${POLLY_INSTALL_PREFIX}/include;${POLLY_INSTALL_PREFIX}/include/polly ${LLVM_INCLUDE_DIRS})
  19. set(Polly_LIBRARY_DIRS ${POLLY_INSTALL_PREFIX}/lib)
  20. set(Polly_EXPORTED_TARGETS Polly;PollyISL;LLVMPolly)
  21. set(Polly_LIBRARIES ${LLVM_LIBRARIES} ${Polly_EXPORTED_TARGETS})
  22.  
  23. # Imported Targets:
  24.  
  25. if (NOT TARGET PollyISL)
  26.   add_library(PollyISL STATIC IMPORTED)
  27. endif()
  28.  
  29. if (Polly_ENABLE_GPGPU_CODEGEN AND NOT TARGET PollyPPCG)
  30.   add_library(PollyPPCG  IMPORTED)
  31.   set_property(TARGET PollyPPCG PROPERTY INTERFACE_LINK_LIBRARIES PollyISL)
  32. endif()
  33.  
  34. if (NOT TARGET Polly)
  35.   add_library(Polly STATIC IMPORTED)
  36.   set_property(TARGET Polly PROPERTY INTERFACE_LINK_LIBRARIES PollyISL)
  37.   if (Polly_ENABLE_GPGPU_CODEGEN)
  38.     set_property(TARGET Polly APPEND PROPERTY INTERFACE_LINK_LIBRARIES PollyPPCG)
  39.   endif()
  40. endif()
  41.  
  42. if (NOT TARGET LLVMPolly)
  43.   add_library(LLVMPolly MODULE IMPORTED)
  44.   set_property(TARGET LLVMPolly PROPERTY INTERFACE_LINK_LIBRARIES Polly)
  45. endif()
  46.  
  47. # Exported locations:
  48. file(GLOB CONFIG_FILES "${Polly_CMAKE_DIR}/PollyExports-*.cmake")
  49. foreach(f ${CONFIG_FILES})
  50.   include(${f})
  51. endforeach()
  52.