未验证 提交 e3179ea2 编写于 作者: T Tao Luo 提交者: GitHub

refine ccache statistics show (#24167)

test=develop
上级 0fb9b208
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
find_program(CCACHE_PATH ccache) find_program(CCACHE_PATH ccache)
if(CCACHE_PATH) if(CCACHE_PATH)
execute_process(COMMAND ccache -V OUTPUT_VARIABLE ccache_output)
execute_process(COMMAND ccache -s cache directory OUTPUT_VARIABLE cache_directory)
string(REGEX MATCH "[0-9]+.[0-9]+" ccache_version ${ccache_output})
message(STATUS "Ccache is founded, use ccache to speed up compile.") message(STATUS "Ccache is founded, use ccache to speed up compile.")
# show statistics summary of ccache
message("ccache version\t\t\t " ${ccache_version} "\n" ${cache_directory})
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PATH}) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PATH})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_PATH}) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_PATH})
endif(CCACHE_PATH) endif(CCACHE_PATH)
...@@ -253,8 +253,6 @@ EOF ...@@ -253,8 +253,6 @@ EOF
function cmake_gen() { function cmake_gen() {
mkdir -p ${PADDLE_ROOT}/build mkdir -p ${PADDLE_ROOT}/build
cd ${PADDLE_ROOT}/build cd ${PADDLE_ROOT}/build
# show statistics summary of ccache
ccache -s cache directory
cmake_base $1 cmake_base $1
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册