diff options
| author | Leitwolf11 | 2026-09-24 22:07:03 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-09-24 22:07:03 +0300 |
| commit | 9ad804cedf4cc4a85ef89fe097f97a3b44654360 (patch) | |
| tree | f088e919776b22d19387377bdbec727daa2429c0 /xmake.lua | |
| parent | 02f8b5593a15cdec8558256e6f40a0c7fb5862d6 (diff) | |
| download | catch3-0.1.0.tar.gz | |
Add Progmasoft Catch3 property testing and build support0.1.0
Introduce deterministic property execution, built-in generators, shrinking, replayable seeds, and a separate Progmasoft-owned header API while preserving Catch2 compatibility targets and the C++14 engine baseline.
Add Bazel, Meson, Xmake, and Premake integration and tests alongside the existing CMake build. Replace Linux-only workflow coverage with Windows and macOS jobs and document the Catch2/Catch3 distinction.
Diffstat (limited to 'xmake.lua')
| -rw-r--r-- | xmake.lua | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/xmake.lua b/xmake.lua new file mode 100644 index 00000000..221351c3 --- /dev/null +++ b/xmake.lua @@ -0,0 +1,49 @@ +-- Copyright (c) 2026 Progmasoft. +-- SPDX-License-Identifier: MPL-2.0 WITH AdditionRef-Progmasoft-Exception-1.1 + +set_project("Catch3") +set_version("3.16.0") +set_languages("cxx14") +set_warnings("all") + +local repository_root = os.projectdir() +local generated_include = path.join(repository_root, ".xmake", "generated") +add_moduledirs(path.join(repository_root, "buildsupport")) + +-- Keep upstream Catch2's compilation baseline and project identity intact. +target("catch2") + set_kind("static") + set_languages("cxx14") + on_load(function(target) + -- File I/O is restricted to Xmake's script domain, so generate here + -- rather than while the declarative project file is being evaluated. + local configure_catch2 = import("catch2_config") + configure_catch2.main(generated_include, repository_root) + target:add("includedirs", generated_include, {public = true}) + end) + add_files("src/catch2/**.cpp") + remove_files("src/catch2/internal/catch_main.cpp") + add_includedirs("src", {public = true}) + add_headerfiles("src/catch2/**.hpp", {prefixdir = ""}) + +target("catch2_main") + set_kind("static") + set_languages("cxx14") + add_files("src/catch2/internal/catch_main.cpp") + add_deps("catch2") + add_includedirs("src", generated_include, {public = true}) + +-- This is a header-only C++20 layer over the compatibility engine. +target("ProgmasoftCatch3") + set_kind("headeronly") + set_languages("cxx20") + add_headerfiles("src/Progmasoft/**.hpp", {prefixdir = ""}) + add_includedirs("src", {public = true}) + add_deps("catch2", {public = true}) + +target("ProgmasoftPropertyTests") + set_kind("binary") + set_languages("cxx20") + add_files("tests/Progmasoft/Property.tests.cpp") + add_includedirs("src", generated_include) + add_deps("ProgmasoftCatch3", "catch2_main") |