mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-01-31 01:15:17 +01:00
Merge pull request #14262 from JoshuaVandaele/ccache-objc
CCache: Add support for Objective-C/Objective-C++
This commit is contained in:
@@ -1,17 +1,13 @@
|
|||||||
find_program(CCACHE_BIN NAMES ccache sccache)
|
find_program(CCACHE_BIN NAMES ccache sccache)
|
||||||
if(CCACHE_BIN)
|
if(CCACHE_BIN)
|
||||||
# Official ccache recommendation is to set CMAKE_C(XX)_COMPILER_LAUNCHER
|
set(_CCACHE_SUPPORTED_LAUCHERS C CXX OBJC OBJCXX)
|
||||||
if (NOT CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache")
|
foreach(LAUNCHER ${_CCACHE_SUPPORTED_LAUCHERS})
|
||||||
list(INSERT CMAKE_C_COMPILER_LAUNCHER 0 "${CCACHE_BIN}")
|
if (NOT CMAKE_${LAUNCHER}_COMPILER_LAUNCHER MATCHES "ccache")
|
||||||
endif()
|
list(INSERT CMAKE_${LAUNCHER}_COMPILER_LAUNCHER 0 ${CCACHE_BIN})
|
||||||
|
endif()
|
||||||
if (NOT CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache")
|
# ccache uses -I when compiling without preprocessor, which makes clang complain.
|
||||||
list(INSERT CMAKE_CXX_COMPILER_LAUNCHER 0 "${CCACHE_BIN}")
|
if("${CMAKE_${LAUNCHER}_COMPILER_ID}" MATCHES "Clang")
|
||||||
endif()
|
set(CMAKE_${LAUNCHER}_FLAGS "${CMAKE_${LAUNCHER}_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
||||||
|
endif()
|
||||||
# ccache uses -I when compiling without preprocessor, which makes clang complain.
|
endforeach()
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user