From ad6d84e747f5cbb142d9beba4e9bf75d99b66a3c Mon Sep 17 00:00:00 2001 From: nihui Date: Wed, 18 Dec 2024 18:18:10 +0800 Subject: [PATCH] pnnx build silent warnings from torch header (#5828) --- tools/pnnx/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/pnnx/CMakeLists.txt b/tools/pnnx/CMakeLists.txt index 31c79b082..65b15a3cf 100644 --- a/tools/pnnx/CMakeLists.txt +++ b/tools/pnnx/CMakeLists.txt @@ -33,6 +33,7 @@ option(PNNX_COVERAGE "build for coverage" OFF) # set(Torch_INSTALL_DIR "/home/nihui/osd/pnnx/install" CACHE STRING "") # set(TorchVision_INSTALL_DIR "/home/nihui/osd/pnnx/install" CACHE STRING "") +# set(protobuf_DIR "/home/nihui/osd/pnnx/install/lib64/cmake/protobuf" CACHE STRING "") # set(Torch_DIR "${Torch_INSTALL_DIR}/share/cmake/Torch") set(TorchVision_DIR "${TorchVision_INSTALL_DIR}/share/cmake/TorchVision") @@ -77,7 +78,7 @@ else() message(WARNING "Building without TorchVision") endif() -include_directories(${TORCH_INCLUDE_DIRS}) +include_directories(SYSTEM ${TORCH_INCLUDE_DIRS}) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # test if libtorch and protobuf has the same cxxabi version