Fix build on jetson (#281)

* Fix compile on Jetson

* trigger ci
This commit is contained in:
Jason
2022-09-26 19:23:30 +08:00
committed by GitHub
parent 85c44d562e
commit 36eb6fbba6
3 changed files with 4 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
# limitations under the License.
PROJECT(fastdeploy C CXX)
CMAKE_MINIMUM_REQUIRED (VERSION 3.16)
CMAKE_MINIMUM_REQUIRED (VERSION 3.10)
option(CSRCS_DIR_NAME "Name of source code directory")
option(LIBRARY_NAME "Name of build library name")
@@ -34,6 +34,7 @@ include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)
# Set C++11 as standard for the whole project
if(NOT MSVC)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "-Wno-format")
endif(NOT MSVC)
if(ANDROID)

View File

@@ -66,7 +66,7 @@ setup_configs["PY_LIBRARY_NAME"] = PACKAGE_NAME + "_main"
setup_configs["OPENCV_DIRECTORY"] = os.getenv("OPENCV_DIRECTORY", "")
setup_configs["ORT_DIRECTORY"] = os.getenv("ORT_DIRECTORY", "")
if setup_configs["WITH_GPU"] == "ON":
if setup_configs["WITH_GPU"] == "ON" or setup_configs["BUILD_ON_JETSON"] == "ON":
wheel_name = "fastdeploy-gpu-python"
if os.getenv("CMAKE_CXX_COMPILER", None) is not None:

View File

@@ -28,4 +28,4 @@ def process_paddle_inference(paddle_inference_so_file):
command = "patchelf --set-rpath '{}' {}".format(":".join(rpaths), paddle_inference_so_file)
if platform.machine() != 'sw_64' and platform.machine() != 'mips64':
assert subprocess.Popen(command, shell=True) != 0, "patchelf {} failed, the command: {}".format(command, lib)
assert os.system(command) == 0, "patchelf {} failed, the command: {}".format(paddle_inference_so_file, command)