rok commented on code in PR #51139:
URL: https://github.com/apache/arrow/pull/51139#discussion_r3916929761


##########
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:
   I think no, but users might. I think this is obscure enough to ignore.



-- 
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]

Reply via email to