mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Detect ccache being passed as the compiler
This prevents ccache from being invoking itself. Icecc fails to ran this way because of recursion detection.
This commit is contained in:
parent
10d40af167
commit
483c18437b
Notes:
sideshowbarker
2024-07-17 05:18:58 +09:00
Author: https://github.com/Jan200101 Commit: https://github.com/SerenityOS/serenity/commit/483c18437b Pull-request: https://github.com/SerenityOS/serenity/pull/16346 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/timschumi
1 changed files with 12 additions and 3 deletions
|
@ -2,8 +2,17 @@
|
||||||
# ccache setup
|
# ccache setup
|
||||||
#
|
#
|
||||||
|
|
||||||
|
list(APPEND COMPILERS
|
||||||
|
"CMAKE_C_COMPILER"
|
||||||
|
"CMAKE_CXX_COMPILER"
|
||||||
|
)
|
||||||
find_program(CCACHE_PROGRAM ccache)
|
find_program(CCACHE_PROGRAM ccache)
|
||||||
if(CCACHE_PROGRAM)
|
if(CCACHE_PROGRAM)
|
||||||
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE FILEPATH "Path to a compiler launcher program, e.g. ccache")
|
foreach(compiler ${COMPILERS})
|
||||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE FILEPATH "Path to a compiler launcher program, e.g. ccache")
|
get_filename_component(compiler_path "${${compiler}}" REALPATH)
|
||||||
endif()
|
get_filename_component(compiler_name "${compiler_path}" NAME)
|
||||||
|
if (NOT ${compiler_name} MATCHES "ccache")
|
||||||
|
set("${compiler}_LAUNCHER" "${CCACHE_PROGRAM}" CACHE FILEPATH "Path to a compiler launcher program, e.g. ccache")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue