jitify.cmake 701 字节
Newer Older
1 2 3 4 5 6 7
if(NOT WITH_GPU)
  set(JITIFY_FOUND OFF)
  return()
endif()

include(ExternalProject)

8 9 10 11 12
# clone jitify to Paddle/third_party
set(JITIFY_SOURCE_DIR ${PADDLE_SOURCE_DIR}/third_party/jitify)
set(JITIFY_URL https://github.com/NVIDIA/jitify.git)
set(JITIFY_TAG 57de649139c866eb83acacfe50c92ad7c6278776)

13 14 15
ExternalProject_Add(
  external_jitify
  ${EXTERNAL_PROJECT_LOG_ARGS}
16
  SOURCE_DIR ${JITIFY_SOURCE_DIR}
17
  PREFIX ${THIRD_PARTY_PATH}/jitify
18 19 20 21 22 23
  CONFIGURE_COMMAND ""
  PATCH_COMMAND ""
  BUILD_COMMAND ""
  UPDATE_COMMAND ""
  INSTALL_COMMAND "")

24
include_directories(${JITIFY_SOURCE_DIR})
25 26 27 28

add_library(extern_jitify INTERFACE)
add_dependencies(extern_jitify external_jitify)
set(jitify_deps extern_jitify)