diff --git a/CMakeLists.txt b/CMakeLists.txt index 0620b64cfa6e6350adb14b8d2e40f98aaaa7e42d..bbe97c0ef51bce34e53aa3e6db0abc9178af3c71 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 560d387c2db5c32ec575a48b20ff60a9ed2353b4..26fd12223cef1e7ecda83443ee71f03c1cfc05af 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)