diff --git a/CMakeLists.txt b/CMakeLists.txt index b9ccde2e0..961f7bfde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/python/setup.py b/python/setup.py index 2fbc46c39..a09972327 100644 --- a/python/setup.py +++ b/python/setup.py @@ -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: diff --git a/scripts/patch_paddle_inference.py b/scripts/patch_paddle_inference.py index 7fdbeae0b..ad01a975d 100644 --- a/scripts/patch_paddle_inference.py +++ b/scripts/patch_paddle_inference.py @@ -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)