From 50e60ef321fdcacd460a1f1e9dcd12f3e3005760 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Mon, 21 May 2018 19:01:08 +0800 Subject: [PATCH] add version and cmakecache in inference_lib --- cmake/inference_lib.cmake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 1144ca7f43..7117a3a4f3 100644 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -162,4 +162,24 @@ copy(pybind_lib DSTS ${dst_dir}/${module} ) +# CMakeCache Info +copy(cmake_cache + SRCS ${CMAKE_CURRENT_BINARY_DIR}/CMakeCache.txt + DSTS ${CMAKE_INSTALL_PREFIX}) + add_custom_target(inference_lib_dist DEPENDS ${inference_lib_dist_dep}) + +# paddle fluid version +execute_process( + COMMAND ${GIT_EXECUTABLE} log --pretty=format:%H -1 + OUTPUT_VARIABLE PADDLE_GIT_COMMIT) +set(version_file ${CMAKE_INSTALL_PREFIX}/version.txt) +file(WRITE ${version_file} + "GIT COMMIT ID: ${PADDLE_GIT_COMMIT}\n" + "WITH_MKL: ${WITH_MKL}\n" + "WITH_GPU: ${WITH_GPU}\n") +if(WITH_GPU) + file(APPEND ${version_file} + "CUDA version: ${CUDA_VERSION}\n" + "CUDNN version: v${CUDNN_MAJOR_VERSION}\n") +endif() -- GitLab