diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-08-16 22:10:34 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-08-17 13:31:43 +0100 |
commit | 831f90c9d4f3ad6152836d292f3d11fb6d1066d2 (patch) | |
tree | 0ac32cb8d1626ada4e8b49469df77e401b873ecb /Meta/Lagom/CMakeLists.txt | |
parent | eedb26110aa92a6b7371fabad7f8574dbdc2606e (diff) | |
download | serenity-831f90c9d4f3ad6152836d292f3d11fb6d1066d2.zip |
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.
Diffstat (limited to 'Meta/Lagom/CMakeLists.txt')
-rw-r--r-- | Meta/Lagom/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 879e723f6d..4347e53910 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -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) |