mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
Meta: Permit specifying a build preset in ./Meta/ladybird.sh
Retrieve the build preset with environment variable BUILD_PRESET, which if unset is initialized to "default".
This commit is contained in:
parent
84acd1138c
commit
7dc28a20d0
Notes:
sideshowbarker
2024-07-16 23:08:48 +09:00
Author: https://github.com/caitp 🔰
Commit: 7dc28a20d0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/375
1 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
BUILD_PRESET=${BUILD_PRESET:-default}
|
||||
ARG0=$0
|
||||
print_help() {
|
||||
NAME=$(basename "$ARG0")
|
||||
|
@ -69,7 +70,7 @@ get_top_dir() {
|
|||
}
|
||||
|
||||
create_build_dir() {
|
||||
cmake --preset default "${CMAKE_ARGS[@]}" -S "$LADYBIRD_SOURCE_DIR" -B "$BUILD_DIR"
|
||||
cmake --preset "$BUILD_PRESET" "${CMAKE_ARGS[@]}" -S "$LADYBIRD_SOURCE_DIR" -B "$BUILD_DIR"
|
||||
}
|
||||
|
||||
cmd_with_target() {
|
||||
|
@ -94,7 +95,7 @@ ensure_target() {
|
|||
|
||||
run_tests() {
|
||||
local TEST_NAME="$1"
|
||||
local CTEST_ARGS=("--preset" "default" "--output-on-failure" "--test-dir" "$BUILD_DIR")
|
||||
local CTEST_ARGS=("--preset" "$BUILD_PRESET" "--output-on-failure" "--test-dir" "$BUILD_DIR")
|
||||
if [ -n "$TEST_NAME" ]; then
|
||||
if [ "$TEST_NAME" = "WPT" ]; then
|
||||
CTEST_ARGS+=("-C" "Integration")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue