kou commented on pull request #12703:
URL: https://github.com/apache/arrow/pull/12703#issuecomment-1077351668


   How about overwriting `CMAKE_X_COMPILER_LAUNCHER`?
   
   ```diff
   diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
   index ff70619440..528302de69 100644
   --- a/cpp/CMakeLists.txt
   +++ b/cpp/CMakeLists.txt
   @@ -195,8 +195,8 @@ if(ARROW_USE_CCACHE)
      find_program(CCACHE_FOUND ccache)
      if(CCACHE_FOUND)
        message(STATUS "Using ccache: ${CCACHE_FOUND}")
   -    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND})
   -    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${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")
   ```


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