mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:57:45 +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
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,7 @@ project(
|
||||||
LANGUAGES C CXX
|
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)
|
option(BUILD_SHARED_LIBS "Build shared libraries instead of static libraries" ON)
|
||||||
if (ENABLE_OSS_FUZZ)
|
if (ENABLE_OSS_FUZZ)
|
||||||
set(BUILD_SHARED_LIBS OFF) # Don't use shared libraries on oss-fuzz, for ease of integration with their infrastructure
|
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)
|
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)
|
include(${SERENITY_PROJECT_ROOT}/Meta/CMake/wasm_spec_tests.cmake)
|
||||||
|
|
||||||
add_compile_options(-Wno-unknown-warning-option -Wno-literal-suffix -Wno-deprecated-copy)
|
add_compile_options(-Wno-unknown-warning-option -Wno-literal-suffix -Wno-deprecated-copy)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue