You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

third_party_sync.cmake 1.2 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. set(SYNC_THIRD_PARTY_CMD "bash")
  2. list(APPEND SYNC_THIRD_PARTY_CMD "${CMAKE_CURRENT_SOURCE_DIR}/third_party/prepare.sh")
  3. if(NOT MGE_WITH_JIT_MLIR AND NOT MGE_BUILD_IMPERATIVE_RT)
  4. list(APPEND SYNC_THIRD_PARTY_CMD "-a")
  5. endif()
  6. if(NOT MGE_WITH_TEST)
  7. list(APPEND SYNC_THIRD_PARTY_CMD "-b")
  8. endif()
  9. if((NOT MGE_WITH_MKLDNN) OR (NOT ${MGE_ARCH} STREQUAL "x86_64"))
  10. list(APPEND SYNC_THIRD_PARTY_CMD "-c")
  11. endif()
  12. if(NOT MGE_WITH_HALIDE)
  13. list(APPEND SYNC_THIRD_PARTY_CMD "-d")
  14. endif()
  15. if(NOT MGE_WITH_DISTRIBUTED)
  16. list(APPEND SYNC_THIRD_PARTY_CMD "-e")
  17. list(APPEND SYNC_THIRD_PARTY_CMD "-i")
  18. endif()
  19. if(NOT MGE_WITH_CUDA)
  20. list(APPEND SYNC_THIRD_PARTY_CMD "-f")
  21. endif()
  22. if(NOT MGE_BUILD_IMPERATIVE_RT)
  23. list(APPEND SYNC_THIRD_PARTY_CMD "-g")
  24. endif()
  25. if(NOT ${MGE_BLAS} STREQUAL "OpenBLAS")
  26. list(APPEND SYNC_THIRD_PARTY_CMD "-j")
  27. endif()
  28. message("sync third_party with command: ${SYNC_THIRD_PARTY_CMD}")
  29. execute_process(
  30. COMMAND ${SYNC_THIRD_PARTY_CMD}
  31. WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
  32. RESULT_VARIABLE sync_third_party_cmd_ret)
  33. if(NOT sync_third_party_cmd_ret EQUAL 0)
  34. message(
  35. FATAL_ERROR "Error run sync third_party please run ${SYNC_THIRD_PARTY_CMD} manually"
  36. )
  37. endif()