Commit d5b5aba6 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Use CCache if available (#2866)

Summary: Pull Request resolved: https://github.com/pytorch/audio/pull/2866

Reviewed By: carolineechen

Differential Revision: D42349474

Pulled By: mthrok

fbshipit-source-id: 31455184031fff52719ef829e40bb1e09e11b0e7
parent 10787fee
...@@ -141,6 +141,16 @@ else() ...@@ -141,6 +141,16 @@ else()
endif() endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warning_flags} ${TORCH_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warning_flags} ${TORCH_CXX_FLAGS}")
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message(STATUS "Found ccache")
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
else()
message(STATUS "Could not find ccache. Consider installing ccache to speed up compilation.")
endif()
add_subdirectory(third_party) add_subdirectory(third_party)
add_subdirectory(torchaudio/csrc) add_subdirectory(torchaudio/csrc)
if (BUILD_SOX) if (BUILD_SOX)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment