Commit graph

4 commits

Author SHA1 Message Date
Neui
a1c54063d0 CMake: CCache: Always make clang happy
When we are using ccache anyway, always add the flags to make clang
happy. Also, fix copy-paste error regarding what variable to modify for
it.
2024-06-10 23:44:46 +02:00
Neui
f91413db8f CMake: Fix CCache support when already using _LAUNCHER
The official ccache documentation[1] recommends to set
`CMAKE_C(XX)_COMPILER_LAUNCHER` to ccache to enable ccache.
These also work as envionment variables (supported by CMake itself).
However, using these instructions generates the following error during
building:

    ccache: error: Recursive invocation (the name of the ccache binary must be "ccache")

This is because Dolphin adds an additional command ccache layer (ccache
ccache compiler ...).

This fixes that issue by checking for `CMAKE_C(XX)_COMPILER_LAUNCHER`
before inserting our own. Also, use `CMAKE_C(XX)_COMPILER_LAUNCHER`
to add ccache because the CMake docs discourages the use of
`RULE_LAUNCH_COMPILE` in favour of `CMAKE_C(XX)_COMPILER_LAUNCHER`.

[1]: https://github.com/ccache/ccache/wiki/CMake
2024-06-08 16:05:14 +02:00
Florent Castelli
712b078a5b
cmake: Search for sccache too in CCache module
sccache is a ccache rewrite that supports GCC, Clang and MSVC.
2021-04-24 17:59:34 +02:00
Michael Maltese
45d1f88ea7 CMake: move modules from CMakeTests/ -> CMake/
The name "CMakeTests" is inaccurate and irregular.
2017-02-07 22:55:27 -08:00
Renamed from CMakeTests/CCache.cmake (Browse further)