kou commented on code in PR #51139:
URL: https://github.com/apache/arrow/pull/51139#discussion_r3919971498
##########
python/CMakeLists.txt:
##########
@@ -130,11 +130,14 @@ if(CCACHE_FOUND
AND NOT CMAKE_C_COMPILER_LAUNCHER
AND NOT CMAKE_CXX_COMPILER_LAUNCHER)
message(STATUS "Using ccache: ${CCACHE_FOUND}")
- set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_FOUND})
- set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_FOUND})
- # ARROW-3985: let ccache preserve C++ comments, because some of them may be
- # meaningful to the compiler
- set(ENV{CCACHE_COMMENTS} "1")
+ # 1. Let ccache preserve C++ comments, because some of them may be
+ # meaningful to the compiler (ARROW-3985)
+ # 2. Set ccache base_dir to the build output directory as it is typically
+ # a temporary directory, and would otherwise fail caching because of
+ # using different paths everytime.
+ set(ccache_command ${CCACHE_FOUND} keep_comments_cpp=true
base_dir=${CMAKE_BINARY_DIR})
Review Comment:
We can reject old ccache by `find_program()`'s `VALIDATOR`:
https://cmake.org/cmake/help/latest/command/find_program.html
Ubuntu 22.04 ships ccache 4.5.1: https://packages.ubuntu.com/jammy/ccache
AMD64 Ubuntu 22 CUDA 11.7.1 Python uses Ubuntu 22.04:
https://github.com/apache/arrow/actions/runs/33699867432/job/100476668733?pr=51139
If it fails, how about using `VALIDATOR` to reject old ccache or installing
newer ccache manually in our Docker image?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]