From 89f6042345800f996819cd061795aa1eee69c4fa Mon Sep 17 00:00:00 2001 From: MRXLT Date: Tue, 21 Jul 2020 19:09:10 +0800 Subject: [PATCH] update cmake --- CMakeLists.txt | 3 +++ core/general-server/CMakeLists.txt | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0620b64c..bbe97c0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,9 @@ set(PADDLE_SERVING_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) SET(PADDLE_SERVING_INSTALL_DIR ${CMAKE_BINARY_DIR}/output) SET(CMAKE_INSTALL_RPATH "\$ORIGIN" "${CMAKE_INSTALL_RPATH}") +SET(CMAKE_C_COMPILER "/opt/compiler/gcc-8.2/bin/gcc") +SET(CMAKE_CXX_COMPILER "/opt/compiler/gcc-8.2/bin/g++") + include(system) project(paddle-serving CXX C) diff --git a/core/general-server/CMakeLists.txt b/core/general-server/CMakeLists.txt index 560d387c..26fd1222 100644 --- a/core/general-server/CMakeLists.txt +++ b/core/general-server/CMakeLists.txt @@ -28,13 +28,17 @@ if(WITH_GPU) target_link_libraries(serving ${CUDA_LIBRARIES}) endif() -#link_libraries(${PROJECT_BINARY_DIR}/third_party/install/Paddle/third_party/install/lite/cxx/lib/libpaddle_full_api_shared.so) +link_directories(/home/xulongteng/github/compile-paddle/xpu_tools/output/XTCL/shlib) +#LINK_LIBRARIES(/home/xulongteng/github/compile-paddle/xpu_tools/output/XTCL/shlib/libxpuapi.so) +#LINK_LIBRARIES(/home/xulongteng/github/compile-paddle/xpu_tools/output/XTDK/runtime/shlib/libxpurt.so) if(WITH_MKL OR WITH_GPU) target_link_libraries(serving -liomp5 -lmklml_intel -lmkldnn -lpthread - -lcrypto -lm -lrt -lssl -ldl -lz -lbz2 ) + -lssl -lcrypto -lm -lrt -ldl -lz) target_link_libraries(serving - ${PROJECT_BINARY_DIR}/third_party/install/Paddle/third_party/install/lite/cxx/lib/libpaddle_full_api_shared.so) + ${PROJECT_BINARY_DIR}/third_party/install/Paddle/third_party/install/lite/cxx/lib/libpaddle_full_api_shared.so + /home/xulongteng/github/compile-paddle/xpu_tools/output/XTCL/shlib/libxpuapi.so + /home/xulongteng/github/compile-paddle/xpu_tools/output/XTDK/runtime/shlib/libxpurt.so) else() target_link_libraries(serving openblas -lpthread -lcrypto -lm -lrt -lssl -ldl -lz -lbz2) -- GitLab