Files
FastDeploy/cmake/check.cmake
Jason df20b2a02b [Other] Remove useless macros (#1095)
* Remove useless macros

* triger ci

* fix check error

* rename INTEGRATE_PADDLE2ONNX to ENABLE_PADDLE2ONNX
2023-01-09 21:35:23 +08:00

45 lines
1.6 KiB
CMake

# Check for 32bit system
if(WIN32)
if(NOT CMAKE_CL_64)
message("***********************Compile on non 64-bit system now**********************")
add_definitions(-DNON_64_PLATFORM)
if(WITH_GPU)
message(FATAL_ERROR "-DWITH_GPU=ON doesn't support on non 64-bit system now.")
endif()
if(ENABLE_PADDLE_BACKEND)
message(FATAL_ERROR "-DENABLE_PADDLE_BACKEND=ON doesn't support on non 64-bit system now.")
endif()
if(ENABLE_POROS_BACKEND)
message(FATAL_ERROR "-DENABLE_POROS_BACKEND=ON doesn't support on non 64-bit system now.")
endif()
if(ENABLE_VISION)
message(FATAL_ERROR "-DENABLE_VISION=ON doesn't support on non 64-bit system now.")
endif()
endif()
endif()
if(ANDROID OR IOS)
if(ENABLE_ORT_BACKEND)
message(FATAL_ERROR "Not support ONNXRuntime backend for Andorid/IOS now. Please set ENABLE_ORT_BACKEND=OFF.")
endif()
if(ENABLE_PADDLE_BACKEND)
message(FATAL_ERROR "Not support Paddle backend for Andorid/IOS now. Please set ENABLE_PADDLE_BACKEND=OFF.")
endif()
if(ENABLE_OPENVINO_BACKEND)
message(FATAL_ERROR "Not support OpenVINO backend for Andorid/IOS now. Please set ENABLE_OPENVINO_BACKEND=OFF.")
endif()
if(ENABLE_TRT_BACKEND)
message(FATAL_ERROR "Not support TensorRT backend for Andorid/IOS now. Please set ENABLE_TRT_BACKEND=OFF.")
endif()
endif()
if(WITH_GPU)
if(APPLE)
message(FATAL_ERROR "Cannot enable GPU while compling in Mac OSX.")
set(WITH_GPU OFF)
elseif(ANDROID OR IOS)
message(FATAL_ERROR "Cannot enable GPU while compling in Android or IOS.")
set(WITH_GPU OFF)
endif()
endif()