option (USE_CCACHE "Enable use of ccache")

if (${USE_CCACHE})
    find_program (CCACHE_FOUND ccache)
    if (CCACHE_FOUND)
        set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
        set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
    endif ()
endif ()
