Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f9bb546
Prefix WebFront's test, coverage and sanitizer options [#412]
ambroise-leclerc Oct 30, 2026
69e7d96
Let a cached prefixed test option win over a former name [#412]
ambroise-leclerc Oct 30, 2026
c34f751
Merge remote-tracking branch 'origin/develop' into 412-prefixed-test-…
ambroise-leclerc Oct 30, 2026
8bcf7a5
Let an explicit former test option name switch a configured tree [#412]
ambroise-leclerc Oct 30, 2026
260e42b
Recognize the deprecation warnings of CMake 4.4 in the option test [#…
ambroise-leclerc Oct 30, 2026
b5c5475
Build the desktop CI jobs with four parallel jobs [#435]
ambroise-leclerc Oct 30, 2026
6c56179
Add the build-time study workflow and its test options [#435]
ambroise-leclerc Oct 30, 2026
b936616
Return from RunWithDeadline.sh when the command ends, not at the dead…
ambroise-leclerc Oct 30, 2026
ada99ee
Compile the heavy unit tests as a unity build and study the variants …
ambroise-leclerc Oct 30, 2026
025a441
Profile where the compile time of a heavy unit goes [#435]
ambroise-leclerc Oct 30, 2026
981452b
Do not hold the port lock while an embedded application is compiled […
ambroise-leclerc Oct 30, 2026
51d3c35
Profile with a flag Git Bash does not rewrite; allow profile-only run…
ambroise-leclerc Oct 30, 2026
e572947
Measure the cost of MSVC /analyze; select study variants from the com…
ambroise-leclerc Oct 30, 2026
49b9c2d
Give the command its own process group when the shell has no job cont…
ambroise-leclerc Oct 30, 2026
08b43dd
Build the study matrix as an include list; no matrix in a job conditi…
ambroise-leclerc Oct 30, 2026
19448b7
Repeat the Windows measurements and report their spread [#435] [windo…
ambroise-leclerc Oct 30, 2026
3f502c0
Change a declaration, not a comment, in the study scenarios; repeat L…
ambroise-leclerc Oct 31, 2026
d349f2c
Compile the heavy unit tests in groups of four on the desktop jobs an…
ambroise-leclerc Oct 31, 2026
bf2e997
Merge develop into 435-ci-build-time [#435]
ambroise-leclerc Oct 31, 2026
6fce707
Add the measured pull-request run to the build-time report [#435]
ambroise-leclerc Oct 31, 2026
e3ee1b7
Record why the remaining items of the build-time study are left [#435]
ambroise-leclerc Oct 31, 2026
61e7976
Run the MSVC analysis and compile the examples in the master and week…
ambroise-leclerc Oct 31, 2026
4a3efcc
Cut DeveloperBrowserIntegration into five parts that run in parallel …
ambroise-leclerc Oct 31, 2026
7475321
Merge develop into 435-ci-build-time [#435]
ambroise-leclerc Oct 31, 2026
6474705
Report what cutting DeveloperBrowserIntegration gained [#435]
ambroise-leclerc Oct 31, 2026
9b0b150
Merge pull request #438 from ambroise-leclerc/master
ambroise-leclerc Oct 31, 2026
2594d46
Run the reproducibility builds only when their inputs change in a pul…
ambroise-leclerc Oct 31, 2026
1573455
Merge origin/develop into 412-prefixed-test-options
ambroise-leclerc Oct 31, 2026
80cbb45
Merge develop into 435-ci-build-time [#435]
ambroise-leclerc Oct 31, 2026
3da5704
Separate the unreleased changes from the 0.6.0 section [#435]
ambroise-leclerc Oct 31, 2026
2279ba8
Preserve explicit test options matching cached values [#412]
ambroise-leclerc Oct 31, 2026
0aaa706
Address review comments: validate study variants, fail the profile on…
ambroise-leclerc Oct 31, 2026
6ca608f
Rename the clashing helper of JsFunctionSenderTests and drop the know…
ambroise-leclerc Oct 31, 2026
e3443cd
Merge pull request #431 from ambroise-leclerc/412-prefixed-test-options
ambroise-leclerc Oct 31, 2026
adfb8be
Make the build-time study a manual workflow with inputs instead of a …
ambroise-leclerc Oct 31, 2026
6a9f9fc
Merge develop into 435-ci-build-time; remove the build-time study wor…
ambroise-leclerc Oct 31, 2026
e26248f
Merge pull request #436 from ambroise-leclerc/435-ci-build-time
ambroise-leclerc Oct 31, 2026
4805b2f
Remove the Windows agent's profile after a forced exit [#439]
ambroise-leclerc Oct 31, 2026
9ca7fe9
Build developer integration in the documented CEF commands [#434]
ambroise-leclerc Oct 31, 2026
4e764d2
Merge pull request #440 from ambroise-leclerc/434-browser-build-docs
ambroise-leclerc Oct 31, 2026
343bb37
Fix Windows profile cleanup review findings
ambroise-leclerc Oct 31, 2026
6728582
Merge pull request #441 from ambroise-leclerc/439-watchdog-profile-wi…
ambroise-leclerc Oct 31, 2026
a622fe9
Prepare WebFront 0.7.0 release
ambroise-leclerc Oct 31, 2026
0b4b572
Serialize CEF developer tests sharing a profile
ambroise-leclerc Oct 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/wf-driver/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
- name: Build webfront-wf
shell: bash
run: |
cmake -S . -B build-driver -G Ninja -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=OFF -DENABLE_TESTING=ON \
cmake -S . -B build-driver -G Ninja -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_ENABLE_TESTING=ON \
-DWEBFRONT_EMBED_WEBKITGTK=ON -DWEBFRONT_WEBTEST_FRONTEND=WebKitGTK \
-DCMAKE_CXX_SCAN_FOR_MODULES=OFF
cmake --build build-driver --target webfront-wf --parallel 2
Expand Down
38 changes: 31 additions & 7 deletions .github/workflows/BuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ concurrency:
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cache/CPM
SCCACHE_GHA_ENABLED: 'true'
# The full tier of the desktop jobs (weekly, pull requests into and pushes to master, manual dispatch with repeat_desktop_tests)
# also runs the MSVC code analysis and compiles the examples; a pull request into develop does neither (#435, docs/BUILD_TIME_STUDY.md).
FULL_TIER: ${{ (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'workflow_dispatch' && inputs.repeat_desktop_tests)) && 'true' || 'false' }}

# Third-party actions are pinned to commit SHAs; GitHub-owned actions/* use version tags.
jobs:
Expand Down Expand Up @@ -78,12 +81,29 @@ jobs:
build_type: Debug
test_env: {WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS: '1'}
# GCC 16 compiles the optional C++26 reflection layer of the forms (#383): its tests must not be skipped here.
options: -DWEBFRONT_EMBED_WEBKITGTK=ON -DWEBFRONT_WEBTEST_FRONTEND=WebKitGTK -DENABLE_COVERAGE=ON -DWEBFRONT_REQUIRE_REFLECTION_TESTS=ON
options: -DWEBFRONT_EMBED_WEBKITGTK=ON -DWEBFRONT_WEBTEST_FRONTEND=WebKitGTK -DWEBFRONT_ENABLE_COVERAGE=ON -DWEBFRONT_REQUIRE_REFLECTION_TESTS=ON
runs-on: ${{ matrix.os }}
# Only the Linux job runs in the prebuilt toolchain image; an empty value means no container.
container: ${{ matrix.use_image && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}},"options":"--shm-size=1g"}}', needs.linux-image.outputs.image, github.actor, github.token)) || '' }}
steps: &desktop-steps
- uses: actions/checkout@v7
with:
# A pull request is checked out as a merge commit: its first parent is the base, so the changed files are one diff away.
fetch-depth: 2
# The builds that prove the self-built environment reproducible and equal to the checked-in bundles take about 45 s. A
# pull request into develop that changes none of their inputs (what PrepareSelfBuildProject.cmake copies, and the CMake and
# workflow files that drive them) leaves them to the push to develop and to the master tier (#435).
- name: Decide whether the reproducibility builds run
shell: bash
run: |
reproducibility=true
if [ "$FULL_TIER" != true ] && [ "$GITHUB_EVENT_NAME" = pull_request ]; then
if ! git diff --name-only HEAD^1 HEAD | grep -qE '^(js/|examples/life/ui/|test/developer/|test/web/(CMakeLists\.txt|registry/)|test/cmake/(PrepareSelfBuildProject|CompareFiles|CheckSelfBuildRefresh|AssembleDeveloperFixtures)|include/webfront/system/|LICENSE$|\.github/workflows/BuildAndTest\.yml)'; then
reproducibility=false
fi
fi
echo "Reproducibility builds: $reproducibility"
echo "WEBFRONT_REPRODUCIBILITY=$reproducibility" >> "$GITHUB_ENV"
# No step of a build or of its tests needs a JavaScript runtime or package manager: the runner has none from here on.
- uses: ./.github/actions/remove-node
- uses: ./.github/actions/setup-cmake
Expand Down Expand Up @@ -120,15 +140,19 @@ jobs:
command -v sccache
sccache --version
# ENABLE_CACHE controls automatic ccache discovery; the explicit sccache launcher stays enabled.
# The heavy unit tests are compiled four to a file (docs/BUILD_TIME_STUDY.md); the portability and sanitizer jobs keep one object per test file.
- name: Configure
run: >-
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DWEBFRONT_EMBED_CEF=OFF -DENABLE_TESTING=ON
-DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_ENABLE_TESTING=ON
-DENABLE_CACHE=OFF -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_SCAN_FOR_MODULES=OFF
-DWEBFRONT_TEST_UNITY_BATCH=4
-DWEBFRONT_TEST_REPRODUCIBILITY=${{ env.WEBFRONT_REPRODUCIBILITY }}
${{ env.FULL_TIER == 'true' && '' || '-DWEBFRONT_MSVC_ANALYZE=OFF -DWEBFRONT_BUILD_EXAMPLES=OFF' }}
${{ matrix.options }}
- name: Build
run: python3 test/tools/MeasureCommand.py --output build/build-resources.json -- cmake --build build --config ${{ matrix.build_type }} --parallel 2
run: python3 test/tools/MeasureCommand.py --output build/build-resources.json -- cmake --build build --config ${{ matrix.build_type }} --parallel 4
- name: Ensure WebView2 Evergreen runtime
if: runner.os == 'Windows'
shell: pwsh
Expand Down Expand Up @@ -323,7 +347,7 @@ jobs:
# No compiler cache: a new user compiles everything.
- name: Configure
shell: bash
run: cmake -S . -B build -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=OFF -DENABLE_TESTING=ON -DENABLE_CACHE=OFF -DCMAKE_CXX_SCAN_FOR_MODULES=OFF
run: cmake -S . -B build -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_ENABLE_TESTING=ON -DENABLE_CACHE=OFF -DCMAKE_CXX_SCAN_FOR_MODULES=OFF
- name: Portability tests
shell: bash
run: ctest --test-dir build -C Release -L portability --output-on-failure --no-tests=error
Expand Down Expand Up @@ -375,9 +399,9 @@ jobs:
- name: Configure hardened sanitizer tests
run: >-
cmake -S . -B build-sanitizers -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_BUILD_EXAMPLES=OFF -DENABLE_TESTING=ON -DENABLE_CACHE=OFF
-DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_BUILD_EXAMPLES=OFF -DWEBFRONT_ENABLE_TESTING=ON -DENABLE_CACHE=OFF
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_SCAN_FOR_MODULES=OFF
${{ matrix.sanitizer == 'thread' && '-DCMAKE_CXX_FLAGS=-stdlib=libc++ -DENABLE_SANITIZER_THREAD=ON' || '-DENABLE_SANITIZER_ADDRESS=ON -DENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON -DENABLE_FUZZING=ON -DWEBFRONT_GZIP_DIFFERENTIAL=ON' }}
${{ matrix.sanitizer == 'thread' && '-DCMAKE_CXX_FLAGS=-stdlib=libc++ -DWEBFRONT_ENABLE_SANITIZER_THREAD=ON' || '-DWEBFRONT_ENABLE_SANITIZER_ADDRESS=ON -DWEBFRONT_ENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON -DWEBFRONT_ENABLE_FUZZING=ON -DWEBFRONT_GZIP_DIFFERENTIAL=ON' }}
- name: Build
run: cmake --build build-sanitizers --parallel 2
- name: Run full CEF-off suite
Expand Down Expand Up @@ -459,7 +483,7 @@ jobs:

# The registry packages and the pinned bootstrap environment are downloaded and verified here; wf then builds the rest.
- name: Configure CEF integration build
run: cmake . -B ${{github.workspace}}/build-cef -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=ON -DWEBFRONT_BUILD_EXAMPLES=OFF -DENABLE_TESTING=ON -DENABLE_CACHE=OFF -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_SCAN_FOR_MODULES=OFF
run: cmake . -B ${{github.workspace}}/build-cef -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=ON -DWEBFRONT_BUILD_EXAMPLES=OFF -DWEBFRONT_ENABLE_TESTING=ON -DENABLE_CACHE=OFF -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_SCAN_FOR_MODULES=OFF

- name: Build browser test
run: cmake --build ${{github.workspace}}/build-cef --target webtest developer_integration webfront-wf --parallel 2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/MddlogIntegration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Configure source integration
run: >-
cmake -S . -B build-mddlog-source -G Ninja
-DCMAKE_BUILD_TYPE=Release -DENABLE_CACHE=OFF -DENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
-DCMAKE_BUILD_TYPE=Release -DENABLE_CACHE=OFF -DWEBFRONT_ENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/dependencies/mddlog/cmake/toolchains/linux-clang21-libcxx.cmake
-DWEBFRONT_USE_MDDLOG=ON
-DWEBFRONT_MDDLOG_SOURCE_DIR=${{ github.workspace }}/dependencies/mddlog
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Configure installed integration
run: >-
cmake -S . -B build-mddlog-install -G Ninja
-DCMAKE_BUILD_TYPE=Release -DENABLE_CACHE=OFF -DENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
-DCMAKE_BUILD_TYPE=Release -DENABLE_CACHE=OFF -DWEBFRONT_ENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/dependencies/mddlog/cmake/toolchains/linux-clang21-libcxx.cmake
-DWEBFRONT_USE_MDDLOG=ON
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/mddlog-install
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
- name: Configure instrumented source integration
run: >-
cmake -S . -B build-sanitized -G Ninja
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_CACHE=OFF -DENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_CACHE=OFF -DWEBFRONT_ENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/dependencies/mddlog/cmake/toolchains/linux-clang21-libcxx.cmake
"-DCMAKE_CXX_FLAGS=-stdlib=libc++ ${{ matrix.flags }} -fno-omit-frame-pointer"
"-DCMAKE_EXE_LINKER_FLAGS=${{ matrix.flags }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ReleaseVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
version: '4.4.4'
- name: Detect project version with CMake
run: cmake -S . -B build -DWEBFRONT_EMBED_CEF=OFF -DENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
run: cmake -S . -B build -DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_ENABLE_TESTING=ON -DWEBFRONT_BUILD_EXAMPLES=OFF
- name: Compare release tag with header and CMake
env:
RELEASE_TAG: ${{ github.event.release.tag_name || github.ref_name }}
Expand Down
14 changes: 7 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ cmake --build . --parallel 2

# Fast, portable C++ baseline (no CEF download)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DWEBFRONT_EMBED_CEF=OFF -DENABLE_TESTING=ON
-DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_ENABLE_TESTING=ON
cmake --build build --parallel
ctest --test-dir build --output-on-failure --parallel 4

Expand All @@ -58,13 +58,13 @@ ctest --test-dir build --output-on-failure --parallel 4
# Linux real-browser integration test: configure downloads and verifies the pinned bootstrap environment and the packages
# of the local npm registry; the tests build the rest with wf
cmake -S . -B build-cef -DCMAKE_BUILD_TYPE=Release \
-DWEBFRONT_EMBED_CEF=ON -DENABLE_TESTING=ON
cmake --build build-cef --target webtest webfront-wf --parallel
-DWEBFRONT_EMBED_CEF=ON -DWEBFRONT_ENABLE_TESTING=ON
cmake --build build-cef --target webtest developer_integration webfront-wf --parallel
ctest --test-dir build-cef -L web-integration --output-on-failure --parallel 4

```

Build the developer environment with wf (the driver comes from any build with `ENABLE_TESTING=ON`), as
Build the developer environment with wf (the driver comes from any build with `WEBFRONT_ENABLE_TESTING=ON`), as
`js/developer/tools/PUBLISHING.md` describes:

```bash
Expand All @@ -78,17 +78,17 @@ Important CMake options:

The headers of the embedded assets are generated, and checked by CTest, in pure CMake (`js/core/EmbedAsset.cmake`; the
`webfront-embedded-assets` target regenerates them). Normal C++ builds consume the versioned headers. Configuring with
`ENABLE_TESTING=ON` downloads the pinned bootstrap environment and the packages of the test registry, each verified
`WEBFRONT_ENABLE_TESTING=ON` downloads the pinned bootstrap environment and the packages of the test registry, each verified
against its SHA-512; `-DWEBFRONT_BOOTSTRAP_DIR` and `-DWEBFRONT_REGISTRY_DIR` replace those downloads on a machine
without network access.

- `WEBFRONT_EMBED_CEF=OFF` (default): CEF is unavailable; this is the normal unit-test build. `ON` downloads/links CEF and enables the automated browser test; it makes `CEFFrontend` available but does not select it: `webfront::WebFront` always uses the system browser.
- `WEBFRONT_EMBED_WEBVIEW2=OFF` (default): Windows-only opt-in SDK and static loader for `WebView2Frontend`; requires the separately installed Evergreen runtime. Select it explicitly with `WebFrontWithFrontend<frontend::WebView2Frontend>`. With tests enabled, `WEBFRONT_WEBTEST_FRONTEND=WebView2` runs the shared Jasmine suite and lifecycle cases.
- `WEBFRONT_EMBED_WKWEBVIEW=OFF` (default): macOS 13.3+ opt-in Cocoa/WebKit frontend, with no engine download. Select `WebFrontWithFrontend<frontend::WKWebViewFrontend>` on the main thread; `WEBFRONT_WEBTEST_FRONTEND=WKWebView` runs Jasmine and lifecycle coverage.

- `ENABLE_TESTING=ON` (default `OFF`): build Catch2 and Jasmine test targets. CI and contributor commands must pass it explicitly.
- `WEBFRONT_ENABLE_TESTING=ON` (default `OFF`): build Catch2 and Jasmine test targets. CI and contributor commands must pass it explicitly. The test, fuzzing, coverage and sanitizer options (`WEBFRONT_ENABLE_SANITIZER_*`) carry the `WEBFRONT_` prefix so that a parent's own `ENABLE_TESTING` or `ENABLE_SANITIZER_ADDRESS` never builds or instruments WebFront's tests; the former unprefixed names no longer configure WebFront (`cmake/WebFrontTestOptions.cmake` documents the options).
- `WEBFRONT_BUILD_EXAMPLES` (default `ON` only for the top-level project): build the examples. As a subproject (`add_subdirectory`), link `WebFront::WebFront`; no examples, tests or global compiler settings are added.
- `ENABLE_COVERAGE=ON`: add GCC/Clang coverage instrumentation to the C++ tests.
- `WEBFRONT_ENABLE_COVERAGE=ON`: add GCC/Clang coverage instrumentation to the C++ tests.

If the environment provides a read-only default ccache directory, set `CCACHE_DIR` to a writable temporary directory for local builds. Do not encode machine-specific cache paths in project files. In CI, `ENABLE_CACHE=OFF` disables automatic cache discovery while `CMAKE_CXX_COMPILER_LAUNCHER=sccache` explicitly enables sccache; a PATH/version probe runs on all three platforms. The combined Linux job uses Debug with GCC coverage on every PR; Windows and macOS use Release. The WebKitGTK sandbox opt-out is confined to the Linux test step and trusted fixtures.

Expand Down
17 changes: 8 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ else()
endif()

option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" OFF)
option(ENABLE_TESTING "Enable Test Builds" OFF)
option(WEBFRONT_BUILD_AUTOMATION "Build the optional local developer CLI/MCP launcher" OFF)
option(WEBFRONT_BUILD_EXAMPLES "Build the example applications" ${WEBFRONT_IS_TOP_LEVEL})
option(ENABLE_COVERAGE "Enable test coverage instrumentation" OFF)
option(ENABLE_FUZZING "Enable Fuzzing Builds" OFF)
option(WEBFRONT_GZIP_DIFFERENTIAL "Build test-only gzip/zlib differential checks" OFF)
option(WEBFRONT_USE_MDDLOG "Use the compiled mddlog diagnostic adapter" OFF)
# The experimental gate must be selected before project() probes the compiler.
Expand All @@ -28,12 +25,14 @@ set(VERSION_STRING_REGEX "inline constexpr std::string_view version = \"([0-9]+\
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/webfront/WebFront.hpp" VERSION_STRING REGEX ${VERSION_STRING_REGEX})
string(REGEX MATCH "([0-9]+\\.[0-9]+\\.[0-9]+)" VERSION_STRING "${VERSION_STRING}")
project(WebFront LANGUAGES CXX VERSION ${VERSION_STRING})
# After project(): a toolchain file's variables are then visible, as they were to the former option() calls.
include(cmake/WebFrontTestOptions.cmake)
webfront_declare_test_options(${WEBFRONT_IS_TOP_LEVEL})

include(cmake/Frontends.cmake)
# Applications need no -DWEBFRONT_EMBED_* option: unless the user decided, this platform's native window
# engine is enabled when its dependencies are present. Test and fuzzing builds keep explicit selection.
# An embedding parent's variables of those names do not decide for its consumers.
if(NOT WEBFRONT_IS_TOP_LEVEL OR (NOT ENABLE_TESTING AND NOT ENABLE_FUZZING))
if(NOT WEBFRONT_ENABLE_TESTING AND NOT WEBFRONT_ENABLE_FUZZING)
set(WEBFRONT_AUTODETECT_NATIVE_DEFAULT ON)
else()
set(WEBFRONT_AUTODETECT_NATIVE_DEFAULT OFF)
Expand Down Expand Up @@ -127,7 +126,7 @@ webfront_add_embedded_assets()
# Opt-in consumer test registration; inclusion alone downloads nothing and registers no tests.
include(WebFrontJasmine)

if(WEBFRONT_BUILD_AUTOMATION OR (ENABLE_TESTING AND
if(WEBFRONT_BUILD_AUTOMATION OR (WEBFRONT_ENABLE_TESTING AND
(WEBFRONT_EMBED_CEF OR WEBFRONT_EMBED_WKWEBVIEW OR WEBFRONT_EMBED_WEBVIEW2 OR WEBFRONT_EMBED_WEBKITGTK)))
webfront_default_embedded_frontend(_automation_default FALLBACK CEF)
webfront_select_frontend(WEBFRONT_AUTOMATION_FRONTEND "${_automation_default}"
Expand All @@ -144,15 +143,15 @@ if(WEBFRONT_BUILD_AUTOMATION OR (ENABLE_TESTING AND
webfront_setup_frontends_for_target(webfront-agent)
endif()

if(ENABLE_TESTING OR ENABLE_FUZZING)
if(WEBFRONT_ENABLE_TESTING OR WEBFRONT_ENABLE_FUZZING)
include(TestHardening)
endif()

if(ENABLE_FUZZING)
if(WEBFRONT_ENABLE_FUZZING)
add_subdirectory(test/fuzz)
endif()

if(ENABLE_TESTING)
if(WEBFRONT_ENABLE_TESTING)
enable_testing()
add_subdirectory(test/unit)
add_subdirectory(test/web)
Expand Down
Loading
Loading