diff --git a/Documentation/AdvancedBuildInstructions.md b/Documentation/AdvancedBuildInstructions.md index 64678dd2b1..ca03881349 100644 --- a/Documentation/AdvancedBuildInstructions.md +++ b/Documentation/AdvancedBuildInstructions.md @@ -67,6 +67,7 @@ There are some optional features that can be enabled during compilation that are - `SERENITY_ARCH`: Specifies which architecture to build for. Currently supported options are `x86_64`. - `BUILD_`: builds the specified component, e.g. `BUILD_HEARTS` (note: must be all caps). Check the components.ini file in your build directory for a list of available components. Make sure to run `ninja clean` and `rm -rf Build/x86_64/Root` after disabling components. These options can be easily configured by using the `ConfigureComponents` utility. See the [Component Configuration](#component-configuration) section below. - `BUILD_EVERYTHING`: builds all optional components, overrides other `BUILD_` flags when enabled +- `SERENITY_CACHE_DIR`: sets the location of a shared cache of downloaded files. Should not need to be set unless managing a distribution package. Many parts of the SerenityOS codebase have debug functionality, mostly consisting of additional messages printed to the debug console. This is done via the `_DEBUG` macros, which can be enabled individually at build time. They are listed in [this file](../Meta/CMake/all_the_debug_macros.cmake). diff --git a/Meta/Azure/Lagom.yml b/Meta/Azure/Lagom.yml index 06db02752b..3b65b487ac 100644 --- a/Meta/Azure/Lagom.yml +++ b/Meta/Azure/Lagom.yml @@ -51,7 +51,7 @@ jobs: os: '${{ parameters.os }}' arch: 'Lagom' toolchain: '$(toolchain)' - download_cache_path: 'Meta/Lagom/Build' + download_cache_path: 'Meta/Lagom/caches' serenity_ccache_path: '$(SERENITY_CCACHE_DIR)' with_remote_data_caches: true ${{ if eq(parameters.os, 'macOS') }}: diff --git a/Meta/CMake/Superbuild/CMakeLists.txt b/Meta/CMake/Superbuild/CMakeLists.txt index cabfc00aa1..cac282a945 100644 --- a/Meta/CMake/Superbuild/CMakeLists.txt +++ b/Meta/CMake/Superbuild/CMakeLists.txt @@ -44,9 +44,6 @@ if(NOT SERENITY_TOOLCHAIN STREQUAL "GNU") endif() set(SERENITY_BUILD_DIR "${PROJECT_BINARY_DIR}/../${SERENITY_ARCH}${SERENITY_BUILD_DIR_SUFFIX}") -# Location to cache artifacts downloaded during the build. -file(REAL_PATH "${PROJECT_BINARY_DIR}/../caches" SERENITY_CACHE_DIR) - # Pkgconf incorrectly discards a sysroot if it doesn't match the start of the path to the # library file. To avoid that, resolve our sysroot into an absolute and canonical path # that matches pkgconf's result for resolving the library file. diff --git a/Meta/CMake/common_options.cmake b/Meta/CMake/common_options.cmake index 1dc234ae96..235a7900c3 100644 --- a/Meta/CMake/common_options.cmake +++ b/Meta/CMake/common_options.cmake @@ -24,3 +24,5 @@ serenity_option(HACKSTUDIO_BUILD OFF CACHE BOOL "Automatically enabled when buil serenity_option(ENABLE_JAKT OFF CACHE BOOL "Enable building jakt files") serenity_option(JAKT_SOURCE_DIR "" CACHE STRING "Pre-existing jakt language source directory") + +serenity_option(SERENITY_CACHE_DIR "${PROJECT_BINARY_DIR}/../caches" CACHE PATH "Location of shared cache of downloaded files") diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 320dc58006..0e3aa45fa0 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -25,8 +25,6 @@ get_filename_component( ) set(SerenityOS_SOURCE_DIR "${SERENITY_PROJECT_ROOT}" CACHE STRING "") -set(SERENITY_CACHE_DIR "${PROJECT_BINARY_DIR}" CACHE STRING "") - list(APPEND CMAKE_MODULE_PATH "${SERENITY_PROJECT_ROOT}/Meta/CMake") if(NOT COMMAND serenity_option)