Commit 5284c61b authored by Wez Furlong's avatar Wez Furlong Committed by Facebook Github Bot

getdeps: add support for using ccache in cmake builds

Summary:
if we find ccache in the path, then we instruct cmake to use
it as the compiler launcher.

Reviewed By: pkaush

Differential Revision: D15375441

fbshipit-source-id: 602fe54742a5ec07b0533bd2cf63cb905b051e85
parent 0cb09568
...@@ -229,6 +229,9 @@ class CMakeBuilder(BuilderBase): ...@@ -229,6 +229,9 @@ class CMakeBuilder(BuilderBase):
"CMAKE_BUILD_TYPE": "RelWithDebInfo", "CMAKE_BUILD_TYPE": "RelWithDebInfo",
} }
env = self._compute_env(install_dirs) env = self._compute_env(install_dirs)
ccache = path_search(env, "ccache")
if ccache:
defines["CMAKE_CXX_COMPILER_LAUNCHER"] = ccache
if self.build_opts.is_darwin(): if self.build_opts.is_darwin():
# Try to persuade cmake to set the rpath to match the lib # Try to persuade cmake to set the rpath to match the lib
# dirs of the dependencies. This isn't automatic, and to # dirs of the dependencies. This isn't automatic, and to
......
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