mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Meta: Semi-automatically detect ccache for Lagom builds
The top-level CMakeLists.txt already automatically detects ccache, but CI will invoke CMake with Lagom's CMakeLists.txt. Add an option to Lagom to do the same detection.
This commit is contained in:
parent
eedb26110a
commit
831f90c9d4
Notes:
sideshowbarker
2024-07-18 05:35:16 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/831f90c9d4f Pull-request: https://github.com/SerenityOS/serenity/pull/9458
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,7 @@ project(
|
|||
LANGUAGES C CXX
|
||||
)
|
||||
|
||||
option(ENABLE_LAGOM_CCACHE "Enable ccache for Lagom builds" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries instead of static libraries" ON)
|
||||
if (ENABLE_OSS_FUZZ)
|
||||
set(BUILD_SHARED_LIBS OFF) # Don't use shared libraries on oss-fuzz, for ease of integration with their infrastructure
|
||||
|
@ -25,6 +26,13 @@ get_filename_component(
|
|||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if (ENABLE_LAGOM_CCACHE)
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if(CCACHE_PROGRAM)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(${SERENITY_PROJECT_ROOT}/Meta/CMake/wasm_spec_tests.cmake)
|
||||
|
||||
add_compile_options(-Wno-unknown-warning-option -Wno-literal-suffix -Wno-deprecated-copy)
|
||||
|
|
Loading…
Reference in a new issue