CMakeLists.txt 1.4 KB
Newer Older
1 2 3 4
if (NOT WITH_LITE)
    return()
endif()

S
superjomn 已提交
5
message(WARNING "Lite enabled!")
S
Superjomn 已提交
6 7 8 9
message(STATUS "LIGHT_FRAMEWORK: ${LITE_WITH_LIGHT_WEIGHT_FRAMEWORK}")
message(STATUS "LITE_WITH_CUDA: ${LITE_WITH_CUDA}")
message(STATUS "LITE_WITH_X86: ${LITE_WITH_X86}")

S
superjomn 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
set(LITE_MODEL_DIR "${THIRD_PARTY_PATH}/install")

function(lite_download_and_uncompress INSTALL_DIR URL FILENAME)
    message(STATUS "Download inference test stuff from ${URL}/${FILENAME}")
    string(REGEX REPLACE "[-%.]" "_" FILENAME_EX ${FILENAME})
    set(EXTERNAL_PROJECT_NAME "extern_lite_download_${FILENAME_EX}")
    set(UNPACK_DIR "${INSTALL_DIR}/src/${EXTERNAL_PROJECT_NAME}")
    ExternalProject_Add(
            ${EXTERNAL_PROJECT_NAME}
            ${EXTERNAL_PROJECT_LOG_ARGS}
            PREFIX                ${INSTALL_DIR}
            DOWNLOAD_COMMAND      wget --no-check-certificate -q -O ${INSTALL_DIR}/${FILENAME} ${URL}/${FILENAME} &&
            ${CMAKE_COMMAND} -E tar xzf ${INSTALL_DIR}/${FILENAME}
            DOWNLOAD_DIR          ${INSTALL_DIR}
            DOWNLOAD_NO_PROGRESS  1
            CONFIGURE_COMMAND     ""
            BUILD_COMMAND         ""
            UPDATE_COMMAND        ""
            INSTALL_COMMAND       ""
    )
endfunction()


S
update  
superjomn 已提交
33
add_subdirectory(core)
S
superjomn 已提交
34
add_subdirectory(x86)
35
add_subdirectory(host)
36
add_subdirectory(cuda)
S
superjomn 已提交
37 38 39
add_subdirectory(operators)
add_subdirectory(kernels)
add_subdirectory(model_parser)
S
superjomn 已提交
40
add_subdirectory(utils)
S
superjomn 已提交
41
add_subdirectory(api)