CMakeLists.txt 742 字节
Newer Older
S
sangoly 已提交
1 2 3 4
if (NOT LITE_WITH_PYTHON)
    return()
endif()

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# to create setup.py for packeting whl for Paddle-Lite and opt

execute_process(
  COMMAND git describe --tags --exact-match
  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  OUTPUT_VARIABLE PADDLE_LITE_TAG
  OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(
  COMMAND git log -1 --format=%h
  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  OUTPUT_VARIABLE PADDLE_LITE_COMMIT
  OUTPUT_STRIP_TRAILING_WHITESPACE
)
20 21 22 23 24 25 26
if(APPLE)
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup_mac.py.in
        ${CMAKE_CURRENT_BINARY_DIR}/setup.py)
else()
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
        ${CMAKE_CURRENT_BINARY_DIR}/setup.py)
endif()
S
sangoly 已提交
27 28
add_subdirectory(pybind)
#add_subdirectory(interface)