find_program(CCACHE_PROGRAM ccache) if(CCACHE_PROGRAM) message(STATUS "Set up ccache ...") set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") endif()
https://crascit.com/2016/04/09/using-ccache-with-cmake/
https://github.com/xizhibei/blog/issues/145